/* Settings page container */
#settings-page-container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 32px 24px;
    text-align: center;
}
.back-btn {
    display: inline-block;
    margin-top: 32px;
    padding: 10px 24px;
    background: #4299e1;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.back-btn:hover {
    background: #3182ce;
}
.settings-link {
    text-decoration: none;
    color: #718096;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 12px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-left: 8px;
    transition: all 0.2s;
}
.settings-link:hover {
    background: #edf2f7;
    color: #4a5568;
}
/* Large Money Display at Top */
#main-money-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    text-align: center;
    margin: 0 auto 0 auto;
    padding: 24px 0 8px 0;
    background: linear-gradient(90deg, #f7fafc 60%, #e6fffa 100%);
    border-radius: 0 0 24px 24px;
    box-shadow: 0 2px 12px rgba(56, 178, 172, 0.08);
    z-index: 100;
}
.money-label {
    display: block;
    font-size: 1.1rem;
    color: #38b2ac;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 1px;
}
.money-value {
    font-size: 3rem;
    font-weight: 800;
    color: #2d3748;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(56, 178, 172, 0.12);
}
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: #f7fafc;
    color: #2d3748;
    padding: 16px;
    min-height: 100vh;
}

/* Hide particles canvas */
#particles {
    display: none;
}

#game-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 64px 24px 24px 24px; /* Add top padding so content isn't covered by fixed money display */
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: #1a202c;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: #2d3748;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #4a5568;
}

/* Game Info Section */
#game-info {
    background: #f7fafc;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    text-align: center;
}

#game-info > p {
    font-size: 1.125rem;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 16px;
}

#fun-facts {
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

#fun-fact-display {
    font-size: 0.875rem;
    color: #4a5568;
    font-weight: 400;
}

/* Stats Container */
#stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    background: #ffffff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stat-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
}

/* Game Area */
#game-area {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#number-wheel {
    font-size: 2.5rem;
    margin: 20px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4a5568;
}

#number-wheel:hover {
    transform: scale(1.05);
    color: #2d3748;
}

#guessInput {
    width: 200px;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    margin-right: 12px;
    transition: border-color 0.2s ease;
    font-family: 'Inter', sans-serif;
}

#guessInput:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

#guessButton {
    background: #4299e1;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

#guessButton:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#guessButton:active {
    transform: translateY(0);
}

#hint-container {
    margin-top: 16px;
}

#hint-container p {
    margin: 8px 0;
    font-size: 0.875rem;
    color: #4a5568;
}

/* Shop and Achievements */
#shop-and-achievements {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 12px 12px 12px;
    margin-bottom: 12px;
}

/* Tabs */
.tab-container {
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.tab-buttons {
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.tab-btn {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    color: #718096;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px 8px 0 0;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

.tab-btn.active {
    background: #ffffff;
    color: #2d3748;
    border-color: #e2e8f0;
    font-weight: 600;
}

.tab-btn:hover:not(.active) {
    background: #edf2f7;
    color: #4a5568;
}

.tab-content {
    min-height: 220px;
    padding: 0 0 8px 0;
}

/* Grids */
#upgrades-grid, #miners-grid, .powerups-grid, .minigames-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

/* Buttons - Consistent styling for all types */
.upgrade-btn, .miner-btn, .powerup-btn, .minigame-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #4a5568;
    padding: 20px;
    font-size: 0.875rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    text-align: left;
    font-weight: 500;
    line-height: 1.4;
}

.upgrade-btn:hover, .miner-btn:hover, .powerup-btn:hover, .minigame-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #cbd5e0;
}

.upgrade-btn:active, .miner-btn:active, .powerup-btn:active, .minigame-btn:active {
    transform: translateY(0);
}

.upgrade-btn:disabled, .miner-btn:disabled, .powerup-btn:disabled, .minigame-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: #f7fafc;
}

/* Special button styles */
.prestige-btn {
    background: linear-gradient(135deg, #4c51bf 0%, #553c9a 100%);
    color: white;
    border-color: #4c51bf;
    box-shadow: 0 2px 8px rgba(76, 81, 191, 0.3);
}

.prestige-btn:hover {
    background: linear-gradient(135deg, #434190 0%, #4c1d95 100%);
    box-shadow: 0 4px 12px rgba(76, 81, 191, 0.4);
}

/* Button content styling */
.upgrade-btn small, .miner-btn small, .powerup-btn small, .minigame-btn small {
    display: block;
    font-size: 0.75rem;
    color: #718096;
    margin-top: 4px;
    font-weight: 400;
}

/* Achievements */
#achievements-container {
    margin-top: 0;
}

#achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.achievement {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.875rem;
    text-align: left;
    transition: all 0.2s ease;
    position: relative;
    color: #4a5568;
    line-height: 1.4;
}

.achievement:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.achievement.unlocked {
    background: #e6fffa;
    border-color: #38b2ac;
    color: #2d3748;
}

.achievement.unlocked::before {
    content: '✅';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1rem;
}

/* Special Achievement Glow */
.achievement.new-unlock {
    animation: achievementGlow 2s ease-in-out;
}

@keyframes achievementGlow {
    0%, 100% { box-shadow: 0 2px 8px rgba(56, 178, 172, 0.3); }
    50% { box-shadow: 0 4px 16px rgba(56, 178, 172, 0.6); }
}

/* Floating Effects */
#floating-money {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 0;
}

.floating-money-particle {
    position: absolute;
    font-size: 1rem;
    font-weight: 600;
    color: #38a169;
    pointer-events: none;
    z-index: 1000;
    animation: floatUp 2s ease-out forwards;
}

.power-up-effect {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    z-index: 1000;
    animation: powerUpPulse 2s ease-out forwards;
}

.combo-effect {
    position: absolute;
    font-weight: 700;
    color: #667eea;
    pointer-events: none;
    z-index: 1000;
    animation: comboExplosion 2s ease-out forwards;
}

.critical-strike {
    color: #dc2626 !important;
    font-weight: 700;
}

/* Animations */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-60px) scale(1.2);
    }
}

@keyframes powerUpPulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

@keyframes comboExplosion {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        transform: scale(1.4);
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

/* Special Event Indicators */
.golden-number-indicator {
    background: #fff8dc;
    border: 2px solid #ffd700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    animation: goldenPulse 2s ease-in-out infinite alternate;
}

.number-rush-indicator {
    background: #fff5f5;
    border: 2px solid #e53e3e;
    animation: rushPulse 1s ease-in-out infinite alternate;
}

@keyframes goldenPulse {
    from { box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3); }
    to { box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5); }
}

@keyframes rushPulse {
    from { box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3); }
    to { box-shadow: 0 4px 12px rgba(229, 62, 62, 0.5); }
}

/* Rapid Fire Mode */
.rapid-fire-mode {
    background: #fff5f5;
    border-color: #e53e3e;
    animation: rapidFirePulse 1s ease-in-out infinite alternate;
}

@keyframes rapidFirePulse {
    from { opacity: 0.9; }
    to { opacity: 1; }
}

/* Cooldown Timer */
.cooldown-timer {
    color: #718096;
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    #game-container {
        padding: 16px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    #guessInput {
        width: 150px;
        margin-right: 8px;
        margin-bottom: 8px;
    }
    
    #guessButton {
        font-size: 0.875rem;
        padding: 10px 20px;
    }
    
    #stats-container {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .tab-buttons {
        gap: 0;
    }
    
    .tab-btn {
        padding: 10px 16px;
        font-size: 0.75rem;
    }
    
    #upgrades-grid, #miners-grid, .powerups-grid, .minigames-grid, #achievements-list {
        grid-template-columns: 1fr;
    }
    
    .upgrade-btn, .miner-btn, .powerup-btn, .minigame-btn {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 8px;
    }
    
    #game-container {
        padding: 12px;
    }
    
    h1 {
        font-size: 1.25rem;
    }
    
    #game-info, #game-area, #shop-and-achievements {
        padding: 16px;
    }
    
    #guessInput {
        width: 120px;
    }
    
    .tab-btn {
        padding: 8px 12px;
        font-size: 0.7rem;
    }
    
    #stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
