/* ===== RESET & VARIABLES ===== */
:root {
    --bg-main: #0b1220;
    --bg-card: #111827;
    --bg-hover: #1f2937;
    --bg-sidebar: #0f172a;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --border-color: #1e293b;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-purple: #7c3aed;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER & NAVBAR ===== */
.header {
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo i {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    display: flex;
    flex: 1;
    max-width: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-box button {
    padding: 12px 20px;
    background: var(--accent-blue);
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover {
    background: var(--accent-blue-hover);
}

.user-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.user-actions a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.user-actions a:hover {
    background: var(--bg-hover);
    color: white;
    border-color: var(--accent-blue);
}

.welcome {
    color: var(--text-primary);
    font-weight: 500;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    padding: 8px 16px;
    border-radius: var(--radius-sm);
}

/* Balance & Topup */
.balance-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
}

.balance-display {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    padding: 5px 15px;
    border-radius: 30px;
    color: #000;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.btn-topup {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: 30px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.2s;
}

.btn-topup:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
}

/* Navbar */
.navbar {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-menu li a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.nav-menu li.active a,
.nav-menu li a:hover {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 40px 0;
    min-height: calc(100vh - 300px);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--bg-card);
    padding: 16px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.breadcrumb li a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb li a:hover {
    color: var(--accent-blue);
}

.breadcrumb li i {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 60px 0;
    text-align: center;
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
}

/* Section Title */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-blue);
    padding-bottom: 10px;
    display: inline-block;
}

/* Game Categories */
.game-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    padding: 30px 20px;
    border: 1px solid var(--border-color);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-blue);
}

.game-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--accent-blue);
}

.game-card h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.9;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-view, .btn-buy {
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-view {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-view:hover {
    background: var(--accent-blue);
    color: white;
}

.btn-buy {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
}

.btn-buy:hover {
    opacity: 0.9;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent-blue);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.product-card h3 {
    padding: 16px 16px 8px;
    font-size: 18px;
    color: var(--text-primary);
}

.product-card .rank {
    padding: 0 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.product-card .price {
    padding: 8px 16px;
    color: var(--accent-blue);
    font-size: 20px;
    font-weight: 700;
}

.product-card .old-price {
    padding: 0 16px;
    color: var(--text-secondary);
    text-decoration: line-through;
    font-size: 14px;
}

.card-actions {
    padding: 16px;
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Content Wrapper (cho trang games) */
.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Filter Sidebar */
.filter-sidebar {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.filter-title {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group h4 {
    margin-bottom: 12px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
}

/* Custom radio animation */
.filter-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-blue);
    border-radius: 50%;
    outline: none;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}

.filter-options input[type="radio"]:checked {
    border-color: var(--accent-blue);
    animation: radioPulse 0.3s ease-out;
}

.filter-options input[type="radio"]:checked::before {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    background: var(--accent-blue);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: radioFade 0.2s ease-out;
}

@keyframes radioPulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes radioFade {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.apply-filter-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.apply-filter-btn:hover {
    opacity: 0.9;
}

/* Sort Bar */
.sort-bar {
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sort-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-options label {
    color: var(--text-secondary);
}

.sort-options select {
    padding: 8px 12px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link {
    display: block;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover,
.page-item.active .page-link {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border-color: transparent;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    position: relative;
}

.close {
    color: var(--text-secondary);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 24px;
    top: 16px;
    transition: color 0.2s;
}

.close:hover {
    color: var(--accent-blue);
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Auth Container (cho login/register) */
.auth-container {
    max-width: 420px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease-out;
}

.auth-container:hover {
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.2);
    border-color: var(--accent-blue);
}

.auth-container h2 {
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    width: 100%;
}

.auth-container .form-group {
    margin-bottom: 20px;
    position: relative;
}

.auth-container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-container .form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-hover);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s;
    outline: none;
}

.auth-container .form-group input:focus {
    border-color: var(--accent-blue);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.auth-container .btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.auth-container .btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.auth-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.auth-container .btn-primary:hover::before {
    left: 100%;
}

.auth-container .flash-message {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid #dc2626;
    animation: shake 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.auth-link {
    text-align: center;
    margin-top: 25px;
    color: var(--text-secondary);
    font-size: 15px;
}

.auth-link a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.2s;
}

.auth-link a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    transition: width 0.3s;
}

.auth-link a:hover {
    color: var(--accent-purple);
}

.auth-link a:hover::after {
    width: 100%;
}

/* ===== ADMIN DASHBOARD ===== */
.admin-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border-color: transparent;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--accent-blue);
}

.stat-card h3 {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
}

.stat-card p {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Tables */
.orders-table,
.revenue-table,
.accounts-table,
.customers-table,
.topups-table,
.discounts-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.orders-table th,
.revenue-table th,
.accounts-table th,
.customers-table th,
.topups-table th,
.discounts-table th {
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 16px;
    text-align: left;
    font-size: 14px;
}

.orders-table td,
.revenue-table td,
.accounts-table td,
.customers-table td,
.topups-table td,
.discounts-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.orders-table tr:hover,
.revenue-table tr:hover,
.accounts-table tr:hover,
.customers-table tr:hover,
.topups-table tr:hover,
.discounts-table tr:hover {
    background: var(--bg-hover);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid #f59e0b;
}

.status-success,
.status-completed,
.status-delivered {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid #10b981;
}

.status-failed,
.status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid #ef4444;
}

.status-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid #3b82f6;
}

/* Buttons in admin */
.btn-approve {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.btn-reject {
    background: #dc2626;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

.btn-delete {
    background: #dc2626;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

.btn-edit {
    background: var(--accent-blue);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
}

/* Quick Stats */
.quick-stats {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.quick-stats h3 {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 15px;
}

.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.quick-stat-item {
    text-align: center;
}

.quick-stat-item .label {
    color: var(--text-secondary);
    font-size: 13px;
}

.quick-stat-item .value {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.filter-bar .form-control {
    width: auto;
    min-width: 150px;
    background: var(--bg-hover);
}

/* Customer info card */
.customer-info {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

/* ===== PROFILE PAGE ===== */
.user-info-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.user-info-card p {
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.user-info-card strong {
    color: var(--text-primary);
    width: 150px;
    display: inline-block;
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--bg-sidebar);
    color: var(--text-secondary);
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section ul li a:hover {
    color: var(--accent-blue);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.social-links {
    display: flex;
    gap: 16px;
    margin-top: 20px;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 22px;
    transition: color 0.2s;
}

.social-links a:hover {
    color: var(--accent-blue);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

/* ===== ANIMATIONS ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 2s linear infinite;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* ===== RESPONSIVE ===== */
/* Header mobile */
@media (max-width: 768px) {
    .header {
        padding: 8px 0;
    }
    .header-content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
    }
    .logo a {
        font-size: 18px;
    }
    .logo i {
        font-size: 20px;
    }
    .user-actions {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .balance-container {
        margin-right: 0;
        width: auto;
    }
    .balance-display {
        padding: 3px 8px;
        font-size: 12px;
    }
    .btn-topup {
        padding: 3px 8px;
        font-size: 12px;
    }
    .user-actions a {
        padding: 4px 8px;
        font-size: 12px;
    }
    .welcome {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Filter toggle & mobile adjustments */
.filter-toggle {
    display: none;
    margin-bottom: 15px;
}

.btn-filter-toggle {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-filter-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.filter-sidebar {
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .filter-toggle {
        display: block;
    }
    .filter-sidebar {
        display: none;
        margin-bottom: 20px;
    }
    .filter-sidebar.active {
        display: block;
        animation: slideDown 0.3s ease;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }
    .product-card .card-actions {
        flex-direction: column;
    }
    .product-card .btn-view,
    .product-card .btn-buy {
        width: 100%;
        margin: 2px 0;
    }
    .hero-section h1 {
        font-size: 28px;
    }
    .hero-section p {
        font-size: 16px;
    }
    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 20px;
    }
    .auth-container {
        padding: 30px 20px;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .contact-info li {
        justify-content: center;
    }
    .social-links {
        justify-content: center;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 220px 1fr;
        gap: 20px;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* VietQR & Topup */
#vietqrImage {
    max-width: 200px;
    border-radius: var(--radius-md);
    margin: 10px auto;
    display: block;
}

.transfer-code-box {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-hover);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin: 10px 0;
}

.transfer-code {
    font-family: monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-blue);
}

/* Spin wheel */
#wheelCanvas {
    max-width: 100%;
    height: auto;
    margin: 15px auto;
    display: block;
}

#spinBtn {
    margin: 15px 0;
}

#spinResult {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-blue);
    margin: 10px 0;
}

/* Discount input group */
.discount-input-group {
    display: flex;
    gap: 5px;
}

.btn-apply {
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

#quantity {
    max-width: 100px;
}

#totalPrice {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-blue);
}

/* FAB for spin */
#spin-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    transition: transform 0.2s;
}

#spin-fab:hover {
    transform: scale(1.1);
}

/* Modal waiting */
#topupWaitingModal .modal-content {
    max-width: 450px;
}

#topupWaitingInfo p {
    margin-bottom: 8px;
    font-size: 14px;
}