:root {
    --font-headings: 'Space Grotesk', sans-serif;
    --font-body: 'Poppins', sans-serif;
    --color-pink: #f000ff;
    --color-magenta: #c300ff;
    --color-purple: #8e2de2;
    --color-blue: #4a00e0;
    --text-light: #f0e6ff;
    --text-dark: #1a0537;
    --border-glow-1: rgba(240, 0, 255, 0.7);
    --border-glow-2: rgba(74, 0, 224, 0.7);
}

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

html, body {
    width: 100%;
    height: 100%;
    font-family: var(--font-body);
    color: var(--text-light);
    background-color: #0c011a;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    overflow-x: hidden;
}

.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--color-purple), var(--color-magenta), var(--color-pink), var(--color-blue));
    background-size: 400% 400%;
    animation: gradient-animation 15s ease infinite;
    overflow: hidden;
}

.music-note {
    position: absolute;
    color: rgba(255, 255, 255, 0.1);
    font-size: 5rem;
    user-select: none;
    animation: float-note 20s infinite linear;
}
.note-1 { top: 10%; left: 5%; animation-duration: 22s; animation-delay: -5s; }
.note-2 { top: 20%; left: 85%; font-size: 7rem; animation-duration: 25s; animation-delay: -2s; }
.note-3 { top: 60%; left: 15%; font-size: 4rem; animation-duration: 18s; animation-delay: 0s; }
.note-4 { top: 80%; left: 90%; font-size: 6rem; animation-duration: 28s; animation-delay: -10s; }
.note-5 { top: 40%; left: 50%; font-size: 8rem; animation-duration: 15s; animation-delay: -7s; }

.container {
    width: 100%;
    max-width: 650px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin: auto 0;
}

.glass-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 32px 0 rgba(19, 2, 41, 0.37);
}

.main-headline {
    font-family: var(--font-headings);
    font-size: 2.5rem;
    line-height: 1.1;
    background: linear-gradient(90deg, #fcebff, #e1c5ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto 2rem;
}

#entry-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

input[type="text"], input[type="email"], select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    color: #fff;
    transition: all 0.3s ease;
}
input::placeholder { color: rgba(255, 255, 255, 0.5); }
input:focus, select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 0 3px rgba(240, 0, 255, 0.4);
}

select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff' class='bi bi-chevron-down'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem;
}
select option { background-color: var(--text-dark); }

.cta-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-headings);
    color: #fff;
    background: linear-gradient(90deg, var(--color-pink), var(--color-magenta));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: pulse-button 2s infinite;
}
.cta-button:hover, .cta-button:focus {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    animation-play-state: paused;
}
.cta-button:disabled {
    background: #555;
    cursor: not-allowed;
    animation: none;
}

.rules-link-container {
    margin-top: 1rem;
    font-size: 0.8rem;
    opacity: 0.7;
}
.rules-link-container a {
    color: var(--text-light);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* Success State */
.success-headline {
    font-family: var(--font-headings);
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #fff;
}
.success-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.share-panel {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 12px;
}
.share-panel h3 { font-family: var(--font-headings); margin-bottom: 0.5rem; }
.share-panel p { font-size: 0.9rem; margin-bottom: 1rem; opacity: 0.9; }
.share-controls { display: flex; gap: 0.5rem; }
#share-url {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    text-overflow: ellipsis;
}
#copy-link-button {
    padding: 0 1rem;
    font-weight: 700;
    background: var(--color-pink);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}
#copy-link-button:hover { background: var(--color-magenta); }

/* Prizes Section */
#prizes-section {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
.prize-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.prize-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--border-glow-1), transparent 30%);
    animation: rotate-border 4s linear infinite;
}
.prize-card.tier-2::before { animation-delay: -1s; background: conic-gradient(transparent, var(--border-glow-2), transparent 30%); }
.prize-card.tier-3::before { animation-delay: -2s; }

.prize-tier {
    display: inline-block;
    background: var(--color-pink);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.prize-card.tier-2 .prize-tier { background: var(--color-magenta); }
.prize-card.tier-3 .prize-tier { background: var(--color-purple); }

.prize-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}
.prize-description {
    opacity: 0.8;
    line-height: 1.5;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 1000;
}
.modal-content {
    background: #1a0537;
    border: 1px solid var(--color-purple);
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-content h2 {
    font-family: var(--font-headings);
    text-align: center;
    margin-bottom: 1.5rem;
}
#rules-text-content {
    color: var(--text-light);
    line-height: 1.7;
}
#rules-text-content p, #rules-text-content ul { margin-bottom: 1rem; }
#rules-text-content ul { padding-left: 1.5rem; }
#rules-text-content strong { color: #fff; }

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
}

/* Utility & Other */
.hidden { display: none !important; }

.error-message {
    background-color: #ff3366;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    width: 100%;
    text-align: center;
    font-weight: 500;
    margin-top: 1rem;
}

#wbx-powered-by-slot {
    width: 100%;
    margin-top: 1rem;
}

/* Animations */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float-note {
    from { transform: translateY(0) rotate(0deg); }
    to { transform: translateY(-120vh) rotate(360deg); }
}

@keyframes pulse-button {
    0% { box-shadow: 0 0 0 0 rgba(240, 0, 255, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(240, 0, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(240, 0, 255, 0); }
}

@keyframes rotate-border {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (min-width: 768px) {
    #prizes-section {
        grid-template-columns: repeat(3, 1fr);
    }
    .main-headline {
        font-size: 3rem;
    }
}
