/* ==============================================================================
   Praereung.live - SabayFlix Inspired Dark Cinema Theme
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #090b10;
    --bg-surface: #10131d;
    --bg-surface-hover: #171b29;
    --bg-card: #131722;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 36, 66, 0.3);
    
    --primary: #e50914;
    --primary-hover: #ff2a3b;
    --primary-glow: rgba(229, 9, 20, 0.35);
    
    --vip-gold: #fbbf24;
    --vip-gold-glow: rgba(251, 191, 36, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dim: #6b7280;
    
    --font-khmer: 'Kantumruy Pro', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition-fast: 0.18s ease;
    --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    background: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Containers */
.container {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #090b10;
}
::-webkit-scrollbar-thumb {
    background: #252b3d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Navbar */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 950;
    background: rgba(9, 11, 16, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s, box-shadow 0.3s;
}

.site-header.scrolled {
    background: rgba(9, 11, 16, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body {
    padding-top: 68px;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-brand .brand-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    box-shadow: 0 0 15px var(--primary-glow);
}

.logo-brand .brand-live {
    color: var(--primary);
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
}

.nav-item a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-item a:hover,
.nav-item.active a {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
    color: var(--primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

/* Search Input Box */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px 8px 36px;
    border-radius: var(--radius-xl);
    font-size: 0.88rem;
    font-family: inherit;
    width: 220px;
    transition: all var(--transition-fast);
}

.search-input:focus {
    width: 280px;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--bg-surface-hover);
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-dim);
    pointer-events: none;
}

/* VIP Badge Button */
.btn-vip-gold {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    font-weight: 700;
    font-size: 0.88rem;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-xl);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 14px var(--vip-gold-glow);
    transition: all var(--transition-fast);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-vip-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    color: #000;
}

.btn-login {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    height: 38px;
    padding: 0 16px;
    border-radius: var(--radius-xl);
    font-size: 0.88rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast);
    box-sizing: border-box;
    white-space: nowrap;
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile-only elements default hidden on desktop */
.mobile-search-btn {
    display: none;
}
.mobile-search-dropdown-bar {
    display: none;
}
.header-wallet-pill {
    display: none;
}
.vip-text-mobile,
.login-text-mobile,
.btn-text-short {
    display: none;
}
.mobile-bottom-nav {
    display: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px var(--primary-glow);
    transition: all var(--transition-fast);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Toggle */
.btn-mobile-menu {
    display: none;
    color: var(--text-main);
    font-size: 1.5rem;
    padding: 6px;
}

/* Hero Section */
.hero-slider-section {
    position: relative;
    width: 100%;
    min-height: 520px;
    height: 72vh;
    max-height: 680px;
    overflow: hidden;
    background: #000;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: center;
    transition: opacity 0.6s ease;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(to top, var(--bg-dark) 8%, rgba(9, 11, 16, 0.7) 45%, rgba(9, 11, 16, 0.3) 100%),
        linear-gradient(to right, var(--bg-dark) 18%, rgba(9, 11, 16, 0.8) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 680px;
    padding: 2rem 0;
}

.hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.badge-tag {
    background: rgba(229, 9, 20, 0.2);
    color: #ff4d64;
    border: 1px solid rgba(229, 9, 20, 0.4);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.badge-rating {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.6rem;
    color: #fff;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
}

.hero-original-title {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    margin-bottom: 1rem;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.hero-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hero-desc {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Sections & Grids */
.section-wrapper {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary);
}

.btn-view-all {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition-fast);
}

.btn-view-all:hover {
    color: var(--primary);
}

/* Movie Card Grid */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

.movie-card {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-highlight);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(229, 9, 20, 0.2);
}

.card-poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #1c2130;
}

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

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

/* Card Badges */
.card-badge-left {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

.card-badge-right {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    color: #38bdf8;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.card-badge-vip,
.card-badge-member {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.card-badge-free {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.card-badge-paid {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.card-badge-lang {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 2;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.card-badge-lang.lang-khmer {
    background: rgba(251, 191, 36, 0.92);
    color: #1a1605;
}

.card-badge-lang.lang-original {
    background: rgba(56, 189, 248, 0.92);
    color: #04253a;
}

.badge-access {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

.badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-member {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-paid {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Play Overlay on Hover */
.card-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.movie-card:hover .card-play-overlay {
    opacity: 1;
}

.play-circle-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(0.8);
    transition: transform var(--transition-fast);
}

.movie-card:hover .play-circle-icon {
    transform: scale(1);
}

/* Card Content Info */
.card-info {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
    transition: color var(--transition-fast);
}

.movie-card:hover .card-title {
    color: #ff334b;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: auto;
}

.card-rating {
    color: #fbbf24;
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

/* VIP Banner in Homepage */
.vip-promo-card {
    background: linear-gradient(135deg, #181b29, #25121b);
    border: 1px solid rgba(229, 9, 20, 0.3);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.vip-promo-card::after {
    content: '';
    position: absolute;
    right: -60px;
    bottom: -60px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

/* Catalog Header & Search/Filter Toolbar (Matching Image 1) */
.catalog-header-wrap {
    margin-bottom: 2rem;
    text-align: center;
}

.catalog-header-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
}

.catalog-action-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto;
    width: 100%;
}

.catalog-search-form {
    flex: 1;
    margin: 0;
}

.catalog-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.catalog-search-field {
    width: 100%;
    height: 44px;
    background: #11141d;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0 42px 0 16px;
    color: #fff;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.catalog-search-field::placeholder {
    color: #64748b;
}

.catalog-search-field:focus {
    border-color: #ef4444;
    background: #151924;
    outline: none;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.3);
}

.catalog-search-submit {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
}

.catalog-search-submit:hover {
    transform: scale(1.1);
}

/* Red Filter Toggle Button ("⬍ លម្អិត") */
.btn-filter-detail-toggle {
    height: 44px;
    background: #8b0000;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 700;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-sizing: border-box;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.4);
}

.btn-filter-detail-toggle:hover {
    background: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.5);
}

.btn-filter-detail-toggle:active {
    transform: scale(0.96);
}

.btn-filter-detail-toggle.active {
    background: #b91c1c;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.catalog-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 0 4px;
}

.catalog-results-count {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.catalog-results-count strong {
    color: #fff;
}

.catalog-reset-link {
    color: #ef4444;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.catalog-reset-link:hover {
    opacity: 0.8;
}

@media (max-width: 640px) {
    .catalog-header-title {
        font-size: 1.55rem;
        margin-bottom: 1rem;
    }
    .catalog-action-bar {
        gap: 8px;
    }
    .catalog-search-field {
        height: 40px;
        font-size: 0.88rem;
        padding: 0 36px 0 12px;
    }
    .btn-filter-detail-toggle {
        height: 40px;
        padding: 0 14px;
        font-size: 0.85rem;
        gap: 6px;
    }
}

/* Filter Controls in Catalog Page */
.filter-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 80px;
}

.filter-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-pill {
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

/* Watch Page Player */
.player-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
}

.player-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.server-selector-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.server-btn {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-fast);
}

.server-btn:hover,
.server-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 14px var(--primary-glow);
}

.server-btn.vip-server {
    border-color: var(--vip-gold);
    color: #fbbf24;
}

.server-btn.vip-server.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #000;
    box-shadow: 0 0 14px var(--vip-gold-glow);
}

/* Episodes Grid */
.episodes-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.episode-btn {
    padding: 9px 4px;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.episode-btn:hover {
    background: var(--bg-surface-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.episode-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* VIP Pricing Cards */
.vip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.vip-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all var(--transition-normal);
}

.vip-card:hover {
    transform: translateY(-8px);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

.vip-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(229, 9, 20, 0.08) 0%, var(--bg-surface) 100%);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.15);
}

.vip-card-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.vip-price {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff;
    margin: 1rem 0 0.25rem 0;
}

.vip-price-khr {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.vip-features-list {
    list-style: none;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex-grow: 1;
}

.vip-features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    color: #d1d5db;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.modal-backdrop.open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
    transform: translateY(20px) scale(0.96);
    transition: all 0.25s ease;
}

.modal-backdrop.open .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.form-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    padding: 10px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--bg-surface-hover);
}

/* KHQR Payment Modal */
.khqr-card {
    text-align: center;
}

.khqr-logo-box {
    background: #e11d48;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 800;
    display: inline-block;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.khqr-frame {
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    display: inline-block;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    margin: 1rem 0;
}

.khqr-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 4px 12px;
    border-radius: var(--radius-xl);
    font-size: 0.85rem;
    font-weight: 700;
}

/* Site Footer */
.site-footer {
    background: #07080c;
    border-top: 1px solid var(--border-color);
    padding-top: 3.5rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-about p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0.85rem;
}

.footer-col-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.25rem;
    position: relative;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* Responsive Media Queries */
@media (max-width: 1200px) {
    .movie-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .vip-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .movie-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .vip-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }
    .nav-links {
        display: none;
    }
    .btn-mobile-menu {
        display: inline-flex !important;
    }
    .btn-vip-desktop {
        display: none !important;
    }
}

/* Universal layout boundary to prevent horizontal scrolling */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    /* Top Header Permanently Fixed */
    .site-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 950 !important;
    }

    /* Fixed Top Header + Bottom Navigation safe padding */
    body {
        padding-top: 50px !important;
        padding-bottom: calc(60px + env(safe-area-inset-bottom, 12px)) !important;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .nav-inner {
        height: 50px !important;
    }

    .logo-brand {
        font-size: 1.05rem !important;
        gap: 4px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .logo-brand .brand-badge {
        font-size: 0.65rem !important;
        padding: 1px 5px !important;
        border-radius: 3px !important;
    }

    .logo-brand .brand-live {
        font-size: 1.05rem !important;
    }

    .nav-actions {
        gap: 0.32rem !important;
        align-items: center !important;
    }

    /* Hide desktop inline search box on mobile */
    .site-header .search-box {
        display: none !important;
    }

    /* Compact Mobile Search Toggle Button (32px) */
    .mobile-search-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        color: #cbd5e1 !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .mobile-search-btn svg,
    .mobile-search-btn i {
        width: 15px !important;
        height: 15px !important;
    }

    .mobile-search-btn:active {
        background: rgba(255, 255, 255, 0.2) !important;
        transform: scale(0.94);
    }

    /* Mobile Slide-Down Search Overlay */
    .mobile-search-dropdown-bar {
        position: fixed !important;
        top: 50px !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 949 !important;
        background: rgba(14, 18, 27, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8) !important;
        padding: 8px 0 !important;
    }

    .mobile-search-box {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }

    .mobile-search-box .search-input {
        width: 100% !important;
        height: 38px !important;
        padding: 0 36px 0 34px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.08) !important;
        border: 1px solid rgba(255, 255, 255, 0.15) !important;
        border-radius: 20px !important;
        color: #fff !important;
        box-sizing: border-box !important;
    }

    .mobile-search-box .search-icon {
        position: absolute;
        left: 10px;
        color: #94a3b8;
        pointer-events: none;
    }

    .mobile-search-box .close-search-btn {
        position: absolute;
        right: 8px;
        background: transparent;
        border: none;
        color: #94a3b8;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 26px;
        cursor: pointer;
        padding: 0;
    }

    .mobile-search-results {
        margin-top: 6px;
        background: #131722;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        max-height: 320px;
        overflow-y: auto;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    }

    /* Compact Mobile Wallet Balance Pill (32px) */
    .header-wallet-pill {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 8px !important;
        border-radius: 16px !important;
        gap: 4px !important;
        background: rgba(239, 68, 68, 0.18) !important;
        border: 1px solid rgba(239, 68, 68, 0.4) !important;
        color: #fbbf24 !important;
        font-size: 0.72rem !important;
        font-weight: 700 !important;
        cursor: pointer !important;
        white-space: nowrap !important;
        text-decoration: none !important;
        transition: all 0.2s ease !important;
        box-sizing: border-box !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .header-wallet-pill svg,
    .header-wallet-pill i {
        width: 13px !important;
        height: 13px !important;
    }

    .header-wallet-pill:active {
        transform: scale(0.95);
    }

    /* Compact VIP Button on Mobile (32px) */
    .btn-vip-desktop {
        display: none !important;
    }

    .vip-text-desktop {
        display: none !important;
    }

    .vip-text-mobile {
        display: inline !important;
        font-weight: 800;
        font-size: 0.72rem !important;
    }

    .btn-vip-gold {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 8px !important;
        font-size: 0.72rem !important;
        gap: 4px !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .btn-vip-gold svg,
    .btn-vip-gold i {
        width: 13px !important;
        height: 13px !important;
    }

    /* Compact Login Button on Mobile (32px) */
    .login-text-desktop {
        display: none !important;
    }

    .login-text-mobile {
        display: inline !important;
        font-weight: 600;
        font-size: 0.72rem !important;
    }

    .btn-login {
        height: 32px !important;
        min-height: 32px !important;
        max-height: 32px !important;
        padding: 0 8px !important;
        font-size: 0.72rem !important;
        gap: 4px !important;
        border-radius: 16px !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .btn-login svg,
    .btn-login i {
        width: 13px !important;
        height: 13px !important;
    }

    /* User Avatar & Dropdown Wrap (32px) */
    .user-dropdown-wrap {
        height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }

    .user-avatar-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        border-radius: 50% !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
    }

    .user-avatar-btn img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
        display: block !important;
    }

    .user-avatar-btn svg,
    .user-avatar-btn i {
        width: 15px !important;
        height: 15px !important;
    }

    /* Compact Mobile Hamburger Menu (32px) */
    .btn-mobile-menu {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.06) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        color: #cbd5e1 !important;
        box-sizing: border-box !important;
    }

    .btn-mobile-menu svg,
    .btn-mobile-menu i {
        width: 17px !important;
        height: 17px !important;
    }

    /* Mobile Bottom Navigation Bar (SabayFlix Style) */
    .mobile-bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 990;
        height: 56px;
        background: rgba(11, 15, 23, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.7);
        align-items: center;
        justify-content: space-around;
        padding: 3px 6px calc(3px + env(safe-area-inset-bottom, 6px)) 6px;
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        text-decoration: none;
        color: #94a3b8;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 4px 0;
        transition: color 0.15s ease, transform 0.15s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item .bottom-nav-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        transition: transform 0.15s ease;
    }

    .bottom-nav-item .bottom-nav-icon i,
    .bottom-nav-item .bottom-nav-icon svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.2;
    }

    .bottom-nav-item .bottom-nav-label {
        font-size: 0.68rem;
        font-weight: 500;
        line-height: 1;
        letter-spacing: -0.2px;
        transition: color 0.15s ease;
        white-space: nowrap;
    }

    /* Active Item - SabayFlix Red Glow */
    .bottom-nav-item.active {
        color: #e50914;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        transform: translateY(-2px);
    }

    .bottom-nav-item.active .bottom-nav-icon i,
    .bottom-nav-item.active .bottom-nav-icon svg {
        stroke: #e50914;
        filter: drop-shadow(0 2px 8px rgba(229, 9, 20, 0.6));
    }

    .bottom-nav-item.active .bottom-nav-label {
        color: #e50914;
        font-weight: 700;
    }

    .bottom-nav-item:active {
        transform: scale(0.92);
    }
}

@media (max-width: 640px) {
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.65rem;
    }

    .section-title {
        font-size: 1.15rem;
        margin-bottom: 0.75rem;
    }

    .movie-card .movie-title {
        font-size: 0.82rem;
        line-height: 1.25;
        margin-top: 6px;
    }

    .movie-card .movie-meta {
        font-size: 0.7rem;
    }

    /* Hero Banner Mobile Scaling */
    .hero-slider-section {
        min-height: 390px;
        height: 52vh;
    }

    .hero-content {
        padding-bottom: 1rem;
    }

    .hero-badges {
        gap: 4px;
        margin-bottom: 0.4rem;
    }

    .badge-tag,
    .badge-rating {
        font-size: 0.68rem !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
    }

    .badge-rating i,
    .badge-rating svg,
    .badge-tag i,
    .badge-tag svg {
        width: 12px !important;
        height: 12px !important;
    }

    .hero-title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 0.3rem;
    }

    .hero-original-title {
        font-size: 0.8rem;
        margin-bottom: 0.35rem;
    }

    .hero-meta {
        font-size: 0.72rem;
        gap: 8px;
        margin-bottom: 0.45rem;
    }

    .hero-meta span i,
    .hero-meta span svg {
        width: 13px !important;
        height: 13px !important;
    }

    .hero-desc {
        font-size: 0.78rem;
        line-height: 1.4;
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-actions {
        gap: 6px;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 6px 11px;
        font-size: 0.78rem;
        border-radius: 6px;
        gap: 5px;
    }

    .hero-actions i,
    .hero-actions svg {
        width: 15px !important;
        height: 15px !important;
    }

    .hero-btn-watch .btn-text-full {
        display: none;
    }

    .hero-btn-watch .btn-text-short {
        display: inline;
    }

    .hero-btn-trailer .btn-text-full {
        display: none;
    }

    .hero-btn-trailer .btn-text-short {
        display: inline;
    }

    /* Quality Notice Bar */
    .quality-feature-bar {
        padding: 8px 10px !important;
        margin-top: 1rem !important;
        gap: 6px !important;
    }

    .quality-feature-item {
        font-size: 0.75rem !important;
        gap: 6px !important;
    }

    .quality-feature-item i,
    .quality-feature-item svg {
        width: 16px !important;
        height: 16px !important;
    }

    .quality-feature-item span {
        font-size: 0.75rem !important;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .vip-promo-card {
        flex-direction: column;
        text-align: center;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-brand {
        font-size: 1.05rem;
    }

    .logo-brand .brand-badge {
        font-size: 0.68rem;
        padding: 1px 5px;
    }

    .hero-title {
        font-size: 1.25rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 5px 9px;
        font-size: 0.75rem;
    }
}

/* ==============================================================================
   User Avatar & Dropdown Menu (Matching User Upload Image 3)
   ============================================================================== */
.user-dropdown-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
}

.user-avatar-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    background: #374151;
    color: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-fast);
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
}

.user-avatar-btn:hover {
    background: #4b5563;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.user-dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 175px;
    background: #121622;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
    padding: 6px;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
}

.user-dropdown-wrap:hover .user-dropdown-menu,
.user-dropdown-wrap.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #e5e7eb;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.user-dropdown-item.text-danger:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 5px 0;
}

/* ==============================================================================
   Profile Header & History Table (Matching User Upload Images 1 & 2)
   ============================================================================== */
.profile-header-card {
    background: #111420;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1.6fr 1.2fr 0.9fr 0.9fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.profile-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.profile-avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #252b3d;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

.profile-user-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.profile-user-id {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.profile-stat-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-main-text {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.stat-sub-text {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 3px;
}

.stat-icon-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-circle.bg-red-icon {
    background: #dc2626;
    color: #fff;
    box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
}

/* Sub-nav Tabs */
.profile-nav-tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
    padding-bottom: 2px;
}

.profile-nav-tab {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 10px 4px;
    position: relative;
    transition: color var(--transition-fast);
}

.profile-nav-tab:hover {
    color: #fff;
}

.profile-nav-tab.active {
    color: #fff;
}

.profile-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Panel & Table */
.profile-content-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.panel-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.profile-table th {
    padding: 12px 14px;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-table td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: #d1d5db;
}

.profile-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.txn-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #e50914;
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.txn-type-badge {
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
}

.txn-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.txn-action-btn:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.table-pagination-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1.5rem;
}

.page-arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: default;
}

.page-num-active {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(229, 9, 20, 0.2);
    color: var(--primary);
    border: 1px solid rgba(229, 9, 20, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 1024px) {
    .profile-header-card {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .profile-header-card {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
}
