/* ═══════════════════════════════════════════════
   AS Global — Red & White Premium Theme
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Russo+One&display=swap');

:root {
    --as-primary: #00BFFF;
    --as-red-900: #003d5c;
    --as-red-800: #005480;
    --as-red-700: #0077b6;
    --as-red-600: #0096cc;
    --as-red-500: #00BFFF;
    --as-red-400: #33ccff;
    --as-red-100: #e0f7ff;
    --as-red-50: #f0fbff;
    --as-dark: #1a1a2e;
    --as-dark-2: #16213e;
    --as-gray-50: #f8f9fa;
    --as-gray-100: #f1f3f5;
    --as-gray-200: #e9ecef;
    --as-gray-500: #adb5bd;
    --as-gray-700: #495057;
    --as-gray-900: #212529;
    --as-white: #ffffff;
    --as-gold: #f59e0b;
    --as-gradient: linear-gradient(135deg, var(--as-red-700) 0%, var(--as-red-900) 100%);
    --as-gradient-light: linear-gradient(135deg, var(--as-red-500) 0%, var(--as-red-700) 100%);
    --as-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --as-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --as-shadow-primary: 0 4px 14px 0 rgba(0, 191, 255, 0.39);
    --as-radius: 0.75rem;
    --as-radius-sm: 0.5rem;
    --as-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ─────────────────────────────────── */

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--as-gray-50);
    color: var(--as-gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

main {
    flex: 1;
    background: linear-gradient(180deg, #E4F0FF 0%, #0054B2 100%);
}

a {
    color: var(--as-red-600);
    text-decoration: none;
    transition: var(--as-transition);
}

a:hover {
    color: var(--as-red-800);
}

/* ═══════════════════════════════════════════════
   HEADER — Unified Slanted Theme
   ═══════════════════════════════════════════════ */

.as-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    background: transparent;
    padding: 1.25rem 2rem 0; /* Add top, left, right margin from screen edge */
    transition: filter 0.3s ease;
}

.as-header.as-header-scrolled {
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.15));
}

.as-header-main {
    display: flex;
    align-items: stretch;
    height: 64px;
    position: relative;
    max-width: 1600px;
    margin: 0 auto;
}

/* ─── Brand Area (Blue Slant with < left edge) ─── */
.as-header-brand-area {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 1.5rem 0 1.5rem;
    z-index: 1; /* Lower than white area to allow dropdowns to overlap */
}
.as-header-brand-area::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: #00BFFF; /* Capri Blue */
    /* | on left, < on right */
    clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 50%, 100% 100%, 0 100%);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    z-index: -1;
}
.as-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.as-brand-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
}

/* ─── White Area (Nav + Utils) ─── */
.as-header-white-area {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2; /* Higher than brand area */
    padding: 0 2rem 0 2rem;
    margin-left: -15px;
}
.as-header-white-area::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    background: var(--as-white);
    /* < on left, > on right. Overlap by 1px to ensure sharpness */
    clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 15px 100%, 0px 50%);
    z-index: -1;
}


/* ─── Action Area (Slanted Buttons) ─── */
.as-header-action-area {
    position: relative;
    display: flex;
    align-items: stretch;
    margin-left: -16px; /* Increased overlap from -15px to fix 1px gap */
    z-index: 1;
}

.as-btn-shop, .as-btn-recharge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: var(--as-transition);
}

.as-btn-shop {
    background: #FFD700; /* Gold */
    color: #000 !important;
    padding: 0 1.5rem 0 2rem;
    /* Left side starts at -1px to ensure overlap with White area */
    clip-path: polygon(-1px 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, -1px 100%, 15px 50%);
}

.as-btn-recharge {
    background: #00BFFF; /* Blue */
    color: #fff !important;
    margin-left: -16px; /* Increased overlap */
    padding: 0 2rem 0 2.5rem;
    /* Left side starts at -1px to ensure overlap with Shop area */
    clip-path: polygon(-1px 0, 100% 0, 100% 100%, -1px 100%, 15px 50%);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.as-btn-shop:hover {
    background: #FFEA00;
    transform: scale(1.02);
    z-index: 2;
}

.as-btn-recharge:hover {
    background: #33ccff;
    transform: scale(1.02);
    z-index: 2;
}

/* ─── Navigation Links ─── */
.as-nav-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0; padding: 0; list-style: none;
}
.as-nav-link {
    display: flex;
    align-items: center;
    color: #1e3a8a !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    text-decoration: none;
    transition: var(--as-transition);
    position: relative;
}
.as-nav-link:hover, .as-nav-link.active {
    color: #00BFFF !important;
}

/* Badge (HOT) */
.as-nav-badge {
    position: absolute;
    top: -7px;
    right: -4px;
    font-size: 0.55rem;
    font-weight: 800;
    background: #ef4444;
    color: var(--as-white);
    padding: 0.15rem 0.3rem;
    border-radius: 4px;
    letter-spacing: 0.4px;
}
.as-nav-golden {
    color: #f59e0b !important;
}
.as-nav-golden:hover {
    color: #fbbf24 !important;
}

/* ─── Utilities ─── */
.as-header-utils {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.as-search-btn {
    color: #1e3a8a;
    font-size: 1.1rem;
    padding: 0.4rem;
    transition: var(--as-transition);
}
.as-search-btn:hover {
    color: #00BFFF;
}

.as-lang-btn, .as-user-pill {
    background: transparent;
    border: none;
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.4rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: var(--as-transition);
}
.as-lang-btn:hover, .as-user-pill:hover {
    color: #00BFFF;
}
.as-lang-btn::after, .as-user-pill::after {
    display: none;
}
.as-lang-code {
    font-size: 0.8rem;
    opacity: 0.8;
}

.as-topbar-login, .as-topbar-register {
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    transition: var(--as-transition);
}
.as-topbar-login:hover, .as-topbar-register:hover {
    color: #00BFFF;
}
.as-topbar-register {
    border: 2px solid #1e3a8a;
    border-radius: 20px;
}
.as-topbar-register:hover {
    border-color: #00BFFF;
}

/* Dropdowns */
.as-dropdown {
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius-sm);
    box-shadow: var(--as-shadow-lg);
    padding: 0.4rem;
    min-width: 160px;
    margin-top: 0.75rem !important;
}
.as-dropdown .dropdown-item {
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    color: var(--as-gray-700);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--as-transition);
}
.as-dropdown .dropdown-item:hover {
    background: var(--as-gray-100);
    color: #1e3a8a;
}
.as-dropdown .dropdown-item.as-dd-active {
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 600;
}
.as-user-dropdown {
    min-width: 220px;
}
.as-dropdown-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    pointer-events: none;
}
.as-avatar-md {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #00BFFF;
    color: var(--as-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}
.as-dd-username { font-weight: 700; font-size: 0.9rem; color: var(--as-gray-900); }
.as-dd-role { color: var(--as-gray-500); font-size: 0.78rem; }
.as-dropdown-danger { color: var(--as-red-600) !important; }
.as-dropdown-danger:hover { background: var(--as-red-50) !important; color: var(--as-red-700) !important; }

/* Hamburger */
.as-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.as-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
}
.as-hamburger span {
    display: block;
    height: 3px;
    background: #1e3a8a;
    border-radius: 2px;
}


/* Responsive */
@media (max-width: 991px) {
    .as-header-brand-area { padding-right: 1rem; }
    .as-header-white-area { padding-left: 1rem; padding-right: 1rem; }
    .as-header-white-area::before {
        clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%, 0px 50%);
        border-top-right-radius: 16px;
        border-bottom-right-radius: 16px;
    }
    .as-header-action-area { display: none; /* Hide yellow action area on mobile to save space */ }
    
    .as-nav-toggle { display: block; margin-left: 16px; } /* Keep it on the left but push utils to the right */
    
    .as-nav-collapse {
        position: absolute;
        top: calc(100% + 2px); /* Space below the header */
        right: 0;
        min-width: 260px; /* Give it a nice width */
        z-index: 1000;
        /* Visual styles moved to .as-nav-list to prevent jerkiness during Bootstrap collapse */
    }
    
    @keyframes dropDown {
        from { opacity: 0; transform: translateY(-10px) scale(0.95); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
    
    .as-nav-collapse.show { display: block !important; }
    
    .as-nav-list { 
        display: flex;
        flex-direction: column; 
        width: 100%; 
        align-items: stretch; 
        gap: 4px; 
        
        background: var(--as-white);
        box-shadow: 0 12px 36px rgba(0,0,0,0.15);
        border-radius: 16px;
        padding: 0.75rem;
        border: 1px solid var(--as-gray-200);
        transform-origin: top left;
        animation: dropDown 0.2s ease-out forwards;
    }
    
    .as-nav-link { padding: 0.8rem 1.2rem; border-radius: 10px; font-size: 1rem; }
    .as-nav-link:hover { background: var(--as-gray-100); }
    .as-nav-link .as-nav-badge { position: static; margin-left: auto; }
}

/* ─── Main Content ─────────────────────────── */

main {
    flex: 1;
}

.as-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 1rem 2rem; /* Offset for fixed header + standard padding */
}

/* ─── Cards ────────────────────────────────── */

.as-card {
    background: var(--as-white);
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    transition: var(--as-transition);
    overflow: hidden;
}

.as-card:hover {
    box-shadow: var(--as-shadow-lg);
    transform: translateY(-2px);
}

.as-card-header {
    background: var(--as-gray-50);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--as-gray-200);
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.as-card-header i {
    color: var(--as-red-600);
}

.as-card-body {
    padding: 1.5rem;
}

/* ─── Auth Pages ───────────────────────────── */

.as-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 1rem 2rem;
    background: var(--as-gradient);
    position: relative;
    overflow: hidden;
}

.as-auth-wrapper::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.as-auth-wrapper::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    bottom: -80px;
    left: -80px;
}

.as-auth-card {
    background: var(--as-white);
    border-radius: var(--as-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.as-auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.as-auth-logo h2 {
    font-weight: 800;
    color: var(--as-red-700);
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.as-auth-logo p {
    color: var(--as-gray-500);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* ─── Forms ────────────────────────────────── */

.as-form-group {
    margin-bottom: 1.25rem;
}

.as-form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--as-gray-700);
    margin-bottom: 0.4rem;
    display: block;
}

.as-form-control {
    border: 2px solid var(--as-gray-200);
    border-radius: var(--as-radius-sm);
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    transition: var(--as-transition);
    width: 100%;
    background: var(--as-white);
}

.as-form-control:focus {
    border-color: var(--as-red-400);
    box-shadow: 0 0 0 3px var(--as-red-100);
    outline: none;
}

.as-form-control.is-invalid {
    border-color: var(--as-red-500);
}

/* ─── Buttons ──────────────────────────────── */

.as-btn {
    border: none;
    border-radius: var(--as-radius-sm);
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--as-transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    /* Prevent button width changes during countdown */
    white-space: nowrap;
}

.as-btn-primary {
    background: var(--as-gradient-light);
    color: var(--as-white);
    box-shadow: var(--as-shadow-primary);
}

.as-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 var(--as-red-500);
    color: var(--as-white);
}

.as-btn-primary:active {
    transform: translateY(0);
}

.as-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.as-btn-outline {
    background: transparent;
    color: var(--as-red-600);
    border: 2px solid var(--as-red-400);
}

.as-btn-outline:hover {
    background: var(--as-red-50);
    border-color: var(--as-red-400);
    color: var(--as-red-700);
}

.as-btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

.as-btn-block {
    width: 100%;
}

/* ─── Sidebar (Account) ───────────────────── */

.as-sidebar {
    background: var(--as-white);
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius);
    box-shadow: var(--as-shadow);
    overflow: hidden;
}

.as-sidebar-header {
    background: var(--as-gradient);
    padding: 1.5rem;
    color: var(--as-white);
    text-align: center;
}

.as-sidebar-header .avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.as-sidebar-header h6 {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

.as-sidebar-header small {
    opacity: 0.8;
    font-size: 0.8rem;
}

.as-sidebar-nav {
    padding: 0.5rem;
}

.as-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--as-gray-700);
    border-radius: var(--as-radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--as-transition);
    text-decoration: none;
}

.as-sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.as-sidebar-link:hover {
    background: var(--as-red-50);
    color: var(--as-red-700);
}

.as-sidebar-link.active {
    background: var(--as-red-100);
    color: var(--as-red-700);
    font-weight: 600;
}

.as-sidebar-divider {
    border-top: 1px solid var(--as-gray-200);
    margin: 0.25rem 0.75rem;
}

/* ─── Tables ───────────────────────────────── */

.as-table {
    width: 100%;
    border-collapse: collapse;
}

.as-table thead th {
    background: var(--as-gray-50);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--as-gray-500);
    padding: 0.85rem 1rem;
    border-bottom: 2px solid var(--as-gray-200);
}

.as-table tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--as-gray-100);
    font-size: 0.9rem;
    vertical-align: middle;
}

.as-table tbody tr:hover {
    background: var(--as-red-50);
}

/* ─── Badges ───────────────────────────────── */

.as-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.as-badge-success {
    background: #dcfce7;
    color: #166534;
}

.as-badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.as-badge-danger {
    background: var(--as-red-100);
    color: var(--as-red-800);
}

.as-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ─── Stats Cards ──────────────────────────── */

.as-stat-card {
    background: var(--as-white);
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--as-transition);
}

.as-stat-card:hover {
    box-shadow: var(--as-shadow);
    transform: translateY(-2px);
}

.as-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.as-stat-icon.red {
    background: var(--as-red-100);
    color: var(--as-red-600);
}

.as-stat-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.as-stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.as-stat-icon.gold {
    background: #fef3c7;
    color: #d97706;
}

.as-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--as-gray-900);
}

.as-stat-label {
    font-size: 0.8rem;
    color: var(--as-gray-500);
    font-weight: 500;
}

/* ─── Alerts ───────────────────────────────── */

.as-alert {
    border-radius: var(--as-radius-sm);
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.as-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.as-alert-danger {
    background: var(--as-red-50);
    color: var(--as-red-800);
    border: 1px solid var(--as-red-100);
}

.as-alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

/* ─── Toast ────────────────────────────────── */

.as-toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.as-toast {
    background: var(--as-white);
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius-sm);
    box-shadow: var(--as-shadow-lg);
    padding: 1rem 1.25rem;
    min-width: 300px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
    font-size: 0.9rem;
}

.as-toast.success {
    border-left: 4px solid #16a34a;
}

.as-toast.error {
    border-left: 4px solid var(--as-red-600);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-10px); }
}

/* ─── Loading Spinner ──────────────────────── */

.as-spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.as-spinner-overlay.show {
    display: flex;
}

.as-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid var(--as-gray-200);
    border-top-color: var(--as-red-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Pagination ───────────────────────────── */

.as-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.as-pagination a,
.as-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--as-gray-200);
    border-radius: var(--as-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--as-gray-700);
    transition: var(--as-transition);
    text-decoration: none;
}

.as-pagination a:hover {
    background: var(--as-red-50);
    border-color: var(--as-red-300, #fca5a5);
    color: var(--as-red-700);
}

.as-pagination .active {
    background: var(--as-red-600);
    border-color: var(--as-red-600);
    color: var(--as-white);
}

.as-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ─── Hero / Landing ───────────────────────── */

.as-hero {
    min-height: 80vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 140px 1rem 80px;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: #000; /* Fallback black background */
}

.as-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.as-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}

.as-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.as-hero-title {
    font-family: 'Russo One', sans-serif;
    font-size: clamp(1.5rem, 6.2vw, 4rem);
    white-space: nowrap;
    font-weight: 400;
    color: #FFFFFF;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@media (max-width: 991px) {
    .as-hero {
        min-height: 500px; /* Thu nhỏ chiều cao trên mobile để ảnh không bị phóng quá to */
        padding: 120px 1rem 40px;
    }
    .as-hero-title {
        white-space: normal; /* Cho phép xuống dòng trên tablet/mobile để không bị cắt */
        font-size: 2.5rem;
        line-height: 1.1;
    }
}

@media (max-width: 576px) {
    .as-hero-title {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
}

.as-btn-download {
    background: #FDE047; /* Bright Yellow */
    color: #1e3a8a;
    padding: 1.1rem 4rem;
    font-size: 1.4rem;
    font-weight: 800;
    text-decoration: none !important;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.as-btn-download:hover {
    transform: translateY(-5px) scale(1.05);
    background: #facc15;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    color: #1e3a8a;
}

/* ─── Banner Carousel Section (New Layout) ─── */
.as-banner-section {
    background: linear-gradient(180deg, #0C1D38 0%, #254477 25%, #081B3C 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.as-banner-img-frame {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1), 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.as-banner-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.carousel-item:hover .as-banner-img {
    transform: scale(1.03);
}

.as-banner-info {
    color: #fff;
}

.as-banner-title {
    background: linear-gradient(180deg, #FEC336 1%, #FFDE91 56%, #FFCC64 85%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(2rem, 5vw, 35px);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.4;
    text-transform: uppercase;
    display: inline-block; /* Essential for background-clip: text in some cases */
}

.as-banner-desc {
    color: rgba(255,255,255,0.8);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.as-btn-join {
    background: #FDE047;
    color: #0a192f;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none !important;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(253, 224, 71, 0.3);
}

.as-btn-join:hover {
    background: #fff;
    color: #0a192f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

/* Custom Controls */
.carousel-control-prev-custom,
.carousel-control-next-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.carousel-control-prev-custom:hover,
.carousel-control-next-custom:hover {
    background: var(--as-primary);
    color: #fff;
    border-color: var(--as-primary);
}

.carousel-control-prev-custom { left: -60px; }
.carousel-control-next-custom { right: -60px; }

/* Custom Indicators */
.carousel-indicators.as-indicators {
    position: static;
    margin-top: 3rem;
    margin-bottom: 0;
    gap: 12px;
}

.carousel-indicators.as-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    opacity: 1; /* Override bootstrap default */
}

.carousel-indicators.as-indicators button.active {
    background: #FDE047;
    width: 25px;
    border-radius: 10px;
}

/* Responsive adjustments */
@@media (max-width: 1300px) {
    .carousel-control-prev-custom { left: -10px; }
    .carousel-control-next-custom { right: -10px; }
}

@@media (max-width: 991px) {
    .as-banner-info {
        text-align: center;
        margin-top: 2rem;
    }
    .as-banner-desc {
        margin-left: auto;
        margin-right: auto;
    }
    .carousel-control-prev-custom,
    .carousel-control-next-custom {
        display: flex;
        top: 30%; /* Căn giữa theo phần ảnh trên mobile */
        width: 40px;
        height: 40px;
    }
    .carousel-control-prev-custom { left: 0px; }
    .carousel-control-next-custom { right: 0px; }
}

.as-hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.as-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.as-btn-hero {
    background: var(--as-white);
    color: var(--as-red-700);
    font-weight: 700;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--as-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.as-btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: var(--as-red-800);
}

.as-btn-hero-outline {
    background: transparent;
    color: var(--as-white);
    border: 2px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    transition: var(--as-transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.as-btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--as-white);
}

.as-home-banner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 3rem;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    background: var(--as-gray-200) center/cover no-repeat;
    box-shadow: none;
    border: none;
}

@media (min-width: 768px) {
    .as-home-banner { 
        aspect-ratio: 21/9; 
        border-radius: 1.5rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.3);
        border: 4px solid rgba(255,255,255,0.2);
    }
}

/* ─── Bento Box Feature Grid ───────────────── */

.as-bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 2rem 1rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .as-bento-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: repeat(2, 200px);
        gap: 1.5rem;
    }
}

.as-bento-card {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    text-decoration: none !important;
    background: var(--as-gray-200);
    border: 3px solid var(--as-white);
    box-shadow: var(--as-shadow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: var(--as-white);
    min-height: 265px;
}

@media (min-width: 768px) {
    .as-bento-card {
        min-height: auto;
    }
}

.as-bento-bg {
    position: absolute;
    inset: 0;
    background-size: cover !important;
    background-position: center !important;
    transition: transform 0.5s ease;
    z-index: 1;
}

.as-bento-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    z-index: 2;
}

.as-bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.25);
    border-color: var(--as-red-400);
    color: var(--as-white);
}

.as-bento-card:hover .as-bento-bg {
    transform: scale(1.08);
}

.as-bento-content {
    position: relative;
    z-index: 3;
}

.as-bento-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.as-bento-icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.as-bento-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 0.5px;
}

/* Specific Grid Placements */
@media (min-width: 768px) {
    .bento-large {
        grid-column: span 2;
        grid-row: span 2;
    }
    .bento-large .as-bento-title {
        font-size: 2rem;
    }
    .bento-large .as-bento-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    .bento-regular {
        grid-column: span 1;
        grid-row: span 1;
    }
}


/* ─── Footer ───────────────────────────────── */

.as-footer {
    background: var(--as-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.85rem;
    margin-top: auto;
}

.as-footer a {
    color: rgba(255, 255, 255, 0.8);
}

.as-footer a:hover {
    color: var(--as-white);
}

/* ─── Empty State ──────────────────────────── */

.as-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--as-gray-500);
}

.as-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.as-empty h5 {
    font-weight: 600;
    color: var(--as-gray-700);
}

@media (max-width: 768px) {
    .as-hero h1 {
        font-size: 2rem;
    }

    .as-auth-card {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .as-card-body {
        padding: 1rem;
    }

    .as-table {
        font-size: 0.8rem;
    }

    .as-table thead th,
    .as-table tbody td {
        padding: 0.6rem 0.5rem;
    }
}

/* ─── Form Hint (helper text) ──────────────── */

.as-form-hint {
    font-size: 0.78rem;
    color: var(--as-gray-500);
    line-height: 1.4;
}

/* ─── Inline Alert Box ─────────────────────── */

.as-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--as-radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.25s ease;
}

.as-alert i {
    flex-shrink: 0;
    margin-top: 1px;
}

.as-alert-danger {
    background: var(--as-red-50);
    border: 1px solid var(--as-red-200, #fecaca);
    color: var(--as-red-700);
}

.as-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* ─── News Section (Facebook Grid) ─── */
.as-news-section {
    background: linear-gradient(180deg, #E4F0FF 0%, #0054B2 100%);
    position: relative;
}

.as-news-main-title {
    color: #0c1d38; /* Dark Blue title */
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.as-news-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.as-news-card-link:hover {
    transform: translateY(-8px);
}

.as-news-card {
    background: #0c1d38; /* Dark Navy background for the card body */
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.as-news-img-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.as-news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.as-news-card-link:hover .as-news-img {
    transform: scale(1.1);
}

.as-news-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.as-news-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
}

.as-news-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ─── Leaderboard Section ─── */
.as-leaderboard-section {
    background: url('/images/leaderboard/section-bg.webp') no-repeat center center;
    background-size: cover;
    color: #fff;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.as-leaderboard-title {
    background: linear-gradient(90deg, #FFC042 0%, #FFE29D 44%, #FFBA1A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    font-weight: 900;
    text-transform: uppercase;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    line-height: 60px;
}

.gold-star {
    font-size: 1.5rem;
    color: #ffcc00;
}

/* Filters */
.filter-label {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.as-filter-select {
    background: #000;
    border: 2px solid #5a4b3f;
    color: #fff;
    padding: 6px 30px 6px 15px;
    border-radius: 25px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ffcc00' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 10px) center;
}

/* Search */
.as-search-wrapper {
    position: relative;
    width: 100%;
}

.as-search-input {
    width: 100%;
    background: #000;
    border: 2px solid #5a4b3f;
    color: #fff;
    padding: 10px 45px 10px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
}

.as-search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #ffcc00;
    font-size: 1.1rem;
    padding: 5px 10px;
}

/* Podium */
.as-podium-container {
    position: relative;
    display: flex;
    justify-content: center;
    padding: 0;
    z-index: 1;
    pointer-events: none;
    margin-top: 0;
    margin-bottom: 0;
}

@media (min-width: 992px) and (max-width: 1399px) {
    .as-podium-container {
        margin-top: -100px;
        margin-bottom: -80px;
    }
}

@media (min-width: 1400px) {
    .as-podium-container {
        margin-top: -180px;
        margin-bottom: -150px;
    }
}

.as-podium-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
}

.as-podium-wrapper::before {
    content: '';
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(circle, #FFB200 0%, #FFE8B2 100%);
    filter: blur(60px);
    z-index: -1;
    opacity: 0.4;
    border-radius: 50%;
}

.podium-img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
}

.rank-overlay {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 130px;
    text-align: center;
    pointer-events: none;
}

.rank-badge {
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(90deg, #FFC042 0%, #FFE29D 44%, #FFBA1A 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.player-name-tag {
    background: linear-gradient(180deg, #ffde91 0%, #ffcc00 100%);
    color: #000;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 13px;
    font-size: 0.85rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    border: 1px solid #ffde91;
}

/* Updated positions to match the new image with confetti */
.rank-1-pos {
    bottom: 24%;
    left: 50%;
    transform: translateX(-50%);
}

.rank-2-pos {
    bottom: 18%;
    left: 24%;
    transform: translateX(-50%);
}

.rank-3-pos {
    bottom: 18%;
    left: 78%;
    transform: translateX(-50%);
}

.rank-1-pos .rank-badge {
    font-size: 5.5rem;
}

/* Table Card */
.as-leaderboard-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 204, 0, 0.2);
    border-radius: 15px;
    padding: 25px;
    backdrop-filter: blur(10px);
}

.as-leaderboard-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 15px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 204, 0, 0.2);
    --bs-table-bg: transparent;
}

.as-leaderboard-table thead th {
    background: linear-gradient(180deg, #ffcc00 0%, #ff9900 100%);
    color: #000;
    font-weight: 900;
    text-transform: uppercase;
    padding: 12px;
    border: none;
    text-align: center;
    font-size: 0.9rem;
}

.as-leaderboard-table tbody tr:nth-child(odd) {
    background: linear-gradient(90deg, #3B2900 0%, #58471F 100%);
}

.as-leaderboard-table tbody tr:nth-child(even) {
    background: linear-gradient(90deg, #060400 0%, #45330B 100%);
}

.as-leaderboard-table tbody tr {
    transition: all 0.3s ease;
}

.as-leaderboard-table td {
    background: transparent !important;
    color: #fff;
    padding: 12px 10px;
    border: none;
    border-bottom: 1px solid rgba(255, 204, 0, 0.05);
    vertical-align: middle;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.top-rank td {
    color: #ffcc00;
}

.rank-cell {
    font-weight: 800;
    font-size: 1.1rem;
}

.wr-badges {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.badge-blue {
    background: rgba(0, 84, 178, 0.8);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 45px;
}

/* Mobile Adjustments */
@media (max-width: 575px) {
    .rank-overlay { width: 75px !important; }
    .rank-badge { font-size: 2.2rem !important; }
    .rank-1-pos .rank-badge { font-size: 2.8rem !important; }
    .player-name-tag { font-size: 0.6rem !important; padding: 2px 6px !important; border-radius: 6px !important; }
    .rank-1-pos { bottom: 24% !important; }
    .rank-2-pos { bottom: 18% !important; left: 24% !important; }
    .rank-3-pos { bottom: 18% !important; left: 78% !important; }
}

/* ─── Footer ───────────────────────────────── */
.as-footer {
    background: var(--as-dark);
    padding: 3rem 0;
    color: var(--as-white);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.as-social-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--as-white);
    font-size: 1.25rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.as-social-btn:hover {
    transform: translateY(-5px);
    color: var(--as-white);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.as-social-btn.facebook:hover { background: #1877F2; border-color: #1877F2; }
.as-social-btn.youtube:hover { background: #FF0000; border-color: #FF0000; }
.as-social-btn.tiktok:hover { background: #000000; border-color: #000000; }
.as-social-btn.discord:hover { background: #5865F2; border-color: #5865F2; }
