/* --- Base Styles --- */
body {
    font-family: 'Inter', sans-serif;
    color: #f0f0f0;
    overflow-x: hidden; /* Ændret for at tillade vertikal scrolling */
    transition: background 0.5s;
    position: relative;
}

/* Shiny background effect container */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hud-container {
    backdrop-filter: blur(10px);
    border-radius: 0;
    transition: all 0.5s ease;
}
.hud-input, .hud-select {
    border-radius: 2px;
    transition: all 0.2s ease;
}
.hud-select option { background-color: #1a1a1a; color: #f0f0f0; }
.hud-button {
    border-radius: 2px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-weight: bold;
}
.hud-button:disabled {
    cursor: not-allowed;
}
#moneyDisplay {
    transition: all 0.5s ease;
    white-space: nowrap; /* Tilføjet for at holde beløb og valuta på samme linje */
}
.coin-rain {
    position: fixed;
    top: -50px; /* Justeret for større mønter */
    width: 45px; /* Gjort 3x større */
    height: 45px; /* Gjort 3x større */
    background: radial-gradient(circle at 65% 35%, #fff2a8, #d4af37 60%, #a07d2c 100%);
    border-radius: 50%;
    opacity: 0.9;
    pointer-events: none;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6); /* Større skygge */
    transition: top 1.5s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

/* --- THEME: Command (Orange) --- */
.theme-command { background-color: #1a1a1a; }
.theme-command::before {
    background: radial-gradient(circle at 10% 10%, rgba(255, 102, 0, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(255, 102, 0, 0.15) 0%, transparent 50%);
    opacity: 1;
}
.theme-command .hud-container { background-color: rgba(44, 44, 44, 0.85); border: 1px solid #444; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.theme-command .hud-input, .theme-command .hud-select { background-color: #1a1a1a; border: 1px solid #555; color: #f0f0f0; }
.theme-command .hud-input:focus, .theme-command .hud-select:focus { border-color: #ff6600; box-shadow: 0 0 10px #ff6600; }
.theme-command .hud-button { background-color: #3d3d3d; border: 1px solid #555; color: #f0f0f0; }
.theme-command .hud-button:not(:disabled):hover { background-color: #ff6600; color: #1a1a1a; border-color: #ff6600; }
.theme-command .hud-button:disabled { background-color: #2a2a2a; color: #666; border-color: #444; }
.theme-command #moneyDisplay { color: #ff6600; }

/* --- THEME: Dashboard (Blue) --- */

/* Force dashboard theme on mobile */
@media (max-width: 639px) {
    body {
        background-color: #0d1117 !important;
    }
    .hud-container {
        background-color: rgba(22, 27, 34, 0.85) !important;
        border: 1px solid #30363d !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    }
    .hud-input, .hud-select {
        background-color: #0d1117 !important;
        border: 1px solid #30363d !important;
        color: #c9d1d9 !important;
    }
    .hud-button {
        background-color: #21262d !important;
        border: 1px solid #30363d !important;
        color: #c9d1d9 !important;
    }
    #moneyDisplay {
        color: #58a6ff !important;
    }
}

.theme-dashboard { background-color: #0d1117; }
.theme-dashboard::before {
    background: radial-gradient(circle at 90% 10%, rgba(88, 166, 255, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 20% 90%, rgba(88, 166, 255, 0.1) 0%, transparent 50%);
    opacity: 1;
}
.theme-dashboard .hud-container { background-color: rgba(22, 27, 34, 0.85); border: 1px solid #30363d; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.theme-dashboard .hud-input, .theme-dashboard .hud-select { background-color: #0d1117; border: 1px solid #30363d; color: #c9d1d9; }
.theme-dashboard .hud-input:focus, .theme-dashboard .hud-select:focus { border-color: #58a6ff; box-shadow: 0 0 10px #58a6ff; }
.theme-dashboard .hud-button { background-color: #21262d; border: 1px solid #30363d; color: #c9d1d9; }
.theme-dashboard .hud-button:not(:disabled):hover { background-color: #58a6ff; color: #0d1117; border-color: #58a6ff; }
.theme-dashboard .hud-button:disabled { background-color: #161b22; color: #6e7681; border-color: #30363d; }
.theme-dashboard #moneyDisplay { color: #58a6ff; }
        
/* --- THEME: Matrix (Green) --- */
.theme-matrix {
    background-color: #05100a;
}
.theme-matrix::before {
    background-image: linear-gradient(rgba(0,255,102,0.1) 1px, transparent 1px), linear-gradient(90deg, rgba(0,255,102,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 1;
}
.theme-matrix .hud-container { background-color: rgba(5, 20, 10, 0.85); border: 1px solid #008a3e; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.theme-matrix .hud-input, .theme-matrix .hud-select { background-color: #05100a; border: 1px solid #008a3e; color: #00ff66; }
.theme-matrix .hud-input:focus, .theme-matrix .hud-select:focus { border-color: #00ff66; box-shadow: 0 0 10px #00ff66; }
.theme-matrix .hud-button { background-color: #0b2e1a; border: 1px solid #008a3e; color: #00ff66; }
.theme-matrix .hud-button:not(:disabled):hover { background-color: #00ff66; color: #05100a; border-color: #00ff66; }
.theme-matrix .hud-button:disabled { background-color: #081f12; color: #005c28; border-color: #005c28; }
.theme-matrix #moneyDisplay { color: #00ff66; }

/* --- THEME: Crimson (Red) --- */
.theme-crimson { background-color: #1a0a0a; }
.theme-crimson::before {
    background: radial-gradient(circle at 50% 90%, rgba(255, 68, 68, 0.2) 0%, transparent 40%),
                radial-gradient(circle at 90% 10%, rgba(255, 68, 68, 0.1) 0%, transparent 50%);
    opacity: 1;
}
.theme-crimson .hud-container { background-color: rgba(44, 20, 20, 0.85); border: 1px solid #8a0000; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.theme-crimson .hud-input, .theme-crimson .hud-select { background-color: #1a0a0a; border: 1px solid #8a0000; color: #ff4444; }
.theme-crimson .hud-input:focus, .theme-crimson .hud-select:focus { border-color: #ff4444; box-shadow: 0 0 10px #ff4444; }
.theme-crimson .hud-button { background-color: #2e0b0b; border: 1px solid #8a0000; color: #ff4444; }
.theme-crimson .hud-button:not(:disabled):hover { background-color: #ff4444; color: #1a0a0a; border-color: #ff4444; }
.theme-crimson .hud-button:disabled { background-color: #1f0808; color: #5c0000; border-color: #5c0000; }
.theme-crimson #moneyDisplay { color: #ff4444; }
        
/* --- THEME: Light --- */
.theme-light { background-color: #f5f5f5; color: #333; }
.theme-light .hud-container { background-color: rgba(255, 255, 255, 0.85); border: 1px solid #ddd; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.theme-light .hud-input, .theme-light .hud-select { background-color: #f5f5f5; border: 1px solid #ddd; color: #333; }
.theme-light .hud-input:focus, .theme-light .hud-select:focus { border-color: #007bff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.5); }
.theme-light .hud-button { background-color: #e9e9e9; border: 1px solid #ccc; color: #333; }
.theme-light .hud-button:not(:disabled):hover { background-color: #007bff; color: #fff; border-color: #007bff; }
.theme-light .hud-button:disabled { background-color: #f0f0f0; color: #aaa; border-color: #ddd; }
.theme-light #moneyDisplay { color: #007bff; }
.theme-light .hud-select option { background-color: #fff; color: #333; }
.theme-light #error-message { color: #dc3545; }

/* Pulse animation for the button */
.bmc-pulse {
    animation: bmc-pulse 1.2s infinite;
}
@keyframes bmc-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* Confetti styles */
.confetti {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    opacity: 0.8;
    animation: confetti-fall 1.2s linear forwards;
}
@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}
