/* ============================================
   GoM's Plex - Modern Dark Theme
   Inspired by plex.jm-burri.ch
   ============================================ */

/* ---------- Base ---------- */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #e0e0e0;
    background-color: #0d0d1a !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #e5a00d;
    transition: color 0.2s ease;
}

a:hover {
    color: #f5be4a;
    text-decoration: none;
}

a:not([href]):not([tabindex]),
a:not([href]):not([tabindex]):focus,
a:not([href]):not([tabindex]):hover {
    text-decoration: none;
}

::selection {
    background: rgba(229, 160, 13, 0.3);
    color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0d0d1a;
}

::-webkit-scrollbar-thumb {
    background: #2a2a3e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a52;
}

/* ---------- Navbar ---------- */
.navbar {
    background: rgba(13, 13, 26, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1rem;
    transition: background 0.3s ease;
    z-index: 1030;
}

.navbar.scrolled {
    background: rgba(13, 13, 26, 0.98) !important;
}

.brand-text {
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #e5a00d, #f5be4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin: 0 0.15rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link {
    color: #fff !important;
    background: rgba(229, 160, 13, 0.15);
}

.navbar-nav .nav-link i {
    margin-right: 0.3rem;
    opacity: 0.7;
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.6rem;
}

/* ---------- Hero Section ---------- */
.hero-section {
    position: relative;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a3e 40%, #2d1a4e 70%, #0d0d1a 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(229, 160, 13, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(100, 60, 200, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(229, 160, 13, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, #0d0d1a, transparent);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem 1rem;
}

.hero-logo {
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 30px rgba(229, 160, 13, 0.3));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.2;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2rem;
    font-weight: 300;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn-plex {
    color: #111;
    background: linear-gradient(135deg, #e5a00d, #f0b429);
    border: none;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 160, 13, 0.3);
}

.btn-plex:hover {
    color: #111;
    background: linear-gradient(135deg, #f0b429, #e5a00d);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(229, 160, 13, 0.4);
}

.btn-plex:active {
    transform: translateY(0);
}

.btn-outline-light {
    border-radius: 10px;
    border-width: 2px;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

/* Keep existing Bootstrap button overrides */
.btn-primary {
    color: #111;
    background-color: #e5a00d;
    border-color: #e5a00d;
}

.btn-primary:hover {
    color: #111;
    background-color: #c1870b;
    border-color: #b57e0a;
}

.btn-warning {
    color: #111;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-link {
    color: #e5a00d;
}

.btn-link:focus,
.btn-link:hover {
    color: #f5be4a;
    text-decoration: none;
    background-color: transparent;
}

/* ---------- Main Content ---------- */
.main-content {
    position: relative;
    z-index: 3;
    margin-top: -3rem;
    padding-bottom: 2rem;
}

/* ---------- Section Headers ---------- */
.section-header {
    margin: 2rem 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.section-header h2 i {
    color: #e5a00d;
    margin-right: 0.5rem;
}

/* ---------- Glass Cards ---------- */
.glass-card {
    background: rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    color: #e0e0e0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(229, 160, 13, 0.15) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.glass-card .card-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 1.25rem;
}

.glass-card .card-header i {
    color: #e5a00d;
    margin-right: 0.4rem;
}

.glass-card .card-body {
    padding: 1.5rem;
}

.glass-card .card-title {
    color: #fff;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.glass-card .card-text.text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.glass-card .card-footer {
    padding: 0.75rem 1.25rem;
}

/* ---------- Card Icon (action cards) ---------- */
.card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(229, 160, 13, 0.1);
    color: #e5a00d;
}

/* ---------- List Group (dark themed) ---------- */
.glass-card .list-group-item {
    background: transparent !important;
    border-color: rgba(255, 255, 255, 0.06);
    color: #e0e0e0;
    padding: 0.75rem 1.25rem;
}

.glass-card .list-group-item.list-group-item-info,
.glass-card .list-group-item.status-loading {
    background: rgba(25, 160, 215, 0.1) !important;
    color: #5cc8f0;
    border-color: rgba(25, 160, 215, 0.2);
}

.glass-card .list-group-item.list-group-item-success {
    background: rgba(150, 200, 60, 0.1) !important;
    color: #b2e05a;
    border-color: rgba(150, 200, 60, 0.2);
}

.glass-card .list-group-item.list-group-item-danger {
    background: rgba(240, 100, 100, 0.1) !important;
    color: #f08080;
    border-color: rgba(240, 100, 100, 0.2);
}

/* ---------- Badges ---------- */
.badge-primary {
    color: #111;
    background-color: #e5a00d;
}

.badge-success {
    color: #111;
    background-color: #96c83c;
}

.badge-info {
    color: #fff;
    background-color: #19a0d7;
}

.badge-warning {
    color: #111;
    background-color: #ffc107;
}

.badge-danger {
    color: #fff;
    background-color: #f06464;
}

/* ---------- Nav Tabs / Pills (rating & genre tabs) ---------- */
#contentRatingTabs .nav-item span,
#genreTabs .nav-item span {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

#contentRatingTabs .nav-link,
#genreTabs .nav-link {
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px !important;
    margin: 0 2px;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    font-weight: 500;
}

#contentRatingTabs .nav-link:hover, #contentRatingTabs .nav-link:focus,
#genreTabs .nav-link:hover, #genreTabs .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

#contentRatingTabs .nav-link:active, #contentRatingTabs .nav-link.active,
#genreTabs .nav-link:active, #genreTabs .nav-link.active {
    color: #111;
    background: #e5a00d;
}

#contentRatingTabContent,
#genreTabContent {
    padding: 0 1.25rem 1.25rem 1.25rem;
}

#contentRatingTabContent .tab-pane,
#genreTabContent .tab-pane {
    background: transparent !important;
}

#contentRatingTabContent ul li:last-child,
#genreTabContent ul li:last-child {
    border-bottom-right-radius: 0.25rem !important;
    border-bottom-left-radius: 0.25rem !important;
}

/* ---------- Form Controls (selects, inputs) ---------- */
.form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #e5a00d;
    color: #e0e0e0;
    box-shadow: 0 0 0 3px rgba(229, 160, 13, 0.15);
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

select.form-control {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

select.form-control option {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

/* ---------- Loading Animation ---------- */
.list-group li.loading span {
    display: flex;
    position: relative;
    width: 100%;
    height: 24px;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0.6;
    overflow: hidden;
    border-radius: 6px;
}

.list-group li.loading span:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(229, 160, 13, 0.1), transparent);
    transform: translateX(-100%);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    100% { transform: translateX(100%); }
}

/* ---------- Long Title Truncation ---------- */
span.longtitle-left {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex-grow: 1;
}

span.longtitle-right {
    text-align: right;
    margin-left: 0.5rem;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.5);
}

/* ---------- Tooltips ---------- */
.tooltip-inner {
    background-color: #1a1a3e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.tooltip.bs-tooltip-top .arrow::before { border-top-color: #1a1a3e; }
.tooltip.bs-tooltip-right .arrow::before { border-right-color: #1a1a3e; }
.tooltip.bs-tooltip-bottom .arrow::before { border-bottom-color: #1a1a3e; }
.tooltip.bs-tooltip-left .arrow::before { border-left-color: #1a1a3e; }

/* ---------- Footer ---------- */
.site-footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.site-footer .text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

.site-footer a {
    color: #e5a00d;
}

.site-footer a:hover {
    color: #f5be4a;
}

/* ---------- Background utility overrides ---------- */
.bg-dark {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.bg-transparent {
    background-color: transparent !important;
}

/* ---------- Text overrides ---------- */
.text-white {
    color: #fff !important;
}

.text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* ---------- Status colors for badges/pills ---------- */
.bg-primary { background-color: #e5a00d !important; }
.bg-success { background-color: #96c83c !important; }
.bg-info { background-color: #19a0d7 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #f06464 !important; }

.text-primary { color: #e5a00d !important; }
.text-success { color: #96c83c !important; }
.text-info { color: #19a0d7 !important; }
.text-warning { color: #ffc107 !important; }
.text-danger { color: #f06464 !important; }

/* ---------- Focus / Accessibility ---------- */
*:focus-visible {
    outline: 2px solid #e5a00d;
    outline-offset: 2px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.form-control:focus-visible {
    outline: 2px solid #e5a00d;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(229, 160, 13, 0.2);
}

/* ---------- Fade-in Animation ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glass-card {
    animation: fadeInUp 0.5s ease-out both;
}

.row .col-sm-12:nth-child(2) .glass-card,
.row .col-md-6:nth-child(2) .glass-card,
.row .col-sm-6:nth-child(2) .glass-card {
    animation-delay: 0.1s;
}

.row .col-sm-12:nth-child(3) .glass-card,
.row .col-lg-4:nth-child(3) .glass-card {
    animation-delay: 0.2s;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-section {
        min-height: 60vh;
        padding-top: 70px;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .main-content {
        margin-top: -1.5rem;
    }

    .navbar-collapse {
        background: rgba(13, 13, 26, 0.98);
        padding: 1rem;
        border-radius: 12px;
        margin-top: 0.5rem;
        border: 1px solid rgba(255, 255, 255, 0.06);
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .glass-card {
        border-radius: 12px !important;
    }
}
