/* Julespil 2025 - Christmas Game Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --christmas-red: #c41e3a;
    --christmas-green: #228b22;
    --christmas-gold: #ffd700;
    --snow-white: #fffafa;
    --dark-green: #0b3d0b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--christmas-green) 50%, var(--dark-green) 100%);
    min-height: 100vh;
    color: var(--snow-white);
    overflow-x: hidden;
}

/* Snowfall Animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: var(--snow-white);
    font-size: 1.5rem;
    animation: snowfall linear infinite;
    opacity: 0.8;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 0.5s; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 2.5s; }
.snowflake:nth-child(7) { left: 75%; animation-duration: 13s; animation-delay: 0.8s; }
.snowflake:nth-child(8) { left: 90%; animation-duration: 10s; animation-delay: 1.8s; }

@keyframes snowfall {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(110vh) rotate(360deg);
    }
}

/* Game Container */
.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5), 0 0 10px var(--christmas-gold);
    }
    to {
        text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5), 0 0 20px var(--christmas-gold), 0 0 30px var(--christmas-gold);
    }
}

.subtitle {
    font-size: 1.2rem;
    margin-top: 10px;
    opacity: 0.9;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Menu Card */
.menu-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 2px solid var(--christmas-gold);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.menu-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--christmas-gold);
}

.menu-card p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Slambert Greeting */
.slambert-greeting {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.greeting-intro {
    font-size: 0.95rem;
    margin-bottom: 10px !important;
    opacity: 0.9;
}

.greeting-intro a {
    color: var(--christmas-gold);
    text-decoration: none;
    font-weight: bold;
}

.greeting-intro a:hover {
    text-decoration: underline;
}

.greeting-quote {
    font-style: italic;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0 10px;
    border-left: 3px solid var(--christmas-gold);
    text-align: left;
}

.greeting-signature {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: bold;
    color: var(--christmas-gold);
}

kbd {
    background: var(--christmas-red);
    padding: 5px 10px;
    border-radius: 5px;
    font-family: monospace;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 20px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--christmas-red), #ff6b6b);
    color: white;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

/* Game Screen */
.game-header {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.game-header > div {
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

#score, #time, #level {
    color: var(--christmas-gold);
    font-weight: bold;
}

#game-canvas {
    display: block;
    margin: 0 auto;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 10px;
    border: 4px solid var(--christmas-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Game Over Screen */
#final-score {
    font-size: 2rem;
    color: var(--christmas-gold);
}

#high-score-message {
    color: var(--christmas-gold);
    font-weight: bold;
}

/* Secondary Button */
.btn-secondary {
    background: linear-gradient(45deg, var(--christmas-green), #3cb371);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4);
    margin-top: 10px;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.6);
}

/* Gold Button */
.btn-gold {
    background: linear-gradient(45deg, #b8860b, var(--christmas-gold));
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Submit Score Form */
.submit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
}

.form-row {
    width: 100%;
    display: flex;
    justify-content: center;
}

.submit-form input {
    padding: 12px 20px;
    font-size: 1rem;
    border: 2px solid var(--christmas-gold);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    outline: none;
    text-align: center;
}

.initials-input {
    width: 120px;
    font-size: 1.3rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.greeting-input {
    width: 280px;
}

.submit-form input:focus {
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.submit-form input::placeholder {
    color: #888;
}

.submit-status {
    min-height: 24px;
    margin: 10px 0;
    font-weight: bold;
}

.submit-status.success {
    color: #90EE90;
}

.submit-status.error {
    color: #ff6b6b;
}

/* Leaderboard */
.leaderboard {
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.leaderboard-entry {
    display: flex;
    flex-direction: column;
    padding: 12px 20px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--christmas-gold);
    transition: transform 0.2s ease;
}

.leaderboard-entry:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.leaderboard-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.leaderboard-greeting {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 8px;
    padding-left: 50px;
    text-align: left;
}

.leaderboard-entry.gold {
    border-left-color: #ffd700;
    background: rgba(255, 215, 0, 0.2);
}

.leaderboard-entry.silver {
    border-left-color: #c0c0c0;
    background: rgba(192, 192, 192, 0.15);
}

.leaderboard-entry.bronze {
    border-left-color: #cd7f32;
    background: rgba(205, 127, 50, 0.15);
}

.leaderboard-rank {
    font-size: 1.5rem;
    font-weight: bold;
    min-width: 50px;
}

.leaderboard-name {
    flex: 1;
    text-align: left;
    padding: 0 15px;
    font-size: 1.1rem;
}

.leaderboard-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--christmas-gold);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .menu-card {
        padding: 20px;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}
