/* ==========================================================
   IndoViral - Movie Streaming Website
   Custom Stylesheet
   ========================================================== */

/* ========================= VARIABLES ========================= */
:root {
    --bg-primary:    #0d0d0d;
    --bg-secondary:  #1a1a2e;
    --bg-card:       #16213e;
    --bg-navbar:     rgba(13, 13, 13, 0.95);
    --accent-red:    #e94560;
    --accent-blue:   #0f3460;
    --text-primary:  #ffffff;
    --text-secondary:#a0a0b0;
    --border-color:  #2a2a4a;
    --transition:    all 0.3s ease;
    --radius:        12px;
    --radius-sm:     8px;
}

/* ========================= RESET & BASE ========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================= SCROLLBAR ========================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-red);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff6b81;
}

/* ========================= NAVBAR ========================= */
.navbar {
    background: var(--bg-navbar);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 12px 0;
    z-index: 1050;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-icon {
    font-size: 1.8rem;
    color: var(--accent-red);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary) !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(233, 69, 96, 0.15);
}

.nav-link ion-icon {
    font-size: 1.1rem;
}

/* Search Box */
.search-box {
    position: relative;
}

.search-box .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    color: var(--text-primary);
    padding: 6px 16px;
    font-size: 0.85rem;
    width: 200px;
    transition: var(--transition);
}

.search-box .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
    width: 260px;
}

.search-box .form-control::placeholder {
    color: var(--text-secondary);
}

.btn-search {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    padding: 4px 8px;
}

.btn-search:hover {
    color: var(--accent-red);
}

/* Nav Actions (Search + Auth) */
.nav-actions {
    flex-shrink: 0;
}

/* ========================= HERO SECTION ========================= */
.hero-section {
    position: relative;
    background: url('https://placehold.co/1920x900/0d0d0d/1a1a2e?text=') center/cover no-repeat;
    min-height: 100vh;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(13, 13, 13, 0.95) 0%,
        rgba(13, 13, 13, 0.7) 50%,
        rgba(13, 13, 13, 0.3) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.6);
}

.hero-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-meta ion-icon[name="star"] {
    color: #ffc107;
}

.hero-desc {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 550px;
    line-height: 1.7;
}

/* ========================= QUICK CATEGORY ========================= */
.quick-category {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.btn-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    transition: var(--transition);
}

.btn-category:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

.btn-category ion-icon {
    font-size: 1.1rem;
}

/* ========================= SECTION COMMON ========================= */
.movie-section {
    position: relative;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.section-title ion-icon {
    font-size: 1.5rem;
}

/* View All Button */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 30px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--accent-red), #c0392b);
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-view-all:hover {
    background: linear-gradient(135deg, #ff6b81, var(--accent-red));
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

.btn-view-all ion-icon {
    font-size: 1.1rem;
}

/* ========================= VIDEO PLAYER MODAL ========================= */
.player-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-modal.active {
    opacity: 1;
    visibility: visible;
}

.player-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.player-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.player-modal.active .player-container {
    transform: scale(1) translateY(0);
}

.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border-color);
}

.player-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-close-player {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-close-player:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
}

.player-wrapper video {
    width: 100%;
    display: block;
    aspect-ratio: 16/9;
    background: #000;
}

.player-controls-bar {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--border-color);
}

.btn-player-action {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    transition: var(--transition);
}

.btn-player-action:hover {
    color: var(--text-primary);
}

.btn-player-action ion-icon {
    font-size: 1.2rem;
}

.player-time {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.volume-slider {
    width: 70px;
    height: 4px;
    accent-color: var(--accent-red);
    cursor: pointer;
}

/* ========================= MOVIE CARD ========================= */
.movie-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 2/3;
}

.movie-poster img,
.movie-poster .thumb-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    pointer-events: none;
}

.movie-card:hover .movie-poster img,
.movie-card:hover .movie-poster .thumb-video {
    transform: scale(1.08);
}

/* Overlay on Hover */
.movie-overlay {
    position: absolute;
    inset: 0;
    background: rgba(13, 13, 13, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.btn-play {
    display: flex;
    color: var(--text-primary);
    transition: var(--transition);
}

.btn-play ion-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.btn-play:hover {
    color: var(--accent-red);
    transform: scale(1.15);
}

/* Rating Badge */
.movie-rating {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 3;
}

.movie-rating ion-icon {
    color: #ffc107;
    font-size: 0.8rem;
}

/* Quality Badge */
.movie-quality {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-red);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 3;
}

/* Movie Info */
.movie-info {
    padding: 10px 12px;
}

.movie-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.movie-meta .badge {
    font-size: 0.65rem;
    font-weight: 400;
}

/* ========================= TOP RATED SECTION ========================= */
.top-rated-section {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.top-rated-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 16px;
    gap: 16px;
    transition: var(--transition);
    align-items: flex-start;
}

.top-rated-card:hover {
    background: rgba(233, 69, 96, 0.08);
    border-color: rgba(233, 69, 96, 0.3);
    transform: translateY(-3px);
}

.rank-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-red);
    opacity: 0.6;
    line-height: 1;
    min-width: 40px;
    text-align: center;
}

.top-rated-img {
    width: 80px;
    min-width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.top-rated-info {
    flex: 1;
    min-width: 0;
}

.top-rated-info h6 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.top-rated-info ion-icon {
    font-size: 0.85rem;
}

/* ========================= FOOTER ========================= */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.footer-brand ion-icon {
    font-size: 1.5rem;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 8px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-red);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    color: var(--accent-red);
    padding-left: 6px;
}

/* Social Links */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: var(--text-primary);
    transform: translateY(-3px);
}

/* Newsletter Input */
.site-footer .form-control {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.8rem;
    border-radius: 6px;
}

.site-footer .form-control:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 2px rgba(233, 69, 96, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.site-footer .form-control::placeholder {
    color: var(--text-secondary);
}

/* ========================= BACK TO TOP ========================= */
.btn-back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--accent-red);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-back-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.btn-back-top:hover {
    background: #ff6b81;
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.5);
}

/* ========================= RESPONSIVE ========================= */

/* Body offset for fixed navbar */
body {
    padding-top: 70px;
}

/* Desktop Large (1400px+) */
@media (min-width: 1400px) {
    .movie-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    }
}

/* Desktop (992px - 1199px) */
@media (max-width: 1199.98px) {
    .section-title {
        font-size: 1.2rem;
    }

    .top-rated-info h6 {
        font-size: 0.88rem;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991.98px) {
    body {
        padding-top: 64px;
    }

    /* Navbar mobile menu */
    .navbar {
        padding: 10px 0;
    }

    .navbar-collapse {
        background: var(--bg-secondary);
        border-radius: var(--radius);
        margin-top: 12px;
        padding: 16px;
        border: 1px solid var(--border-color);
    }

    .navbar-nav {
        gap: 2px;
    }

    .nav-link {
        padding: 10px 14px !important;
        border-radius: var(--radius-sm);
    }

    /* Search full width on tablet */
    .search-box {
        width: 100%;
    }

    .search-box .form-control {
        width: 100%;
    }

    .search-box .form-control:focus {
        width: 100%;
    }

    .d-flex.align-items-center.gap-2 {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        gap: 10px !important;
    }

    .d-flex.align-items-center.gap-2 .btn {
        width: 100%;
        text-align: center;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
        gap: 10px !important;
    }

    .nav-actions .search-box {
        width: 100%;
    }

    .nav-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Section spacing */
    .movie-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .section-title {
        font-size: 1.15rem;
    }

    /* Top rated */
    .top-rated-img {
        width: 70px;
        min-width: 70px;
        height: 105px;
    }

    .top-rated-card {
        padding: 14px;
        gap: 12px;
    }

    .rank-number {
        font-size: 2rem;
        min-width: 35px;
    }
}

/* Small Tablet / Large Phone (576px - 767px) */
@media (max-width: 767.98px) {
    body {
        padding-top: 60px;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .brand-icon {
        font-size: 1.5rem;
    }

    /* Section header stacks nicely */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    /* Movie cards */
    .movie-card:hover {
        transform: translateY(-4px);
    }

    .btn-play ion-icon {
        font-size: 2.8rem;
    }

    .movie-info {
        padding: 8px 10px;
    }

    .movie-title {
        font-size: 0.8rem;
    }

    .movie-meta {
        font-size: 0.7rem;
    }

    .movie-rating {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .movie-quality {
        font-size: 0.6rem;
        padding: 2px 6px;
    }

    /* Top rated full width */
    .top-rated-card {
        padding: 12px;
        gap: 10px;
    }

    .rank-number {
        font-size: 1.8rem;
        min-width: 30px;
    }

    .top-rated-img {
        width: 65px;
        min-width: 65px;
        height: 98px;
    }

    .top-rated-info h6 {
        font-size: 0.85rem;
    }

    .top-rated-info p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Footer */
    .footer-brand {
        font-size: 1.15rem;
    }

    .social-links {
        margin-bottom: 8px;
    }

    /* Quick category */
    .btn-category {
        padding: 6px 14px;
        font-size: 0.78rem;
    }

    /* Player */
    .player-container {
        width: 95%;
    }

    .player-header {
        padding: 10px 14px;
    }

    .player-title {
        font-size: 0.9rem;
    }

    .player-controls-bar {
        padding: 10px 14px;
    }

    .btn-view-all {
        padding: 8px 24px;
        font-size: 0.82rem;
    }
}

/* Mobile (max-width: 575px) */
@media (max-width: 575.98px) {
    body {
        padding-top: 56px;
    }

    /* Player mobile */
    .player-container {
        width: 98%;
        border-radius: var(--radius-sm);
    }

    .player-header {
        padding: 10px 12px;
    }

    .player-title {
        font-size: 0.82rem;
    }

    .btn-close-player {
        width: 30px;
        height: 30px;
        font-size: 1.1rem;
    }

    .player-controls-bar {
        padding: 8px 12px;
    }

    .btn-player-action {
        font-size: 0.75rem;
    }

    .btn-player-action ion-icon {
        font-size: 1rem;
    }

    .player-time {
        font-size: 0.7rem;
    }

    .volume-slider {
        width: 50px;
    }

    .volume-control {
        display: none !important;
    }

    .btn-view-all {
        padding: 8px 20px;
        font-size: 0.78rem;
    }

    .navbar {
        padding: 8px 0;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .brand-icon {
        font-size: 1.3rem;
    }

    .navbar-collapse {
        margin-top: 8px;
        padding: 12px;
    }

    /* Sections */
    .movie-section {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }

    .section-title {
        font-size: 1rem;
    }

    .section-title ion-icon {
        font-size: 1.2rem;
    }

    /* Movie grid - ensure 2 columns with tighter gap */
    .row.g-3 {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    .movie-card {
        border-radius: var(--radius-sm);
    }

    .movie-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    .movie-poster img {
        border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    }

    .movie-info {
        padding: 6px 8px 8px;
    }

    .movie-title {
        font-size: 0.72rem;
        margin-bottom: 2px;
    }

    .movie-meta {
        font-size: 0.65rem;
        gap: 4px;
    }

    .movie-meta .badge {
        font-size: 0.58rem;
        padding: 2px 4px;
    }

    .movie-rating {
        top: 5px;
        left: 5px;
        font-size: 0.62rem;
        padding: 2px 5px;
        gap: 2px;
    }

    .movie-rating ion-icon {
        font-size: 0.65rem;
    }

    .movie-quality {
        top: 5px;
        right: 5px;
        font-size: 0.55rem;
        padding: 1px 5px;
    }

    .btn-play ion-icon {
        font-size: 2.2rem;
    }

    /* Top rated */
    .top-rated-card {
        padding: 10px;
        gap: 8px;
        border-radius: var(--radius-sm);
    }

    .rank-number {
        font-size: 1.5rem;
        min-width: 24px;
    }

    .top-rated-img {
        width: 55px;
        min-width: 55px;
        height: 82px;
        border-radius: 6px;
    }

    .top-rated-info h6 {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-rated-info .d-flex {
        gap: 4px !important;
    }

    .top-rated-info .small {
        font-size: 0.7rem !important;
    }

    .top-rated-info .badge {
        font-size: 0.6rem;
    }

    .top-rated-info p {
        font-size: 0.7rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 6px !important;
    }

    .top-rated-info .btn {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Footer */
    .site-footer {
        padding-top: 2rem !important;
        padding-bottom: 1.5rem !important;
    }

    .footer-brand {
        font-size: 1.1rem;
    }

    .footer-heading {
        font-size: 0.88rem;
        margin-bottom: 10px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .footer-links li {
        margin-bottom: 6px;
    }

    .social-links a {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    .site-footer .form-control {
        font-size: 0.75rem;
    }

    /* Back to top */
    .btn-back-top {
        bottom: 16px;
        right: 16px;
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }

    /* Quick category */
    .quick-category {
        padding: 10px 0 !important;
    }

    .btn-category {
        padding: 5px 12px;
        font-size: 0.72rem;
        border-radius: 20px;
    }

    .btn-category ion-icon {
        font-size: 0.9rem;
    }
}

/* Extra small (max-width: 380px) - very small phones */
@media (max-width: 380px) {
    .navbar-brand {
        font-size: 1.05rem;
    }

    .brand-icon {
        font-size: 1.2rem;
    }

    .movie-title {
        font-size: 0.68rem;
    }

    .movie-info {
        padding: 5px 6px 6px;
    }

    .top-rated-img {
        width: 48px;
        min-width: 48px;
        height: 72px;
    }

    .rank-number {
        font-size: 1.3rem;
        min-width: 20px;
    }

    .top-rated-info h6 {
        font-size: 0.75rem;
    }

    .top-rated-info p {
        -webkit-line-clamp: 1;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .movie-overlay {
        opacity: 1;
        background: rgba(13, 13, 13, 0.3);
    }

    .btn-play ion-icon {
        font-size: 2.5rem;
    }

    .movie-card:hover {
        transform: none;
    }

    .movie-card:active {
        transform: scale(0.97);
    }

    .top-rated-card:hover {
        transform: none;
    }

    .btn-category:hover {
        transform: none;
    }

    .btn-category:active {
        background: var(--accent-red);
        border-color: var(--accent-red);
        color: var(--text-primary);
    }
}

/* Landscape phone */
@media (max-height: 500px) and (orientation: landscape) {
    body {
        padding-top: 50px;
    }

    .navbar {
        padding: 6px 0;
    }

    .movie-section {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}
