/* ===== QBet Casino - Dark Casino Theme ===== */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-card-hover: #222845;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-glow: rgba(245, 158, 11, 0.3);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gradient-hero: linear-gradient(135deg, #0a0e1a 0%, #1a0533 50%, #0a0e1a 100%);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent); color: #000; }

/* ===== Navbar ===== */
.navbar {
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 0;
    z-index: 1050;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand .bi { font-size: 1.25rem; }

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent) !important;
    background: rgba(245, 158, 11, 0.1);
}

.text-accent { color: var(--accent) !important; }

.btn-accent {
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    transition: var(--transition);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-outline-accent {
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    background: transparent;
    transition: var(--transition);
}

.btn-outline-accent:hover {
    background: var(--accent);
    color: #000;
}

.btn-balance {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    font-weight: 700;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-balance:hover { background: rgba(245, 158, 11, 0.25); color: var(--accent); }

.btn-user {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-user:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.dropdown-menu-dark {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.dropdown-item { color: var(--text-secondary); padding: 0.6rem 1rem; }
.dropdown-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.dropdown-item i { margin-right: 0.5rem; }

/* ===== Hero Banner ===== */
.hero {
    background: var(--gradient-hero);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--accent);
}

.hero-stat .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-visual {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card-stack {
    position: relative;
    width: 320px;
    height: 380px;
}

.hero-game-card {
    position: absolute;
    width: 200px;
    height: 260px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    transition: var(--transition);
}

.hero-game-card:nth-child(1) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    transform: rotate(-12deg) translateX(-30px);
    z-index: 1;
}

.hero-game-card:nth-child(2) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    transform: rotate(0deg);
    z-index: 2;
    left: 60px;
    top: 20px;
}

.hero-game-card:nth-child(3) {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    transform: rotate(12deg) translateX(30px);
    z-index: 3;
    left: 120px;
    top: 40px;
}

/* ===== Section Styles ===== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-title h2 {
    font-weight: 800;
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title h2 i { color: var(--accent); font-size: 1.25rem; }

.btn-see-all {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-see-all:hover { color: var(--accent); }

/* ===== Game Cards ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1rem;
}

.game-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    aspect-ratio: 3/4;
}

.game-card-bg {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.game-card-bg .game-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.game-card-bg .game-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    line-height: 1.2;
}

.game-card-bg .game-provider {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.25rem;
}

.game-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    gap: 0.5rem;
}

.game-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.game-card:hover .overlay { opacity: 1; }

.play-btn {
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.play-btn:hover { transform: scale(1.1); }

.overlay .game-label {
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ===== Category Tabs ===== */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.cat-tab:hover, .cat-tab.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

/* ===== Promotions ===== */
.promo-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.promo-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.promo-card .promo-amount {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.promo-card .promo-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.promo-card .promo-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.promo-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

/* ===== Winners Ticker ===== */
.winner-ticker {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    overflow: hidden;
}

.ticker-wrapper {
    display: flex;
    gap: 2rem;
    animation: ticker 30s linear infinite;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #fff;
}

.ticker-info .ticker-name { font-weight: 600; font-size: 0.85rem; }
.ticker-info .ticker-game { font-size: 0.75rem; color: var(--text-muted); }
.ticker-amount { color: var(--success); font-weight: 700; font-size: 0.9rem; }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== Auth Forms ===== */
.auth-container {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-card h2 {
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.form-control, .form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-muted); }

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

.input-group-text {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-submit {
    width: 100%;
    padding: 0.8rem;
    font-weight: 700;
    font-size: 1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

/* ===== Dashboard ===== */
.dashboard-balance {
    background: linear-gradient(135deg, #1a0533 0%, #0f172a 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dashboard-balance::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.balance-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.quick-action {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    transition: var(--transition);
    color: var(--text-primary);
    display: block;
}

.quick-action:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.quick-action i {
    font-size: 1.75rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

.quick-action span {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ===== Cards ===== */
.dark-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.dark-card h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark-card h5 i { color: var(--accent); }

/* ===== Tables ===== */
.dark-table {
    width: 100%;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.dark-table thead th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.dark-table tbody td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    vertical-align: middle;
}

.dark-table tbody tr:hover { background: rgba(245, 158, 11, 0.03); }
.dark-table tbody tr:last-child td { border-bottom: none; }

/* ===== Payment Methods ===== */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.payment-method {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.payment-method:hover { border-color: var(--text-muted); }

.payment-method.selected {
    border-color: var(--accent);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.payment-method .pm-icon {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
    display: block;
}

.payment-method .pm-name {
    font-weight: 600;
    font-size: 0.8rem;
}

.payment-method .check-mark {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    background: var(--accent);
    color: #000;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.payment-method.selected .check-mark { display: flex; }

/* ===== Game Play Page ===== */
.game-screen {
    background: #000;
    border-radius: var(--radius);
    aspect-ratio: 16/9;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.game-screen::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(245,158,11,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139,92,246,0.03) 0%, transparent 50%);
}

.game-screen .spinner-ring {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.game-screen .connect-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.game-screen .connect-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.game-screen .game-title-overlay {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Tabs ===== */
.dark-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.dark-tab {
    flex: 1;
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: none;
}

.dark-tab:hover { color: var(--text-primary); background: var(--bg-card-hover); }

.dark-tab.active {
    color: var(--accent);
    background: rgba(245, 158, 11, 0.1);
    border-bottom: 2px solid var(--accent);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.empty-state p { font-size: 0.9rem; }

/* ===== Payment Badge ===== */
.payment-badge {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.site-footer h5, .site-footer h6 {
    color: var(--text-primary);
    font-weight: 700;
}

.site-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.site-footer a:hover { color: var(--accent); }
.site-footer ul li { margin-bottom: 0.4rem; }

/* ===== Profile ===== */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #fbbf24);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    margin: 0 auto 1rem;
}

/* ===== Pagination ===== */
.page-link {
    background: var(--bg-card);
    border-color: var(--border);
    color: var(--text-secondary);
}

.page-link:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
    color: var(--accent);
}

.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

/* ===== Alerts ===== */
.alert {
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    border: none;
}

/* ===== Badge ===== */
.badge { font-weight: 600; font-size: 0.75rem; padding: 0.35em 0.65em; border-radius: 6px; }

/* ===== Search ===== */
.search-box {
    position: relative;
}

.search-box input {
    padding-left: 2.5rem;
}

.search-box .search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-card-stack { display: none; }
    .hero-stats { gap: 1.5rem; }
    .game-grid { grid-template-columns: repeat(3, 1fr); }
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
    .navbar-collapse { padding: 1rem 0; }
}

@media (max-width: 575.98px) {
    .hero { padding: 3rem 0 2rem; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { flex-wrap: wrap; gap: 1rem; }
    .game-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .quick-actions { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
    .payment-methods { grid-template-columns: repeat(3, 1fr); }
    .section-title h2 { font-size: 1.2rem; }
    .auth-card { padding: 1.5rem; }
    .balance-amount { font-size: 2.25rem; }
    .category-tabs { gap: 0.35rem; }
    .cat-tab { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
}
