/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600;700&display=swap');

/* CSS Variables for Dark Modern Theme */
:root {
    --primary-bg: #0F172A;
    --secondary-bg: #1E293B;
    --card-bg: rgba(30, 41, 59, 0.8);
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --accent-primary: #06B6D4;
    --accent-secondary: #0891B2;
    --accent-glow: #67E8F9;
    --button-primary: #06B6D4;
    --button-secondary: #1E293B;
    --border-color: rgba(6, 182, 212, 0.3);
    --border-glow: rgba(6, 182, 212, 0.6);
    
    --font-primary: 'Orbitron', monospace;
    --font-secondary: 'Exo 2', sans-serif;
    
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.4);
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #06B6D4, #0891B2, #06B6D4);
    --gradient-bg: linear-gradient(135deg, #0F172A, #1E293B, #0F172A);
    --gradient-glass: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(8, 145, 178, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(103, 232, 249, 0.05) 0%, transparent 50%);
    animation: backgroundShift 10s ease-in-out infinite;
    z-index: -1;
}

@keyframes backgroundShift {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

h1 {
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin: 2.5rem 0;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(6, 182, 212, 0.5); }
    to { text-shadow: 0 0 30px rgba(6, 182, 212, 0.8), 0 0 40px rgba(103, 232, 249, 0.3); }
}

/* Navigation */
.navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.2rem 2rem;
}

.navbar .logo {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}


.nav-links a:hover::before {
    left: 0;
}

.nav-links a:hover {
    color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-color);
    background: rgba(6, 182, 212, 0.1);
}

/* Game Styles */
.slot-machine {
    max-width: 900px;
    margin: 3rem auto;
    padding: 3rem;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--accent-primary), transparent);
    animation: rotate 4s linear infinite;
    opacity: 0.1;
    z-index: -1;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.slot-header {
    text-align: center;
    margin-bottom: 2rem;
}

.slot-header h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
    color: var(--text-primary);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.balance-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-glow);
    text-shadow: 0 0 15px rgba(103, 232, 249, 0.6);
}

.reels-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    perspective: 1000px;
}

.reel {
    width: 140px;
    height: 140px;
    background: var(--gradient-glass);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    box-shadow: 
        inset 0 0 20px rgba(6, 182, 212, 0.2),
        0 0 20px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.reel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(6, 182, 212, 0.1) 50%, transparent 70%);
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.reel:hover {
    transform: translateY(-5px) rotateX(10deg);
    box-shadow: 
        inset 0 0 30px rgba(6, 182, 212, 0.3),
        0 10px 30px rgba(6, 182, 212, 0.5);
    border-color: var(--border-glow);
}

.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: 2rem 0;
}

.bet-controls {
    text-align: center;
}

.bet-controls label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
}

.bet-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.bet-btn {
    padding: 1rem 2rem;
    background: var(--gradient-glass);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.bet-btn:hover::before,
.bet-btn.active::before {
    left: 0;
}

.bet-btn:hover,
.bet-btn.active {
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--border-glow);
}

.spin-button {
    padding: 2rem 4rem;
    background: var(--gradient-primary);
    border: 2px solid var(--border-glow);
    border-radius: 50px;
    color: var(--primary-bg);
    font-size: 1.8rem;
    font-weight: 900;
    font-family: var(--font-primary);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-glow), 0 10px 30px rgba(6, 182, 212, 0.3);
}

.spin-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-glow), var(--accent-secondary));
    transition: left 0.3s ease;
    z-index: -1;
}

.spin-button:hover::before {
    left: 0;
}

.spin-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.5);
    border-color: var(--accent-glow);
}

.spin-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.spin-button.spinning {
    animation: spin 0.5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-icon {
    display: inline-block;
    margin-left: 0.5rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Win Display */
.win-display {
    text-align: center;
    margin: 2rem 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.win-message {
    animation: winPulse 0.5s ease-in-out;
}

@keyframes winPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.win-symbol {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: symbolGlow 1s ease-in-out infinite alternate;
}

@keyframes symbolGlow {
    from { 
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
        transform: scale(1);
    }
    to { 
        text-shadow: 0 0 30px rgba(255, 215, 0, 1), 0 0 40px rgba(255, 215, 0, 0.5);
        transform: scale(1.1);
    }
}

.win-amount {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-glow);
    text-shadow: 0 0 20px rgba(103, 232, 249, 0.8);
    margin-bottom: 0.5rem;
}

.win-celebration {
    font-size: 1.8rem;
    color: var(--accent-primary);
    animation: celebration 1s ease-in-out infinite;
}

@keyframes celebration {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.no-win {
    font-size: 1.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Paytable */
.paytable {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--gradient-glass);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-card);
}

.paytable h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--accent-primary);
    font-size: 1.8rem;
}

.paytable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.pay-item {
    text-align: center;
    padding: 1.2rem;
    background: rgba(6, 182, 212, 0.1);
    border-radius: 15px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.pay-item:hover {
    background: rgba(6, 182, 212, 0.2);
    transform: translateY(-2px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}

/* Confetti Animation */
.confetti {
    position: fixed;
    top: -10px;
    font-size: 2rem;
    z-index: 1000;
    pointer-events: none;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .slot-machine {
        margin: 1.5rem;
        padding: 2rem;
    }
    
    .reels-container {
        gap: 0.8rem;
    }
    
    .reel {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }
    
    .bet-buttons {
        gap: 0.8rem;
    }
    
    .bet-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .spin-button {
        padding: 1.5rem 3rem;
        font-size: 1.5rem;
    }
    
    .paytable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--game-gold);
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 1rem;
        border-top: 2px solid var(--game-gold);
    }
    
    .nav-links.show {
        display: flex;
    }
}
