/* ========================================
   MOVIEHUB - Enhanced Modern UI
   Theme: Dark Cinematic with Glassmorphism
======================================== */

/* CSS Variables - Orange/Black Premium Theme */
:root {
    --bg: #000000;
    --card: #1a1a1a;
    --accent: #ff9000;
    --accent-glow: rgba(255, 144, 0, 0.4);
    --accent-secondary: #ffa500;
    --muted: #888888;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-secondary: #cccccc;
    font-family: 'Inter', system-ui, Arial, sans-serif;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================================
   HERO BACKGROUND - Live Poster Grid
======================================== */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    width: 100%;
    height: 100%;
    filter: blur(8px);
    opacity: 0.25;
    transform: scale(1.1);
    animation: slowZoom 30s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1.1); }
    100% { transform: scale(1.15); }
}

.poster-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    animation: fadeInPoster 1s ease forwards;
}

@keyframes fadeInPoster {
    to { opacity: 1; }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(11, 15, 18, 0.7) 0%,
        rgba(11, 15, 18, 0.85) 40%,
        var(--bg) 100%
    );
}

/* ========================================
   HEADER
======================================== */
header {
    position: relative;
    z-index: 10;
    padding: 40px 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    max-width: 800px;
    width: 100%;
}

.mainheading {
    font-family: 'Anton', Impact, sans-serif;
    font-size: 56px;
    font-weight: 400;
    color: var(--text);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0;
    text-transform: uppercase;
}

.logo-movie {
    color: var(--text);
}

.logo-hub {
    background: var(--accent);
    color: #000000;
    padding: 4px 12px;
    border-radius: 8px;
    margin-left: 4px;
}

.tagline {
    font-size: 15px;
    color: var(--muted);
    margin-top: -4px;
    letter-spacing: 0.5px;
}


/* ========================================
   SEARCH BAR
======================================== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 12px 8px 24px;
    margin-top: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 4px 30px var(--accent-glow);
}

.search-icon {
    color: var(--muted);
    font-size: 16px;
    transition: color 0.3s ease;
}

.search-bar:focus-within .search-icon {
    color: var(--accent);
}

.search-bar input {
    flex: 1;
    padding: 14px 8px;
    background: transparent;
    color: var(--text);
    border: none;
    outline: none;
    font-size: 15px;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--muted);
}

.search-bar button {
    background: var(--accent);
    border: none;
    color: var(--bg);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.search-bar button:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px var(--accent-glow);
}

.search-bar button:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ========================================
   GENRE FILTERS
======================================== */
.genre-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

.genre-btn {
    padding: 10px 22px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--muted);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.genre-btn:hover {
    border-color: var(--accent);
    color: var(--text);
    box-shadow: 0 0 15px var(--accent-glow);
}

.genre-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.genre-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    font-weight: 600;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ========================================
   SORT CONTROLS
======================================== */
.sort-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.sort-controls label {
    color: var(--muted);
    font-size: 14px;
}

.sort-controls select {
    padding: 10px 36px 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa6b2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.25s ease;
}

.sort-controls select:hover {
    border-color: var(--accent);
}

.sort-controls select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}


/* ========================================
   MAIN CONTENT
======================================== */
main {
    position: relative;
    z-index: 10;
    padding: 30px 20px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.section-title {
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    position: relative;
    padding-left: 16px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--accent);
    border-radius: 2px;
}

.back-btn {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.back-btn:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.back-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.back-btn[hidden] {
    display: none;
}

/* ========================================
   MOVIE GRID
======================================== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
    min-height: 400px; /* Prevent layout shift */
}

/* ========================================
   MOVIE CARD
======================================== */
.movie-card {
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid transparent;
    will-change: transform;
    contain: layout style paint;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    border-color: var(--glass-border);
}

.movie-card:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* Card Icons */
.card-icons {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.movie-card:hover .card-icons {
    opacity: 1;
    transform: translateX(0);
}

.card-icons button {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.card-icons button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    transform: scale(1.1);
}

.card-icons button.favorited {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.card-icons button.favorited:hover {
    background: #dc2626;
    border-color: #dc2626;
}

/* Poster */
.poster-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--card);
    min-height: 340px;
    aspect-ratio: 2/3;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #1a1f26 0%, #0f1720 100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
    display: block;
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
}

/* Trailer Container (hover to play) */
.trailer-container {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 5;
}

.trailer-container.active {
    opacity: 1;
    visibility: visible;
}

.trailer-iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-trailer {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.8);
}

/* Hover hint */
.hover-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
}

/* Poster Overlay on Hover */
.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 16px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 4;
}

.movie-card:hover .poster-overlay {
    opacity: 1;
    transform: translateY(0);
}

.view-details-btn {
    background: var(--accent);
    color: var(--bg);
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.view-details-btn:hover {
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Movie Info */
.movie-info {
    padding: 18px;
}

.movie-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}

.movie-meta {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 10px;
}

.movie-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
}

.movie-rating i {
    color: var(--accent);
}

.movie-rating span {
    color: var(--text);
}


/* ========================================
   SKELETON LOADING
======================================== */
.skeleton-card {
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--card) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        var(--card) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-poster {
    width: 100%;
    height: 340px;
    border-radius: 18px 18px 0 0;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 12px;
}

.skeleton-meta {
    height: 14px;
    width: 60%;
    margin-bottom: 10px;
}

.skeleton-rating {
    height: 16px;
    width: 40%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ========================================
   FADE IN ANIMATION
======================================== */
.fade-in {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

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

/* ========================================
   EMPTY STATE & LOADING
======================================== */
.empty-state,
.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    color: #2a3441;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   PAGINATION
======================================== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding-bottom: 40px;
}

.page-btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg);
}

.page-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#pageInfo {
    color: var(--muted);
    font-size: 14px;
}

/* ========================================
   MODAL
======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
}

.modal-overlay:not([hidden]) {
    opacity: 1;
    visibility: visible;
}

.modal-overlay[hidden] {
    display: none;
}

.modal {
    background: #1a1a1a;
    border: 1px solid rgba(255, 144, 0, 0.2);
    border-radius: 20px;
    max-width: 1100px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: modalSlide 0.4s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 144, 0, 0.1);
    margin: auto;
}

@keyframes modalSlide {
    from {
        transform: translateY(40px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.modal-close:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #000000;
    transform: rotate(90deg);
}

.modal-close:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.modal-content {
    display: flex;
    flex-direction: row;
    max-height: 90vh;
}

/* Video Section (Left Side) */
.modal-video-section {
    flex: 0 0 55%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.modal-trailer {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.modal-trailer-iframe {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.modal-poster-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-trailer-msg {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Details Section (Right Side) */
.modal-details {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
    max-height: 90vh;
}

.modal-header {
    margin-bottom: 16px;
}

.modal-details h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.2;
}

.modal-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--muted);
}

/* Ratings Row */
.modal-ratings {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--glass);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.rating-item.imdb i {
    color: #f5c518;
    font-size: 24px;
}

.rating-item.tomato span:first-child,
.rating-item.meta span:first-child {
    font-size: 18px;
}

.modal-plot {
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.modal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.modal-info-item.awards {
    grid-column: span 2;
}

.modal-info-item {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 16px;
    border-radius: 14px;
}

.modal-info-item label {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-info-item span {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 14px;
}

.modal-btn {
    flex: 1;
    padding: 16px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-btn.primary {
    background: var(--accent);
    color: var(--bg);
}

.modal-btn.primary:hover {
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text);
}

.modal-btn.secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.modal-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}


/* ========================================
   FLOATING ACTION BUTTON (FAB)
======================================== */
.fab-favorites {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(34, 211, 238, 0.2);
    transition: all 0.3s ease;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-favorites:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 40px rgba(34, 211, 238, 0.35);
    background: var(--accent);
    color: var(--bg);
}

.fab-favorites:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.fav-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    min-width: 24px;
    height: 24px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Large Desktop */
@media (min-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* Desktop */
@media (min-width: 992px) and (max-width: 1199px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile - Stack video and info vertically */
@media (max-width: 900px) {
    .modal {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .modal-content {
        flex-direction: column;
        max-height: 95vh;
        overflow-y: auto;
    }
    
    .modal-video-section {
        flex: none;
        width: 100%;
        min-height: 250px;
        max-height: 300px;
    }
    
    .modal-trailer,
    .modal-trailer-iframe {
        min-height: 250px;
        max-height: 300px;
    }
    
    .modal-details {
        max-height: none;
        overflow-y: visible;
    }
    
    .modal-info-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-info-item.awards {
        grid-column: span 1;
    }
    
    .modal-ratings {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Landscape */
@media (max-width: 767px) and (min-width: 481px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .mainheading {
        font-size: 40px;
    }
    
    .poster-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .mainheading {
        font-size: 36px;
    }
    
    .tagline {
        font-size: 13px;
    }
    
    header {
        padding: 30px 16px 24px;
    }
    
    .search-bar {
        padding: 6px 10px 6px 18px;
    }
    
    .search-bar input {
        padding: 12px 6px;
        font-size: 14px;
    }
    
    .search-bar button {
        width: 42px;
        height: 42px;
    }
    
    .genre-filters {
        gap: 8px;
    }
    
    .genre-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    main {
        padding: 20px 16px 50px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .movie-poster {
        height: 240px;
    }
    
    .movie-info {
        padding: 14px;
    }
    
    .movie-info h3 {
        font-size: 14px;
    }
    
    .movie-meta {
        font-size: 12px;
    }
    
    .card-icons {
        opacity: 1;
        transform: translateX(0);
    }
    
    .card-icons button {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .poster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-details {
        padding: 24px;
    }
    
    .modal-details h2 {
        font-size: 22px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .fab-favorites {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .pagination {
        gap: 12px;
    }
    
    .page-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* Very Small Screens */
@media (max-width: 360px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
    
    .movie-poster {
        height: 300px;
    }
}

/* ========================================
   SCROLLBAR STYLING
======================================== */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

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

/* ========================================
   ACCESSIBILITY
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .poster-grid {
        animation: none;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass-border: rgba(255, 255, 255, 0.3);
    }
    
    .movie-card {
        border: 1px solid var(--glass-border);
    }
}
