@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap');

body {
    font-family: 'Inter', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0 20px; 
    box-sizing: border-box; 
    background: radial-gradient(circle at top, #2a475e 0%, #1b2838 50%, #171a21 100%);
    color: #c7d5e0;
    min-height: 100vh; /* Fallback til ældre browsere */
    min-height: 100dvh; /* Det magiske mobil-fix! (Dynamic Viewport Height) */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* --- Top Navigation Bar --- */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    width: 100%;
}

#logout-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #e74c3c;
    color: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
    display: none;
    margin-left: auto;
}
#logout-btn:hover { background-color: #c0392b; transform: translateY(-2px); }

#restart-btn {
    padding: 10px 20px;
    font-size: 14px;
    background-color: #3b5c75; 
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    display: none;
}
#restart-btn:hover { background-color: #4a7596; transform: translateY(-2px); }

/* --- Typografi --- */
h1 {
    color: #ffffff;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* --- OSRS TEXT EFFECTS --- */
.subtitle {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 40px;
    height: 35px;
    letter-spacing: 1px;
}
.subtitle span { display: inline-block; }

.osrs-wave span { animation: osrsWave 1.2s infinite ease-in-out; color: #66c0f4; }
@keyframes osrsWave { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-5px); } 75% { transform: translateY(5px); } }

.osrs-flash1 span { animation: osrsFlash1 0.8s infinite steps(2, end); }
@keyframes osrsFlash1 { 0% { color: #ff0000; } 50% { color: #ffff00; } 100% { color: #ff0000; } }

.osrs-glow1 span { animation: osrsGlow1 2s infinite ease-in-out; }
@keyframes osrsGlow1 { 0% { color: #ff0000; text-shadow: 0 0 10px #ff0000; } 50% { color: #ffff00; text-shadow: 0 0 15px #ffff00; } 100% { color: #ff0000; text-shadow: 0 0 10px #ff0000; } }

.osrs-shake span { animation: osrsShake 0.1s infinite linear; color: #a4d007; }
@keyframes osrsShake { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 2px); } 50% { transform: translate(2px, -2px); } 75% { transform: translate(-2px, -2px); } }

/* --- Knapper Generelt --- */
.btn {
    padding: 15px 35px;
    font-size: 18px;
    cursor: pointer;
    background: linear-gradient(135deg, #66c0f4, #2a475e);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    margin: 10px;
    text-decoration: none;
    display: inline-block;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(102, 192, 244, 0.4); background: linear-gradient(135deg, #4199c6, #2a475e); }
.btn:disabled { background: #3b5c75; color: #8f98a0; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-success { background: linear-gradient(135deg, #a4d007, #5c7e10); }
.btn-success:hover { background: linear-gradient(135deg, #8cb506, #4a660d); box-shadow: 0 8px 25px rgba(164, 208, 7, 0.4); }

.btn-play { background: linear-gradient(135deg, #66c0f4, #0078d7); border: 1px solid #66c0f4; }
.btn-play:hover { background: linear-gradient(135deg, #4199c6, #005a9e); box-shadow: 0 8px 25px rgba(102, 192, 244, 0.5); }

/* --- Profil & Status Display --- */
#avatar { border-radius: 50%; box-shadow: 0 0 20px rgba(102, 192, 244, 0.5); border: 4px solid #66c0f4; margin-bottom: 20px; transition: transform 0.3s ease; }
#avatar:hover { transform: scale(1.05); }

.status-styled {
    display: inline-block;
    background: rgba(102, 192, 244, 0.15);
    border: 2px solid #66c0f4;
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(102, 192, 244, 0.4), inset 0 0 10px rgba(102, 192, 244, 0.2);
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Playtime Filter --- */
.playtime-options { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 30px; }
.playtime-options input[type="radio"] { display: none; }
.playtime-btn {
    background-color: #171a21; border: 2px solid #2a475e; color: #8f98a0;
    padding: 14px 24px; border-radius: 8px; cursor: pointer; font-size: 16px;
    font-weight: bold; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.playtime-btn:hover { border-color: #66c0f4; color: #ffffff; }
.playtime-options input[type="radio"]:checked + .playtime-btn {
    background: linear-gradient(135deg, #66c0f4, #2a475e); border-color: #66c0f4;
    color: #ffffff; box-shadow: 0 6px 20px rgba(102, 192, 244, 0.4); transform: translateY(-3px);
}

/* --- Roulette hjulet --- */
#case-container {
    position: relative; width: 900px; max-width: 100%; height: 220px; margin: 40px auto;
    background-color: #0f1215; border: 2px solid #2a475e; border-radius: 12px;
    overflow: hidden; display: none; box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.9);
}
#case-container::before, #case-container::after { content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 5; pointer-events: none; }
#case-container::before { left: 0; background: linear-gradient(to right, #0f1215, transparent); }
#case-container::after { right: 0; background: linear-gradient(to left, #0f1215, transparent); }

/* Pulserende laser i midten */
#center-line { 
    position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; 
    background-color: #ff3366; transform: translateX(-50%); z-index: 10; 
    box-shadow: 0 0 15px #ff3366, 0 0 30px #ff3366; 
    animation: pulseLaser 0.4s infinite alternate;
}
@keyframes pulseLaser {
    0% { box-shadow: 0 0 10px #ff3366, 0 0 20px #ff3366; opacity: 0.7; }
    100% { box-shadow: 0 0 20px #ff3366, 0 0 40px #ff3366, 0 0 60px #ff3366; opacity: 1; }
}

#track { display: flex; height: 100%; align-items: center; transition: transform 7s cubic-bezier(0.15, 0.1, 0.1, 1); transform: translateX(0); }

.game-card {
    width: 220px; height: 130px; flex-shrink: 0; margin: 0 10px; background-color: #2a475e;
    border-bottom: 5px solid #66c0f4; border-radius: 6px; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center; position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.game-card img { width: 100%; height: 100%; object-fit: cover; }
.game-name { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.9) 80%); color: white; font-size: 13px; font-weight: 700; padding: 20px 8px 8px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Vinder Tekst Design --- */
#winner-display { margin-top: 30px; min-height: 100px; }

/* Let the fun begin tekst popper ind */
.fun-begin-text {
    display: block;
    font-size: 20px;
    color: #a4d007; 
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    margin-bottom: -5px;
    opacity: 0;
    animation: slideDownFade 0.5s ease-out forwards;
}

/* Selve vinder-spillet eksploderer frem */
.winner-name { 
    display: block; 
    color: #ffffff; 
    font-size: 42px; 
    font-weight: 900; 
    text-shadow: 0 0 20px rgba(102, 192, 244, 0.6); 
    margin-top: 10px; 
    opacity: 0;
    animation: epicPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    animation-delay: 0.1s; /* Venter et splitsekund for effekt */
}

@keyframes slideDownFade {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes epicPop {
    0% { transform: scale(0.5); opacity: 0; text-shadow: 0 0 0 rgba(102, 192, 244, 0); }
    50% { transform: scale(1.05); text-shadow: 0 0 40px rgba(102, 192, 244, 1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; text-shadow: 0 0 20px rgba(102, 192, 244, 0.6); }
}

/* Custom Steam Login Knap */
#steam-custom-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 15px;
    background: linear-gradient(135deg, #171a21 0%, #0d1014 100%); border: 2px solid #2a475e;
    color: #ffffff; font-size: 18px; font-weight: 800; text-decoration: none;
    padding: 16px 40px; border-radius: 8px; margin-top: 25px; transition: all 0.3s ease; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
#steam-custom-btn i { font-size: 32px; color: #ffffff; transition: color 0.3s ease; }
#steam-custom-btn:hover { transform: translateY(-5px); border-color: #66c0f4; box-shadow: 0 12px 30px rgba(102, 192, 244, 0.4); background: linear-gradient(135deg, #1b2838 0%, #171a21 100%); }
#steam-custom-btn:hover i { color: #66c0f4; }

/* Footeren styres nu af margin-top: auto; */
#footer { margin-top: auto; padding-top: 60px; padding-bottom: 20px; font-size: 14px; color: #8f98a0; }
#footer i { color: #ff3366; margin: 0 4px; display: inline-block; animation: heartbeat 1.5s infinite; }
#footer a { color: #66c0f4; text-decoration: none; font-weight: 800; transition: all 0.3s ease; }
#footer a:hover { color: #ffffff; text-shadow: 0 0 10px rgba(102, 192, 244, 0.8); }
@keyframes heartbeat { 0% { transform: scale(1); } 14% { transform: scale(1.2); } 28% { transform: scale(1); } 42% { transform: scale(1.2); } 70% { transform: scale(1); } }

/* =========================================
   RESPONSIVT DESIGN (MOBIL & TABLET)
   ========================================= */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; margin-top: 10px; }
    .subtitle { font-size: 1.1rem; }
    
    .top-bar { padding: 10px; margin-bottom: 10px; }
    #logout-btn, #restart-btn { padding: 8px 12px; font-size: 12px; }
    
    .playtime-btn { padding: 12px 15px; width: 100%; text-align: center; }
    .playtime-options { gap: 10px; }
    
    #case-container { height: 160px; margin: 20px auto; }
    
    .game-card { width: 160px; height: 110px; }
    
    .fun-begin-text { font-size: 16px; }
    .winner-name { font-size: 28px; }
    .status-styled { font-size: 14px; padding: 10px 15px; }
}

/* --- Beskrivelsesboks på forsiden --- */
.description-box {
    max-width: 550px;
    margin: 0 auto 30px auto;
    background: rgba(42, 71, 94, 0.4);
    border: 1px solid #3b5c75;
    border-radius: 8px;
    padding: 20px 25px;
    color: #c7d5e0;
    font-size: 16px;
    line-height: 1.6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.description-box p { margin: 10px 0; }
.description-box strong { color: #ffffff; font-weight: 900; }

@media (max-width: 768px) {
    .description-box { font-size: 14px; padding: 15px; margin: 0 15px 25px 15px; }
}