@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap');

:root {
    --bg-grad-1: #0f2027;
    --bg-grad-2: #203a43;
    --bg-grad-3: #2c5364;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #e74c3c;
    --gold: #f1c40f;
    --text: #ffffff;
    --text-muted: #bdc3c7;
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(to bottom right, var(--bg-grad-1), var(--bg-grad-2), var(--bg-grad-3));
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Background Snow Animation */
.snow {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><circle cx="5" cy="5" r="1" fill="white" opacity="0.3"/></svg>');
    background-size: 50px 50px;
    animation: snow 20s linear infinite;
}
@keyframes snow { 0% { background-position: 0 0; } 100% { background-position: 0 500px; } }

.container {
    width: 100%; max-width: 600px;
    padding: 20px; z-index: 1;
    flex: 1; display: flex; flex-direction: column;
    justify-content: center;
}

/* Typography */
h1, h2 { text-align: center; margin: 0 0 20px 0; text-shadow: 0 4px 10px rgba(0,0,0,0.3); }
h1 { font-size: 3rem; background: linear-gradient(to right, #fff, var(--gold)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { color: var(--primary); font-size: 1.8rem; }

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Form Elements */
label { display: block; margin: 15px 0 5px; color: var(--text-muted); font-size: 0.9rem; }
input, select, textarea {
    width: 100%; padding: 14px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border);
    border-radius: 10px; color: #fff; font-size: 1rem;
    transition: 0.3s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); background: rgba(0,0,0,0.5); }

button {
    width: 100%; padding: 16px;
    background: linear-gradient(45deg, var(--primary), #c0392b);
    color: white; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: 700;
    cursor: pointer; margin-top: 25px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
button:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6); }
button.secondary { background: rgba(255,255,255,0.1); box-shadow: none; margin-top: 10px; }
button.secondary:hover { background: rgba(255,255,255,0.2); }
button.small-btn { width: auto; padding: 8px 16px; font-size: 0.9rem; margin: 0; }
button.remove-btn { background: transparent; color: #e74c3c; border: 1px solid #e74c3c; padding: 12px; width: auto; }

/* Lists & Helpers */
.participant-row { display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.participant-row input { flex: 1; }
.exclusion-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; justify-content: space-between; background: rgba(0,0,0,0.2); padding: 10px; border-radius: 8px; }

.helper-text { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 20px; }
.hero-text { text-align: center; font-size: 1.2rem; line-height: 1.6; margin-bottom: 30px; color: #eee; }
.option-btn { margin-top: 10px; background: var(--bg-grad-3); border: 1px solid var(--gold); }

/* FLIP CARD REVEAL */
.scene { width: 100%; height: 240px; perspective: 600px; cursor: pointer; margin-top: 20px; }
.card-obj { width: 100%; height: 100%; position: relative; transition: transform 1s; transform-style: preserve-3d; }
.card-obj.is-flipped { transform: rotateY(180deg); }
.card-face {
    position: absolute; width: 100%; height: 100%;
    backface-visibility: hidden;
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.card-front { background: linear-gradient(135deg, #c0392b, #e74c3c); color: white; }
.card-back { background: #fff; color: #333; transform: rotateY(180deg); }
.gift-icon { font-size: 4rem; margin-bottom: 10px; }
.result-name { font-size: 2.5rem; font-weight: bold; color: var(--primary); text-align: center; }

/* Footer */
footer { width: 100%; text-align: center; padding: 20px; color: rgba(255,255,255,0.4); font-size: 0.8rem; z-index: 2; }
footer a { color: rgba(255,255,255,0.6); text-decoration: none; margin: 0 10px; }
footer a:hover { color: #fff; }
footer span a { text-decoration: none; color: rgba(255,255,255,0.5); }
footer span a:hover { color: #fff; }

.legal-wrapper {
    display: flex;
    justify-content: center;
    padding: 20px 10px;
}
.card.legal-text {
    max-width: 780px;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 30px 35px;
}
.card.legal-text h2, .card.legal-text h3 {
    color: #fff;
}
.card.legal-text p, .card.legal-text li {
    color: #d0d6dc;
    line-height: 1.6;
}
.card.legal-text ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}
