/* ========================================
   ANIMESTREAM - NETFLIX-STYLE DESIGN
   Complete Professional Redesign
   ======================================== */

/* =========================
   GLOBAL RESET + VARIABLES
   ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --netflix-red: #E50914;
    --netflix-dark-red: #B20710;
    --bg-black: #141414;
    --bg-darker: #000000;
    --card-bg: #181818;
    --card-hover: #2F2F2F;
    --text-white: #ffffff;
    --text-gray: #d2d2d2;
    --text-muted: #808080;
    --border-gray: #2a2a2a;
    --success: #46d369;
    --warning: #f89e00;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg-black);
    color: var(--text-white);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================
   HEADER - FIXED NAVBAR
   ========================= */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4%;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    backdrop-filter: blur(10px);
    z-index: 999;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

#site-title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--netflix-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#site-title:hover {
    transform: scale(1.05);
}

header nav {
    display: flex;
    gap: 1.5rem;
}

header nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

header nav a:hover {
    color: var(--text-white);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--netflix-red);
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

/* Search Icon */
.search-icon {
    position: fixed;
    top: 22px;
    right: 4%;
    font-size: 24px;
    color: var(--text-white);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, color 0.2s ease;
}

.search-icon:hover {
    transform: scale(1.15);
    color: var(--netflix-red);
}

/* =========================
   SEARCH OVERLAY
   ========================= */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    z-index: 9999;
    backdrop-filter: blur(20px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.overlay-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem 4%;
    background: rgba(0, 0, 0, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.overlay-header input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-size: 1.1rem;
    background: var(--card-bg);
    color: var(--text-white);
    outline: none;
    transition: border-color 0.3s ease;
}

.overlay-header input:focus {
    border-color: var(--netflix-red);
}

.overlay-header button {
    background: var(--netflix-red);
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-white);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.overlay-header button:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-2px);
}

.close-btn {
    font-size: 32px;
    color: var(--text-white);
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
    color: var(--netflix-red);
}

/* === SEARCH RESULTS - ANIME CARDS === */
#overlaySearchResults {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0.5rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.2rem;
  max-height: calc(100vh - 160px);
  padding-right: 8px; /* space for scrollbar */
}

.search-results .anime-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
  height: 240px; /* Fixed height for consistency */
  display: flex;
  flex-direction: column;
}

.search-results .anime-card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.search-results .anime-card .info {
  padding: 0.6rem 0.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.search-results .anime-card .title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.search-results .anime-card .meta {
  font-size: 0.7rem;
  color: #e50914;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* ✨ HOVER EFFECTS */
.search-results .anime-card:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 12px 24px rgba(229, 9, 20, 0.5);
  z-index: 2;
}

.search-results .anime-card:hover img {
  transform: scale(1.05);
}

/* Optional: Add a subtle red glow on hover */
.search-results .anime-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(229, 9, 20, 0);
  transition: box-shadow 0.3s ease;
  pointer-events: none;
}

.search-results .anime-card:hover::after {
  box-shadow: inset 0 0 0 2px rgba(229, 9, 20, 0.6);
}





/* =========================
   MAIN CONTENT
   ========================= */
main {
    padding-top: 68px;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    padding: 0 4%;
}

/* =========================
   HERO SECTION
   ========================= */
.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%23222" width="100" height="100"/></svg>');
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--bg-black), transparent);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 650px;
    padding: 0 4%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.2rem;
    line-height: 1.1;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.primary-btn {
    background: var(--netflix-red);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.primary-btn:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.secondary-btn {
    background: rgba(109, 109, 110, 0.7);
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-btn:hover {
    background: rgba(109, 109, 110, 0.9);
    transform: translateY(-3px);
}

/* =========================
   CATEGORY SECTIONS
   ========================= */
.category-row {
    margin-bottom: 3.5rem;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding: 0 4%;
}

.category-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
}

.view-all {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.view-all:hover {
    color: var(--netflix-red);
}

.view-all::after {
    content: '›';
    font-size: 1.5rem;
}

/* Category Grid */
.category-grid {
    display: flex;
    gap: 0.8rem;
    padding: 0 4%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-grid::-webkit-scrollbar {
    display: none;
}

/* Anime Cards */
.category-card,
.anime-card {
    position: relative;
    min-width: 200px;
    max-width: 200px;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-card:hover,
.anime-card:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.category-card img,
.anime-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.category-card:hover img,
.anime-card:hover img {
    transform: scale(1.1);
}

.category-card .info,
.anime-card .info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
}

.category-card .title,
.anime-card .title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-card .meta,
.anime-card .meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* =========================
   VIDEO PLAYER PAGE
   ========================= */
.player-section {
    max-width: 1400px;
    margin: 100px auto 2rem;
    padding: 0 4%;
}

.player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    margin-bottom: 2rem;
}

.player-container iframe,
.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 10;
}

.player-container .loader,
.player-container .error {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-gray);
    background: rgba(0,0,0,0.5);
    z-index: 1;
    font-size: 1.2rem;
}

.player-container .error {
    color: var(--netflix-red);
}

/* Episode Title */
.episode-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
}

/* Video Actions */
.video-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.video-actions button,
.video-actions a {
    background: var(--card-bg);
    color: var(--text-white);
    border: 2px solid var(--border-gray);
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.video-actions button:hover,
.video-actions a:hover {
    transform: translateY(-3px);
    border-color: var(--netflix-red);
    background: var(--card-hover);
}

#download-btn {
    border-color: var(--netflix-red);
    color: var(--netflix-red);
}

#download-btn:hover {
    background: var(--netflix-red);
    color: var(--text-white);
}

/* Season & Episode Selector */
.season-episode-selector {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
}

.season-episode-selector label {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 1rem;
}

.season-episode-selector select {
    background: var(--bg-black);
    color: var(--text-white);
    border: 2px solid var(--border-gray);
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.season-episode-selector select:focus {
    outline: none;
    border-color: var(--netflix-red);
}

/* Episode Buttons */
.episode-buttons {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.episode-btn {
    min-width: 80px;
    padding: 0.8rem 1.2rem;
    background: var(--bg-black);
    color: var(--text-gray);
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.episode-btn:hover {
    border-color: var(--text-white);
    color: var(--text-white);
    transform: translateY(-2px);
}

.episode-btn.active {
    background: var(--netflix-red);
    color: var(--text-white);
    border-color: var(--netflix-red);
}

/* Comments Section */
.comments-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 2rem 4%;
    background: var(--card-bg);
    border-radius: 12px;
}

.comments-section h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

#comments-list {
    margin-bottom: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.comment {
    padding: 1rem;
    background: var(--bg-black);
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--netflix-red);
}

.comment .username {
    font-weight: 700;
    color: var(--netflix-red);
    margin-bottom: 0.5rem;
}

.comment .text {
    color: var(--text-gray);
    line-height: 1.6;
}

#comment-input {
    width: 100%;
    padding: 1rem;
    background: var(--bg-black);
    color: var(--text-white);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 1rem;
    transition: border-color 0.2s ease;
}

#comment-input:focus {
    outline: none;
    border-color: var(--netflix-red);
}

#post-comment {
    background: var(--netflix-red);
    color: var(--text-white);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#post-comment:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-2px);
}

/* More Animes Section - Fixed Size & Smooth Scrolling */
#more-animes {
    max-width: 100%;
    margin: 3rem auto;
    padding: 0 4%; /* Keep this for overall page padding */
}

#more-animes h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

/* Slider Row - Container for the cards */
.slider-row {
    display: flex;
    gap: 0.8rem; /* Match homepage gap */
    overflow-x: auto; /* Enable horizontal scrolling */
    padding: 1rem 4%; /* Add 1rem of vertical padding (top & bottom) */
    scrollbar-width: none; /* Hide scrollbar in Firefox */
    -ms-overflow-style: none; /* Hide scrollbar in IE/Edge */
    /* Improve native scrolling smoothness */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* Removed scroll-snap-type: x mandatory; */
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
    /* PERFORMANCE OPTIMIZATION: Force hardware acceleration for the container */
    transform: translateZ(0); /* Or will-change: scroll-position; */
    -webkit-transform: translateZ(0); /* For older webkit */
}

.slider-row::-webkit-scrollbar {
    display: none; /* Hide scrollbar in Chrome/Safari */
}

/* Individual Anime Card inside Slider Row */
.slider-row .anime-card {
    /* ✅ Reduce card size */
    min-width: 160px; /* Reduced from 200px */
    max-width: 160px; /* Reduced from 200px */
    /* Height will be determined by image aspect ratio + info text */
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden; /* IMPORTANT: Clip content */
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0; /* Prevent cards from shrinking */

    /* PERFORMANCE OPTIMIZATION: Force hardware acceleration for each card */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);

    /* Hover Effect - Match homepage style */
    &:hover {
        transform: scale(1.08) translateZ(0); /* Apply translateZ to hover transform too */
        z-index: 10;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    }

    img {
        /* ✅ Reduce image size */
        width: 100%;
        height: 240px; /* Reduced from 300px */
        object-fit: cover; /* Maintain aspect ratio, crop if needed */
        display: block;
        transition: transform 0.3s ease;

        &:hover {
            transform: scale(1.1) translateZ(0); /* Apply translateZ to hover transform too */
        }
    }

    .info {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 0.8rem; /* Slightly reduced padding */
        /* PERFORMANCE TIP: Consider if a solid color is faster than gradient */
        background: rgba(0, 0, 0, 0.85); /* Try a solid color first if gradient is slow */
        /* background: linear-gradient(to top, rgba(0,0,0,0.95), transparent); */
    }

    .title {
        font-size: 0.9rem; /* Slightly smaller font */
        font-weight: 600;
        color: var(--text-white);
        margin-bottom: 0.2rem; /* Less space below title */
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .meta {
        font-size: 0.75rem; /* Slightly smaller font */
        color: var(--text-muted);
    }
}

/* =========================
   FOOTER
   ========================= */
footer {
    background: var(--bg-darker);
    color: var(--text-muted);
    text-align: center;
    padding: 3rem 4%;
    margin-top: 4rem;
    border-top: 1px solid var(--border-gray);
}

footer a {
    color: var(--text-gray);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--netflix-red);
}

footer p {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* =========================
   ADMIN PANEL
   ========================= */
#login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--bg-darker) 0%, #1a0000 100%);
}

#login-screen h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-white);
}

#login-screen input {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: var(--card-bg);
    border: 2px solid var(--border-gray);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 1rem;
}

#login-screen input:focus {
    outline: none;
    border-color: var(--netflix-red);
}

#login-screen button {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    background: var(--netflix-red);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#login-screen button:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-2px);
}

#admin-panel {
    padding: 100px 4% 2rem;
}

#admin-panel header {
    position: relative;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

#admin-panel h1 {
    font-size: 2.5rem;
    color: var(--netflix-red);
    margin-bottom: 1rem;
}

.admin-controls {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.admin-controls h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

#add-form input,
#add-form button {
    width: 100%;
    padding: 0.9rem;
    margin-bottom: 1rem;
    background: var(--bg-black);
    border: 2px solid var(--border-gray);
    border-radius: 6px;
    color: var(--text-white);
    font-size: 1rem;
}

#add-form button {
    background: var(--netflix-red);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

#add-form button:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-2px);
}

#output {
    background: var(--bg-black);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border-gray);
    font-family: monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    color: var(--success);
    margin-top: 1rem;
}

.admin-table {
    width: 100%;
    background: var(--card-bg);
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-gray);
}

.admin-table th {
    background: var(--bg-black);
    color: var(--netflix-red);
    font-weight: 700;
}

.admin-table td {
    color: var(--text-gray);
}

.admin-table button {
    padding: 0.5rem 1rem;
    background: var(--netflix-red);
    color: var(--text-white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 0.5rem;
    transition: background 0.2s ease;
}

.admin-table button:hover {
    background: var(--netflix-dark-red);
}

/* =========================
   LOADER & ERROR
   ========================= */
.loader {
    color: var(--text-gray);
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
}

.error {
    color: var(--netflix-red);
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
    background: rgba(229, 9, 20, 0.1);
    border-radius: 8px;
    border: 1px solid var(--netflix-red);
}

/* =========================
   POPUP OVERLAY
   ========================= */
#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

#popup-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.popup-box {
    background: var(--card-bg);
    color: var(--text-white);
    text-align: center;
    padding: 3rem 2rem;
    max-width: 500px;
    border-radius: 12px;
    border: 2px solid var(--netflix-red);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    animation: popupSlide 0.4s ease;
}

@keyframes popupSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.popup-box h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--netflix-red);
}

.popup-box p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-gray);
}

.popup-box h5 {
    margin: 1rem 0;
}

.popup-box h5 a {
    color: var(--netflix-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

.popup-box h5 a:hover {
    color: var(--netflix-dark-red);
    text-decoration: underline;
}

.popup-btn {
    background: var(--netflix-red);
    color: var(--text-white);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.5);
    transition: all 0.3s ease;
}

.popup-btn:hover {
    background: var(--netflix-dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.7);
}

/* =========================
   RESPONSIVE DESIGN
   ========================= */
@media (max-width: 1200px) {
    .category-card,
    .anime-card {
        min-width: 180px;
        max-width: 180px;
    }
    
    .category-card img,
    .anime-card img {
        height: 270px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0 3%;
        height: 60px;
    }
    
    #site-title {
        font-size: 1.5rem;
    }
    
    .search-icon {
        top: 18px;
        font-size: 20px;
    }
    
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-sub {
        font-size: 1rem;
    }
    
    .category-header {
        padding: 0 3%;
    }
    
    .category-grid {
        padding: 0 3%;
    }
    
    .category-card,
    .anime-card {
        min-width: 150px;
        max-width: 150px;
    }
    
    .category-card img,
    .anime-card img {
        height: 225px;
    }
    
    .player-section {
        padding: 0 3%;
        margin-top: 80px;
    }
    
    .episode-title {
        font-size: 1.4rem;
    }
    
    .video-actions {
        gap: 0.6rem;
    }
    
    .video-actions button,
    .video-actions a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .season-episode-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .comments-section {
        padding: 1.5rem 3%;
    }
    
    footer {
        padding: 2rem 3%;
    }
}

@media (max-width: 480px) {
    #site-title {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-sub {
        font-size: 0.9rem;
    }
    
    .primary-btn,
    .secondary-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .category-header h2 {
        font-size: 1.4rem;
    }
    
    .category-card,
    .anime-card {
        min-width: 130px;
        max-width: 130px;
    }
    
    .category-card img,
    .anime-card img {
        height: 195px;
    }
}

/* =========================
   ANIMATIONS
   ========================= */
.fadeUp {
    animation: fadeUp 0.6s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth hover transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

a, button {
    -webkit-user-select: none;
    user-select: none;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-black);
}

::-webkit-scrollbar-thumb {
    background: var(--border-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-red);
}

.request-section {
  position: relative;
  padding: 50px 25px;
  border-radius: 12px;
  margin: 25px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: rgba(0,0,0,0.6); /* halka dark layer behind */
  box-shadow: 0 8px 25px rgba(0,0,0,0.7);
}

.request-section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('https://i.ibb.co/vvL40XP1/IMG-20251003-192733-940.webp') no-repeat center center/cover;
  opacity: 0.25;
  z-index: 0;

  animation: zoomMove 20s infinite alternate ease-in-out;
}

@keyframes zoomMove {
  0% { transform: scale(1) translateY(0); }
  100% { transform: scale(1.1) translateY(-10px); }
}

.request-section h2 {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.request-section .btns {
  margin-top: 20px;
}

.request-section a {
  display: inline-block;
  margin: 0 10px;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.request-section .insta {
  background: linear-gradient(45deg, #f09433, #dc2743, #cc2366, #bc1888);
  color: white;
}

.request-section .tg {
  background: #0088cc;
  color: blue;
}

.request-section a:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Reply button style */
.comment-controls {
  margin-top: 5px;
  background: var(--netflix-red);
    color: var(--text-white);
  color: blue;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: 0.3s;
}

.comment-controls:hover {
  background: #e6004c;
  transform: scale(1.05);
}

/* Replies ka design */
.replies {
  margin-left: 20px;
  margin-top: 8px;
  border-left: 2px solid #ff0055;
  padding-left: 10px;
}

.reply {
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 10px;
  border-radius: 6px;
  color: red;
  font-size: 14px;
  margin-top: 4px;
}


