:root {
    --bg-primary: #0A0E1A;
    --bg-secondary: #151B2E;
    --bg-card: #1E2740;
    --gold: #FFD700;
    --gold-dark: #FFA500;
    --text-primary: #FFFFFF;
    --text-secondary: #B8C5D6;
    --accent: #4A90E2;
    --success: #4CAF50;
    --danger: #F44336;
    --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-primary: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --text-primary: #1A1F36;
    --text-secondary: #4A5568;
    --shadow: rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.3); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.6); }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Navigation */
.navbar {
    background: var(--bg-secondary);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px var(--shadow);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-left {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.coin-logo {
    width: 40px;
    height: 40px;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-btn {
    color: var(--text-primary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}

.nav-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-btn:hover::after {
    width: 80%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance-badge {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.coin-icon-small {
    width: 24px;
    height: 24px;
}

.coin-icon-tiny {
    width: 20px;
    height: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s;
}

.user-info:hover {
    background: var(--bg-card);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.login-btn {
    background: #5865F2;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.icon-btn {
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.icon-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: rotate(90deg);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

/* Category Cards */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: var(--bg-card);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.3);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
}

.category-card:hover .card-glow {
    opacity: 1;
}

.card-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

.card-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.category-card:hover .card-shine {
    animation: shine 1s;
}

.category-card h2 {
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Game Container */
.game-container {
    max-width: 900px;
    margin: 0 auto;
}

.bet-controls {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px var(--shadow);
}

.bet-controls label {
    font-size: 1.1rem;
    font-weight: 600;
}

.bet-controls input {
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--text-secondary);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 120px;
    transition: border 0.3s;
}

.bet-controls input:focus {
    outline: none;
    border-color: var(--gold);
}

.game-btn, .primary-btn {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.game-btn:hover, .primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

.game-btn:active, .primary-btn:active {
    transform: translateY(0);
}

.game-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Plinko - Canvas Based */
.plinko-wrapper {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#plinkoCanvas {
border-radius: 10px;
background: var(--bg-secondary);
display: block;
margin: 0 auto;
}

.multipliers-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.multiplier {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.multiplier.highlight {
    background: var(--success);
    border-color: var(--success);
    transform: scale(1.2);
    animation: glow 1s infinite;
}

.multiplier.highlight-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    font-weight: 800;
}

/* Slot Machine - Real Reels */
.slot-machine-container {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 4px 30px var(--shadow);
}

.slot-machine {
    background: var(--bg-secondary);
    border: 5px solid var(--gold);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.slot-reel-wrapper {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.reel-container {
    width: 120px;
    height: 180px;
    background: #000;
    border: 3px solid var(--gold-dark);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.reel {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: transform 0.05s linear;
}

.reel-symbol {
    width: 120px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.win-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    transform: translateY(-50%);
    box-shadow: 0 0 10px var(--gold);
    opacity: 0.5;
}

/* Confetti Canvas */
#confettiCanvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 9999;
}

/* Wheel Spinner */
.wheel-container {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wheelCanvas {
border-radius: 50%;
box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: var(--gold);
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    z-index: 10;
}

.wheel-spin-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    border: none;
    padding: 1.5rem 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 800;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.5);
    transition: all 0.3s;
    z-index: 10;
    width: 100px;
    height: 100px;
}

.wheel-spin-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.wheel-spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Messages */
.result-message {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.result-message.win {
    background: var(--success);
    color: white;
    animation: glow 1s infinite;
}

.result-message.lose {
    background: var(--danger);
    color: white;
}

.earn-message {
    text-align: center;
    font-size: 1.3rem;
    margin-top: 1.5rem;
    color: var(--gold);
    font-weight: 600;
    min-height: 40px;
}

/* Leaderboard */
.guest-notice {
    background: linear-gradient(135deg, #4A90E2, #357ABD);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.1rem;
}

.guest-notice a {
    color: var(--gold);
    font-weight: bold;
    text-decoration: underline;
}

.leaderboard-container {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 30px var(--shadow);
}

.leaderboard-table {
    width: 100%;
}

.leaderboard-table thead {
    background: var(--bg-secondary);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 1.5rem;
    text-align: left;
}

.leaderboard-table th {
    font-weight: 700;
    color: var(--gold);
    font-size: 1.1rem;
}

.leaderboard-table tr {
    border-bottom: 1px solid var(--bg-secondary);
    transition: background 0.3s;
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-secondary);
}

.leaderboard-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--gold);
}

.balance-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gold);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 50px var(--shadow);
    animation: fadeInUp 0.3s;
}

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

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--danger);
}

.modal-body {
    padding: 2rem;
}

.setting-group {
    margin-bottom: 1.5rem;
}

.setting-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.setting-group input,
.setting-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--text-secondary);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
}

.setting-group input:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--gold);
}

.theme-selector {
    display: flex;
    gap: 1rem;
}

.theme-btn {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--text-secondary);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.theme-btn.active,
.theme-btn:hover {
    border-color: var(--gold);
    background: var(--gold);
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-left, .nav-right {
        width: 100%;
        justify-content: center;
    }

    .categories {
        grid-template-columns: 1fr;
    }

    .title {
        font-size: 2rem;
    }

    #plinkoCanvas {
    width: 100%;
    height: auto;
    }

    .slot-reel-wrapper {
        gap: 0.5rem;
    }

    .reel-container {
        width: 90px;
        height: 135px;
    }

    .reel-symbol {
        width: 90px;
        height: 45px;
        font-size: 2rem;
    }

    .wheel-container {
        width: 300px;
        height: 300px;
    }

    #wheelCanvas {
    width: 300px;
    height: 300px;
    }
}

/* Remove hover effect from leaderboard rows */
.leaderboard-table tbody tr:hover {
    background: transparent;
}

/* Fix wheel spin button centering */
.wheel-spin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}
