/* Simple & Modern Video Portal Theme
   ========================================================================== */

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-header: rgba(15, 23, 42, 0.92);
    --bg-subnav: rgba(30, 41, 59, 0.85);

    --primary-accent: #3b82f6;
    --primary-accent-hover: #2563eb;
    --primary-accent-subtle: rgba(59, 130, 246, 0.12);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #64748b;

    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.18);
    --border-accent: rgba(59, 130, 246, 0.4);

    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 6px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);

    --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   1. Header Navbar & Navigation
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.brand-name {
    color: #ffffff;
}

.header-nav {
    display: flex;
    align-items: center;
}

.sub-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    white-space: nowrap;
}

.sub-nav-link {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sub-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.sub-nav-link.active {
    color: #ffffff;
    background: var(--primary-accent);
}

/* Search Bar Above Categories */
.home-search-section {
    margin-bottom: 16px;
}

.main-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 55%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

.search-input {
    width: 100%;
    height: 46px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0 18px 0 44px;
    border-radius: var(--radius-pill);
    color: #ffffff;
    font-size: 0.92rem;
    outline: none;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-input:focus {
    border-color: var(--primary-accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.main-search-btn {
    height: 46px;
    background: var(--primary-accent);
    color: #ffffff;
    border: none;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.main-search-btn:hover {
    background: var(--primary-accent-hover);
}

/* ==========================================================================
   2. Main Layout Canvas & Categories Bar
   ========================================================================== */
.main-canvas {
    flex: 1;
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 24px 60px 24px;
}

.categories-bar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.category-chips-rail {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chip-item {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.chip-item:hover {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: #ffffff;
}

/* ==========================================================================
   3. Section Headers & Period Filters
   ========================================================================== */
.section-container {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.btn-view-all {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-view-all:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

.section-period-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1e293b;
    padding: 4px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.section-period-tabs::-webkit-scrollbar {
    display: none;
}

.period-tab-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.period-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.period-tab-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   4. Clean Video Card Grid
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.video-card {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.card-thumbnail-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #090d16;
    overflow: hidden;
}

.card-thumbnail-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.card-thumbnail-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.video-card:hover .card-thumbnail-box img {
    transform: scale(1.06);
    filter: brightness(1.05);
}

.video-card:hover .card-thumbnail-box::after {
    opacity: 1;
}

/* Play Icon Overlay Centered */
.card-thumbnail-box::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 44px;
    height: 44px;
    line-height: 44px;
    text-align: center;
    background: var(--primary-accent);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1rem;
    padding-left: 2px;
    z-index: 5;
    opacity: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.video-card:hover .card-thumbnail-box::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Colorful Badges */
.card-res-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.64rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.4px;
    text-transform: uppercase;
    z-index: 4;
}

.card-duration-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(15, 23, 42, 0.88);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 4;
}

.card-content {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.video-card:hover .card-title {
    color: #60a5fa;
}

.card-meta-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card-meta-info .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.card-meta-info svg {
    flex-shrink: 0;
}

.card-categories-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: auto;
}

.category-pill-btn {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-card:hover .category-pill-btn {
    border-color: rgba(59, 130, 246, 0.3);
    color: #cbd5e1;
}

/* ==========================================================================
   5. Pagination
   ========================================================================== */
.pagination-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
}

.pagination-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pagination-btn:hover:not(.disabled) {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.pagination-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.pagination-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-dark);
    font-weight: 800;
    padding: 0 4px;
    user-select: none;
}

.goto-page-form {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
    background: #1e293b;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
}

.goto-page-input {
    width: 64px;
    height: 30px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #ffffff;
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    outline: none;
}

.goto-page-input:focus {
    border-color: #2563eb;
}

.goto-page-btn {
    height: 30px;
    padding: 0 14px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.goto-page-btn:hover {
    background: var(--primary-accent-hover);
}

/* ==========================================================================
   6. Video Watch Detail Page
   ========================================================================== */
.cinema-player-box {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 ratio */
    background: #000000;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.cinema-player-box video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-action-lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action-lg:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-action-lg.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.stream-meta-box {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 26px;
    margin-bottom: 22px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stream-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.stream-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.38;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.stream-stats-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.live-watching-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.78rem;
}

.live-pulse-dot {
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 8px #ef4444;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.badge-res-lg {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-time-lg {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(15, 23, 42, 0.9);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.stream-actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    border: none;
}

.stream-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-action-lg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.84rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-action-lg:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-action-lg.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.stream-about-card {
    background: #1e293b;
    border: 1px solid var(--border-color);
    border-left: 3px solid #3b82f6;
    border-radius: var(--radius-md);
    padding: 22px 26px;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.about-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-card-text {
    font-size: 0.92rem;
    color: #cbd5e1;
    line-height: 1.65;
    margin-bottom: 18px;
    background: rgba(15, 23, 42, 0.4);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.btn-read-more {
    display: none;
}

.more-videos-header {
    margin-bottom: 16px;
}

.more-videos-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

/* ==========================================================================
   7. Site Footer
   ========================================================================== */
.site-footer {
    background: #090d16;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 48px 0 24px 0;
}

.footer-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-brand-section {
    max-width: 600px;
    margin-bottom: 32px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.footer-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;

}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.rta-badge-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.rta-logo {
    font-weight: 900;
    color: #ef4444;
    font-size: 0.9rem;
}

.rta-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
}

.footer-copyright-bar {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

.hamburger-bar {
    width: 20px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   8. Responsive Media Queries
   ========================================================================== */
@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        padding: 16px;
        display: none;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
        z-index: 1000;
    }

    .header-nav.nav-open {
        display: block;
        animation: slideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .sub-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        width: 100%;
    }

    .sub-nav-link {
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--radius-sm);
        text-align: left;
        font-size: 0.95rem;
    }

    .main-canvas {
        padding: 16px 14px 40px 14px;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card-content {
        padding: 5px;
    }

    .card-title {
        font-size: 0.82rem;
        line-height: 1.3;
        margin-bottom: 6px;
    }

    .card-meta-info {
        font-size: 0.72rem;
        margin-bottom: 6px;
        padding-bottom: 4px;
    }

    .category-pill-btn {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .footer-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 24px;
    }

    .section-period-tabs {
        width: 100%;
        gap: 3px;
        padding: 3px;
        justify-content: space-between;
    }

    .period-tab-btn {
        flex: 1;
        text-align: center;
        padding: 5px 8px;
        font-size: 0.76rem;
    }

    /* Video Player Page Mobile Optimization */
    .cinema-player-box {
        margin-bottom: 16px;
    }

    .stream-meta-box, .stream-about-card {
        padding: 14px 16px;
        margin-bottom: 16px;
    }

    .stream-meta-header {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

    .stream-title {
        font-size: 1.05rem;
        line-height: 1.35;
        margin-bottom: 8px;
    }

    .stream-stats-row {
        gap: 6px;
    }

    .live-watching-tag, .stat-pill {
        font-size: 0.72rem;
        padding: 3px 8px;
    }

    .badge-res-lg, .badge-time-lg {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .stream-actions-bar {
        gap: 6px;
        padding-top: 10px;
    }

    .btn-action-lg {
        flex: 1;
        justify-content: center;
        padding: 6px 10px;
        font-size: 0.76rem;
    }

    .about-card-title {
        font-size: 0.95rem;
        margin-bottom: 8px;
    }

    .about-card-text {
        font-size: 0.84rem;
        line-height: 1.5;
        padding: 10px 12px;
        margin-bottom: 8px;
    }

    .about-card-text-wrapper {
        position: relative;
        margin-bottom: 12px;
    }

    .about-card-text-wrapper:not(.expanded) .about-card-text {
        max-height: 100px;
        overflow: hidden;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
    }

    .about-card-text-wrapper:not(.expanded)::after {
        content: '';
        position: absolute;
        bottom: 24px;
        left: 0;
        right: 0;
        height: 24px;
        background: linear-gradient(to bottom, transparent, #1e293b);
        pointer-events: none;
    }

    .btn-read-more {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        color: #60a5fa;
        font-weight: 700;
        font-size: 0.78rem;
        cursor: pointer;
        padding: 2px 0;
        margin-top: 2px;
    }

    .more-videos-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-canvas {
        padding: 14px 10px 36px 10px;
    }

    .home-search-section {
        margin-bottom: 16px;
    }

    .main-search-form {
        gap: 6px;
    }

    .search-input-wrapper {
        flex: 1;
        min-width: 0;
        /* Prevents flex overflow */
    }

    .search-input {
        height: 42px;
        font-size: 0.85rem;
        padding: 0 10px 0 34px;
        border-radius: var(--radius-pill);
    }

    .search-icon {
        left: 12px;
    }

    .search-icon svg {
        width: 15px;
        height: 15px;
    }

    .main-search-btn {
        height: 42px;
        padding: 0 14px;
        font-size: 0.82rem;
        font-weight: 700;
        flex-shrink: 0;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }

    .card-res-tag {
        font-size: 0.6rem;
        padding: 1px 5px;
        top: 6px;
        left: 6px;
    }

    .card-duration-tag {
        font-size: 0.6rem;
        padding: 1px 5px;
        bottom: 6px;
        right: 6px;
    }

    .pagination-bar {
        gap: 4px;
    }

    .pagination-btn {
        min-width: 30px;
        height: 32px;
        font-size: 0.76rem;
        padding: 0 6px;
    }

    .goto-page-form {
        padding: 3px 8px;
        font-size: 0.76rem;
        gap: 6px;
    }

    .goto-page-input {
        width: 54px;
        height: 26px;
        font-size: 0.76rem;
    }

    .goto-page-btn {
        height: 26px;
        padding: 0 10px;
        font-size: 0.74rem;
    }

    .stream-meta-box, .stream-about-card {
        padding: 5px;
    }

    .stream-title {
        font-size: 0.95rem;
    }

    .live-watching-tag, .stat-pill {
        font-size: 0.68rem;
        padding: 2px 6px;
    }

    .btn-action-lg {
        font-size: 0.72rem;
        padding: 5px 8px;
    }

    .about-card-text {
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

@media (max-width: 340px) {
    .main-canvas {
        padding: 12px 8px 30px 8px;
    }

    .main-search-btn {
        padding: 0 10px;
        font-size: 0.78rem;
    }

    .search-input {
        font-size: 0.8rem;
        padding-left: 30px;
    }
}