:root {
    --christmas-red: #D42426;
    --christmas-green: #165B33;
    --christmas-gold: #F8B229;
    --snow-white: #F0F0F0;
    --dark-bg: #0B0C10;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--snow-white);
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

h1, h2 {
    font-family: 'Mountains of Christmas', cursive;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    text-align: center;
}

.icon-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid var(--christmas-gold);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.main-container {
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.game-area {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
    width: 100%;
}

.wheel-container {
    position: relative;
    width: 500px;
    height: 500px;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.5));
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.1s;
}

.arrow {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-right: 40px solid var(--christmas-gold);
    filter: drop-shadow(-2px 0 2px rgba(0,0,0,0.3));
    z-index: 20;
}

.controls-container {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--christmas-gold);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border-radius: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box; 
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Mountains of Christmas', cursive;
}

button:hover {
    transform: scale(1.05);
}

button:active {
    transform: scale(0.95);
}

#updateBtn {
    background-color: var(--christmas-green);
    color: white;
    width: 100%;
    margin-top: 10px;
}

.primary-btn {
    background-color: var(--christmas-red);
    color: white;
    font-size: 2rem;
    padding: 15px 40px;
    width: 100%;
    border: 4px solid var(--christmas-gold);
    box-shadow: 0 4px 0 var(--christmas-gold);
}

.primary-btn:active {
    box-shadow: 0 0 0 var(--christmas-gold);
    transform: translateY(4px);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.hidden {
    display: none;
}

.modal-content {
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 5px solid var(--christmas-red);
    box-shadow: 0 0 50px var(--christmas-gold);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
}

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#winnerText {
    font-size: 3rem;
    color: var(--christmas-green);
    margin: 20px 0;
    font-weight: bold;
    font-family: 'Mountains of Christmas', cursive;
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

#closeBtn {
    background-color: var(--christmas-green);
    color: white;
}

#removeBtn {
    background-color: var(--christmas-red);
    color: white;
}

/* Snowflake animation class generated by JS */
.snowflake {
    position: absolute;
    color: #fff;
    font-size: 1em;
    font-family: Arial;
    text-shadow: 0 0 1px #000;
}

@keyframes fall {
    0% { top: -10%; transform: translateX(0); }
    100% { top: 110%; transform: translateX(20px); }
}

@media (max-width: 600px) {
    .wheel-container {
        width: 300px;
        height: 300px;
    }
    
    .primary-btn {
        font-size: 1.5rem;
    }
    
    .icon-btn {
        position: relative;
        top: auto;
        transform: none;
        margin-left: 10px;
    }
    
    header {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}
