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

:root {
    --primary-dark: #0a0f0d;
    --primary-green: #1a3b2e;
    --accent-green: #2d5a47;
    --surface-dark: #141b17;
    --surface-light: rgba(255, 255, 255, 0.03);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #a1a9b8;
    --text-muted: #6b7580;
    --accent-gold: #d4af37;
    --glass-bg: rgba(20, 27, 23, 0.6);
    --shadow-soft: 0 4px 32px rgba(0, 0, 0, 0.3);
    --shadow-hard: 0 8px 64px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 20% 80%, rgba(42, 90, 71, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(52, 115, 88, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, var(--primary-dark) 0%, #0f1a14 50%, var(--surface-dark) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-feature-settings: "kern" 1;
    -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
    background: rgba(10, 15, 13, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.nav-menu li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--surface-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.nav-menu li a:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
}

.nav-menu li a:hover::before {
    opacity: 1;
}

/* Main Content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.homepage, .game-section {
    display: none;
}

.homepage.active, .game-section.active {
    display: block;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 5rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    group: hover;
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(212, 175, 55, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: var(--shadow-hard);
}

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

.game-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    transition: transform 0.4s ease;
    filter: drop-shadow(0 4px 8px rgba(212, 175, 55, 0.3));
}

.game-card:hover .game-icon {
    transform: scale(1.1) rotate(5deg);
}

.game-title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.game-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 400;
}

/* Game Section */
.game-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.back-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    transform: translateX(-2px);
}

.game-title-header {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Shared Game Container */
.game-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
}

.poker-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
}

.game-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.info-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.game-status {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    color: var(--text-secondary);
}

/* Poker Styles */
.poker-table {
    background:
        radial-gradient(ellipse at center, rgba(42, 90, 71, 0.4) 0%, transparent 70%),
        linear-gradient(135deg, var(--accent-green) 0%, #1a3b2e 100%);
    border: 2px solid var(--border-light);
    border-radius: 40px;
    padding: 3rem 2rem;
    margin: 3rem auto;
    max-width: 800px;
    position: relative;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
}

.community-cards, .player-hand {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2.5rem 0;
    flex-wrap: wrap;
}

.card {
    width: 75px;
    height: 108px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 1px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px) rotate(2deg);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card.back {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: var(--accent-gold);
    border-color: var(--border-light);
    font-size: 1.5rem;
}

.card .suit {
    font-size: 1.75rem;
    margin-top: 0.25rem;
}

.red { color: #dc2626; }
.black { color: #1f2937; }

/* BLACKJACK STYLES */
.blackjack-table {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin: 2rem 0;
    padding: 2rem;
    background: 
        radial-gradient(ellipse at center, rgba(42, 90, 71, 0.3) 0%, transparent 70%),
        linear-gradient(135deg, var(--accent-green) 0%, #1a3b2e 100%);
    border-radius: 24px;
    border: 2px solid var(--border-light);
}

.dealer-section, .player-section {
    text-align: center;
}

.dealer-section h3, .player-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    font-size: 1.5rem;
    font-weight: 600;
}

.hand {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    min-height: 120px;
    align-items: center;
}

.betting-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.bet-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-gold), #b8860b);
    color: var(--primary-dark);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 80px;
}

.bet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #b8860b, var(--accent-gold));
}

.bet-btn:active {
    transform: translateY(0);
}

/* ROULETTE STYLES */
.roulette-wheel {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.wheel-result {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: 
        radial-gradient(circle at center, #8b4513 0%, #654321 50%, #2c1810 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 6px solid var(--accent-gold);
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.3),
        inset 0 4px 12px rgba(0,0,0,0.3);
    position: relative;
}

.wheel-result::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 20px solid var(--accent-gold);
}

.winning-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.roulette-table {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
}

.number-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.number-cell:hover {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.number-cell.red { 
    background: linear-gradient(135deg, #dc3545, #c82333);
}
.number-cell.black { 
    background: linear-gradient(135deg, #343a40, #23272b);
}
.number-cell.green { 
    background: linear-gradient(135deg, #28a745, #218838);
}

.outside-bets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.bet-area {
    padding: 1.25rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
    border: 2px solid transparent;
}

.bet-area:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.2);
}

.bet-area.red { 
    background: linear-gradient(135deg, #dc3545, #c82333);
}
.bet-area.black { 
    background: linear-gradient(135deg, #343a40, #23272b);
}
.bet-area.green { 
    background: linear-gradient(135deg, #28a745, #218838);
}

.bet-amount {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 2px solid white;
}

/* SLOTS STYLES */
.slots-machine {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.slots-display {
    display: flex;
    gap: 1.5rem;
    padding: 3rem 2rem;
    background: 
        linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05)),
        linear-gradient(45deg, #1a1a1a, #2d2d2d);
    border-radius: 20px;
    border: 3px solid var(--accent-gold);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.4),
        inset 0 2px 8px rgba(255,255,255,0.1);
}

.reel {
    width: 90px;
    height: 90px;
    background: 
        linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 4px 12px rgba(0,0,0,0.3),
        0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
    position: relative;
}

.reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
}

.reel-symbol {
    font-size: 3.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.reel.spinning .reel-symbol {
    animation: spin 0.1s infinite linear;
}

@keyframes spin {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(0.8); }
    100% { transform: translateY(0) scale(1); }
}

.paytable {
    background: 
        linear-gradient(135deg, rgba(0,0,0,0.4), rgba(0,0,0,0.6));
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 220px;
    border: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.paytable h4 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.payout-row {
    padding: 0.5rem 0;
    font-size: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.payout-row:last-child {
    border-bottom: none;
}

/* Action Buttons */
.poker-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.poker-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    padding: 1.25rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.poker-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.poker-btn:hover:not(:disabled) {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
}

.poker-btn:hover:not(:disabled)::before {
    opacity: 0.1;
}

.poker-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.poker-btn.primary {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #b8860b 100%);
    color: var(--primary-dark);
    border-color: var(--accent-gold);
}

.poker-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #b8860b 0%, var(--accent-gold) 100%);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.5);
}

/* Special Button Styles */
.spin-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    font-size: 1.3rem;
    padding: 1.5rem 3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.spin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
}

.slots-spin-btn {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    font-size: 1.4rem;
    padding: 1.5rem 3rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.slots-spin-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #f7931e, #ff6b35);
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        padding: 6rem 1rem 2rem;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        gap: 0.25rem;
    }

    .nav-menu li a {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

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

    .game-card {
        padding: 2rem 1.5rem;
    }

    .game-container, .poker-container {
        padding: 2rem 1.5rem;
    }

    .game-info {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }

    .info-value {
        font-size: 1.5rem;
    }

    .card {
        width: 65px;
        height: 94px;
        font-size: 1rem;
    }

    .card .suit {
        font-size: 1.5rem;
    }

    .poker-actions {
        gap: 0.75rem;
    }

    .poker-btn {
        padding: 1rem 2rem;
        font-size: 0.9rem;
        min-width: 120px;
    }

    .betting-controls {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .bet-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        min-width: 60px;
    }

    .outside-bets {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .bet-area {
        padding: 1rem;
        font-size: 1rem;
    }

    .slots-display {
        padding: 2rem 1rem;
        gap: 1rem;
    }

    .reel {
        width: 70px;
        height: 70px;
    }

    .reel-symbol {
        font-size: 2.5rem;
    }

    .number-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.25rem;
    }

    .wheel-result {
        width: 100px;
        height: 100px;
    }

    .winning-number {
        font-size: 2rem;
    }

    .blackjack-table {
        padding: 1.5rem;
        gap: 2rem;
    }

    .hand {
        gap: 0.5rem;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .game-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .game-title-header {
        font-size: 2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .game-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .slots-display {
        flex-direction: row;
        padding: 1.5rem 0.75rem;
    }

    .paytable {
        min-width: auto;
        width: 100%;
        margin-top: 1rem;
    }
}
