* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

a {
    text-decoration: none;
}

body {
    background-color: #030805;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ── Omnitrix Background ──────────────────────────────────── */
.omnitrix-bg {
    position: fixed;
    top: 50%;
    left: calc(50% + 110px); /* shift right to center in content area */
    transform: translate(-50%, -50%);
    width: 650px;
    height: 650px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.22;
    display: flex;
    justify-content: center;
    align-items: center;
}

.energy-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30,255,0,0.5) 0%, rgba(5,20,5,0.2) 65%, transparent 85%);
    animation: pulseGlow 4s infinite alternate ease-in-out;
}

.watch-core {
    width: 240px;
    height: 240px;
    border: 14px solid #0d220d;
    border-radius: 50%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 60px rgba(30, 255, 0, 0.7), inset 0 0 35px rgba(30, 255, 0, 0.5);
    animation: rotateWatch 18s infinite linear;
}

.hourglass {
    width: 110px;
    height: 110px;
    background-color: #2aff00;
    clip-path: polygon(0 0, 100% 0, 50% 50%, 100% 100%, 0 100%, 50% 50%);
    box-shadow: 0 0 30px #2aff00;
    animation: pulseCore 2s infinite alternate ease-in-out;
}

@keyframes rotateWatch {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes pulseGlow {
    0%   { transform: scale(0.9); opacity: 0.15; }
    100% { transform: scale(1.1); opacity: 0.35; }
}
@keyframes pulseCore {
    0%   { filter: brightness(0.8); }
    100% { filter: brightness(1.4); }
}

/* ── Sidebar ──────────────────────────────────────────────── */
:root {
    --sidebar-w: 220px;
    --sidebar-bg: #060f07;
    --sidebar-border: #0f2410;
    --link-color: #b0b8b2;
    --link-hover-bg: #0d1a0e;
    --link-active-color: #2aff00;
    --link-active-bg: #091609;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 28px 0 20px;
    z-index: 200;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Logo */
.sidebar-logo {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 0 22px 28px;
    display: block;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
}

.logo-rd {
    color: #2aff00;
    text-shadow: 0 0 10px rgba(42, 255, 0, 0.6);
}

.logo-film {
    color: #000;
    background: #2aff00;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 2px;
    box-shadow: 0 0 12px rgba(42, 255, 0, 0.5);
    -webkit-text-stroke: 1px #030805;
}

/* Section label */
.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #2d4a2f;
    padding: 0 22px 8px;
}

/* Nav links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    color: var(--link-color);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-link i {
    font-size: 13px;
    color: #3a5e3c;
    transition: color 0.18s ease;
    width: 16px;
    text-align: center;
}

.sidebar-link:hover {
    background: var(--link-hover-bg);
    color: #e0e8e2;
}

.sidebar-link:hover i {
    color: #5a8a5c;
}

.sidebar-link.active {
    background: var(--link-active-bg);
    color: var(--link-active-color);
    font-weight: 600;
}

.sidebar-link.active i {
    color: var(--link-active-color);
}

/* Sidebar footer accent */
.sidebar-footer {
    margin-top: auto;
    padding: 24px 22px 8px;
    display: flex;
    justify-content: center;
}

.sidebar-hourglass {
    width: 28px;
    height: 28px;
    background-color: #1a3a1a;
    clip-path: polygon(0 0, 100% 0, 50% 50%, 100% 100%, 0 100%, 50% 50%);
    opacity: 0.5;
}

/* ── Mobile hamburger ─────────────────────────────────────── */
.hamburger {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 300;
    background: #060f07;
    border: 1px solid #1a2e1b;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #b0b8b2;
    border-radius: 2px;
    transition: background 0.2s;
}

.hamburger:hover span {
    background: #e0e8e2;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 190;
}

.sidebar-overlay.active {
    display: block;
}

/* ── Page wrapper (content right of sidebar) ──────────────── */
.page-wrapper {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

/* ── Top bar ──────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(6, 15, 7, 0.96);
    border-bottom: 1px solid #0f2410;
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Search icon button */
.search-toggle {
    background: none;
    border: none;
    color: #7a9e7c;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: color 0.18s ease, background 0.18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-toggle:hover {
    color: #b0d0b2;
    background: #0d1a0e;
}

/* Search form — hidden by default, expands on .open */
.topbar-search {
    display: flex;
    align-items: center;
    background: #0a110b;
    border: 1px solid #1a2e1b;
    border-radius: 6px;
    padding: 7px 10px 7px 14px;
    gap: 8px;
    width: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: width 0.28s ease, opacity 0.22s ease, border-color 0.2s ease;
}

.topbar-search.open {
    width: 320px;
    opacity: 1;
    pointer-events: all;
}

.topbar-search:focus-within {
    border-color: #2a4a2a;
}

.topbar-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #d0d8d2;
    font-size: 13px;
    width: 100%;
    min-width: 0;
}

.topbar-search input::placeholder {
    color: #3a5a3c;
}

/* Close (×) button inside search form */
.search-close {
    background: none;
    border: none;
    color: #4a6e4c;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color 0.18s ease;
    display: flex;
    align-items: center;
}

.search-close:hover {
    color: #b0d0b2;
}

/* ── Main Content ─────────────────────────────────────────── */
.content-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 28px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 28px;
    border-left: 4px solid #2aff00;
    padding-left: 12px;
    color: #e8f0e8;
    text-shadow: 0 0 8px rgba(42, 255, 0, 0.2);
}

/* ── Media Grid ───────────────────────────────────────────── */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 28px;
    /* Cap at 3 columns so cards don't stretch on wide screens */
    max-width: 960px;
}

.media-card {
    background: #0a140a;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #163616;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.media-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(42, 255, 0, 0.18);
    border-color: #2a4a2a;
}

.card-poster {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center top;
    background-color: #0a1a0a;
    border-bottom: 1px solid #163616;
    overflow: hidden;
}

/* ── Play overlay (hover) ─────────────────────────────────── */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
    z-index: 3;
}

.play-overlay i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0);
    transition: color 0.25s ease, transform 0.25s ease;
    filter: drop-shadow(0 0 8px rgba(42, 255, 0, 0.8));
}

.media-card:hover .play-overlay {
    background: rgba(0, 0, 0, 0.45);
}

.media-card:hover .play-overlay i {
    color: rgba(255, 255, 255, 0.92);
    transform: scale(1.1);
}

/* ── No-image fallback ────────────────────────────────────── */
.card-poster.no-img {
    background: linear-gradient(135deg, #0b2e13, #1b4d22);
}

.season-1-bg { background: linear-gradient(135deg, #0b2e13, #1b4d22); }
.season-2-bg { background: linear-gradient(135deg, #113816, #235c2d); }
.season-3-bg { background: linear-gradient(135deg, #15421b, #2d7539); }

/* ── Episode count badge ──────────────────────────────────── */
.ep-count {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.75);
    color: #c8e6c9;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid rgba(42, 255, 0, 0.15);
    backdrop-filter: blur(4px);
    z-index: 2;
}

.ep-count i {
    font-size: 10px;
    color: #2aff00;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2aff00;
    color: #030805;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(42, 255, 0, 0.4);
    z-index: 2;
}

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffcc00;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 204, 0, 0.25);
    z-index: 4;
}

.card-info {
    padding: 16px 18px;
    background: linear-gradient(to bottom, #0a140a, #050b05);
    text-align: center;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #ddeedd;
    letter-spacing: 0.3px;
}

/* ── Mobile (≤ 768px) ─────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.26s ease;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0,0,0,0.6);
    }

    .hamburger {
        display: flex;
    }

    .page-wrapper {
        margin-left: 0;
    }

    .topbar {
        padding: 8px 12px 8px 58px; /* 58px left = room for hamburger */
    }

    .topbar-search.open {
        width: calc(100vw - 140px); /* full available width on mobile */
    }

    .omnitrix-bg {
        left: 50%;
    }
}
