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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5016 50%, #8b0000 100%);
    min-height: 100vh;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Snowflakes animation */
.snowflake {
    position: fixed;
    top: -20px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 0;
    pointer-events: none;
    animation: snowfall linear forwards;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

@keyframes snowfall {
    0% {
        transform: translateY(-20px) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) translateX(var(--drift, 0));
        opacity: 0.7;
    }
}

.container {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8ff 100%);
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 0 3px #d4af37,
                0 0 20px rgba(212, 175, 55, 0.5);
    position: relative;
    z-index: 1;
    border: 4px solid #c41e3a;
}

.container::before {
    content: '🎄';
    position: absolute;
    top: -25px;
    left: 20px;
    font-size: 50px;
}

.container::after {
    content: '🎄';
    position: absolute;
    top: -25px;
    right: 20px;
    font-size: 50px;
}

h1 {
    text-align: center;
    background: linear-gradient(45deg, #c41e3a, #165b33, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 2.8em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    font-weight: bold;
    letter-spacing: 2px;
}

h2 {
    color: #165b33;
    margin-bottom: 20px;
    font-size: 1.6em;
    text-align: center;
    border-bottom: 3px solid #c41e3a;
    padding-bottom: 10px;
}

h3 {
    color: #c41e3a;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #165b33;
    font-weight: 600;
    font-size: 1.05em;
}

input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 3px solid #d4af37;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: #fffef8;
    font-family: 'Georgia', serif;
}

input[type="text"]:focus {
    outline: none;
    border-color: #c41e3a;
    box-shadow: 0 0 10px rgba(196, 30, 58, 0.3);
    background: white;
}

input[type="checkbox"] {
    margin-right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #c41e3a;
}

.participant-input {
    margin-bottom: 10px;
}

.btn-primary, .btn-secondary {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #c41e3a 0%, #8b0000 100%);
    color: white;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
    border: 2px solid #d4af37;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #8b0000 0%, #c41e3a 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(196, 30, 58, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #165b33 0%, #1a472a 100%);
    color: white;
    margin-top: 10px;
    border: 2px solid #d4af37;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1a472a 0%, #165b33 100%);
    transform: translateY(-2px);
}

.hidden {
    display: none;
}

.warning, .error {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-weight: 500;
}

.error {
    background: #ffd7da;
    border-color: #c41e3a;
    color: #721c24;
}

.assignment-box {
    background: linear-gradient(135deg, #c41e3a 0%, #165b33 50%, #d4af37 100%);
    color: white;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 3px solid #fff;
    position: relative;
}

.assignment-box::before {
    content: '🎁';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 30px;
}

.assignment-box::after {
    content: '🎁';
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
}

.assignment-box .label {
    font-size: 1.2em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 600;
}

.assigned-name {
    font-size: 2.2em;
    font-weight: bold;
    margin-top: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 2px dashed #fff;
}

.link-section {
    margin-top: 30px;
    background: linear-gradient(to right, rgba(196, 30, 58, 0.1), rgba(22, 91, 51, 0.1));
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #d4af37;
}

.link-section p {
    color: #165b33;
    margin-bottom: 10px;
    font-weight: 600;
}

.link-section .note {
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

.link-box {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.link-box input {
    flex: 1;
    font-weight: 500;
}

.link-box button {
    width: auto;
    margin: 0;
}

.completion-message {
    background: linear-gradient(135deg, #165b33 0%, #1a472a 100%);
    border: 3px solid #d4af37;
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.completion-message h3 {
    color: #d4af37;
    font-size: 1.8em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.completion-message p {
    font-size: 1.1em;
    margin-top: 10px;
}

#statusSection {
    text-align: center;
    margin-top: 20px;
    color: #165b33;
    font-style: italic;
    font-weight: 600;
    background: rgba(212, 175, 55, 0.2);
    padding: 10px;
    border-radius: 8px;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #d4af37;
}

.footer .link {
    color: #c41e3a;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1em;
}

.footer .link:hover {
    text-decoration: underline;
    color: #165b33;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .assigned-name {
        font-size: 1.5em;
    }

    .container::before,
    .container::after {
        font-size: 35px;
    }
}
