:root {
    --primary: #9b6b9e;
    --primary-light: #cfa8d1;
    --primary-dark: #633b66;
    --accent: #f2c94c;
    --text-main: #333333;
    --text-light: #666666;
    --bg-glass: rgba(255, 255, 255, 0.82);
    --border-glass: rgba(255, 255, 255, 0.4);
    --shadow-glass: rgba(155, 107, 158, 0.15);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-pixel: 'Press Start 2P', monospace;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #000;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Video Background ── */
#video-bg-wrapper {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

#video-bg-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
    pointer-events: none;
}

/* ── Landing Screen ── */
#landing-screen {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#landing-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.landing-content {
    text-align: center;
    padding: 2rem;
}

.landing-pre {
    font-family: var(--font-pixel);
    font-size: 0.6rem;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
}

.landing-title {
    font-family: var(--font-pixel);
    font-size: clamp(1.4rem, 5vw, 3.5rem);
    color: #fff;
    line-height: 1.6;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.5);
    margin-bottom: 1.2rem;
    image-rendering: pixelated;
}

.landing-sub {
    font-family: var(--font-pixel);
    font-size: 0.55rem;
    color: rgba(255,255,255,0.65);
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    line-height: 2;
}

.landing-btn {
    font-family: var(--font-pixel);
    font-size: 0.75rem;
    color: #fff;
    background: transparent;
    border: 2px solid #fff;
    padding: 1rem 2rem;
    cursor: pointer;
    letter-spacing: 0.1em;
    image-rendering: pixelated;
    position: relative;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    box-shadow: 4px 4px 0px rgba(255,255,255,0.3);
}

.landing-btn:hover {
    background: #fff;
    color: #000;
    box-shadow: 6px 6px 0px rgba(255,255,255,0.5);
}

.landing-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(255,255,255,0.3);
}

/* ── Form Panel ── */
#form-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(600px, 100%);
    height: 100vh;
    overflow-y: auto;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

#form-panel.open {
    transform: translateX(0);
}

.close-btn {
    align-self: flex-end;
    font-family: var(--font-pixel);
    font-size: 0.7rem;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.6);
    color: #fff;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #fff;
    color: #000;
}

/* Glassmorphism Form Container */
.form-container {
    background: var(--bg-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 var(--shadow-glass);
    width: 100%;
    padding: 2.5rem 2.5rem 120px 2.5rem; /* Increased bottom padding */
    position: relative;
}

/* Form Header */
.form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.subtitle {
    font-family: var(--font-pixel);
    font-size: 0.65rem;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.event-details {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.05rem;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.4);
    padding: 1.2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.5);
}

.event-date, .event-location, .event-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
}

.event-details .icon {
    color: var(--primary-dark);
}


.separator {
    height: 2px;
    width: 80px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 1.5rem auto 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

/* Stagger animations for fields */
.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }
.form-group:nth-child(5) { animation-delay: 0.5s; }
.form-group:nth-child(6) { animation-delay: 0.6s; }
.form-group:nth-child(7) { animation-delay: 0.7s; }
.form-group:nth-child(8) { animation-delay: 0.8s; }
.form-group:nth-child(9) { animation-delay: 0.9s; }

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

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 1.05rem;
}

.form-group.has-error label {
    color: #e74c3c;
}

.form-group.has-error input[type="text"],
.form-group.has-error textarea,
.form-group.has-error .file-upload-design,
.form-group.has-error .photo-preview-grid {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05) !important;
}

.form-group.has-error .checkmark {
    border-color: #e74c3c !important;
}

.required {
    color: #e74c3c;
}

.field-hint {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
    font-style: italic;
}

.price-hint {
    font-size: 0.8rem;
    color: var(--primary-dark);
    font-weight: 600;
    font-style: normal;
}

.event-location a {
    color: inherit;
    text-decoration: none;
}

/* Inputs & Textareas */
input[type="text"],
textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: #ffffff; /* Solid white background */
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(155, 107, 158, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #a0a0a0;
}

/* Checkboxes & Radios */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.custom-checkbox,
.custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-weight: 400;
    user-select: none;
    transition: color 0.2s;
}

.custom-checkbox:hover,
.custom-radio:hover {
    color: var(--primary-dark);
}

.custom-checkbox input,
.custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark,
.radiomark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-light);
    transition: all 0.2s ease;
}

.checkmark {
    border-radius: 6px;
}

.radiomark {
    border-radius: 50%;
}

.custom-checkbox:hover input ~ .checkmark,
.custom-radio:hover input ~ .radiomark {
    background-color: #fff;
    border-color: var(--primary);
}

.custom-checkbox input:checked ~ .checkmark,
.custom-radio input:checked ~ .radiomark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after,
.radiomark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after,
.custom-radio input:checked ~ .radiomark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-radio .radiomark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    min-height: 120px;
    margin-top: 0.5rem;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-design {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    border: 2px dashed var(--primary-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    color: var(--primary);
}

.file-upload-design.drag-over {
    background: rgba(155, 107, 158, 0.1);
    border-color: var(--primary);
}

.file-upload-design svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.file-upload-wrapper:hover .file-upload-design {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary);
}

.file-upload-wrapper:hover .file-upload-design svg {
    transform: translateY(-5px);
}

/* Photo Previews */
.photo-preview-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.6rem;
    padding: 0.75rem;
    border: 2px dashed var(--primary-light);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    margin-top: 0;
    position: relative;
    z-index: 1;
}

.photo-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.65);
    color: #fff;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s;
    line-height: 1;
}

.photo-remove-btn:hover {
    background: #e74c3c;
}


/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(155, 107, 158, 0.4);
    margin-top: 2rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 107, 158, 0.6);
}

.submit-btn:active {
    transform: translateY(1px);
}

/* Button Magic effect */
.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

/* Responsive */
@media (max-width: 1024px) {
    body {
        justify-content: center; /* Center on tablets and mobile */
    }
    
    .form-container {
        margin-right: 0;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .form-container {
        padding: 2rem 1.5rem;
    }
    
    .main-title {
        font-size: 2.2rem;
    }
    
    .fairy-1 {
        opacity: 0.3;
        width: 750px;
        max-width: none;
    }
}

.address-link {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: all 0.3s ease;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 1.1em;
    display: inline-block; /* Crucial for correct padding behavior */
}

.address-link:hover {
    background-color: var(--primary);
    color: #fff !important; /* Ensure text stays white */
    border-bottom: 1px solid var(--primary);
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 3rem 1rem;
    animation: fadeInSuccess 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}

.success-screen h2 {
    font-family: var(--font-pixel);
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.success-screen p {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.6;
}

.form-footer-note {
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .form-container {
        padding-bottom: 150px !important;
    }
}

@keyframes fadeInSuccess {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-15px);}
    60% {transform: translateY(-7px);}
}

.address-link {
    color: #fff;
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
    transition: all 0.3s ease;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 1.1em;
    display: inline-block;
}

.address-link:hover {
    background-color: var(--primary);
    color: #fff !important;
    border: 1px solid var(--primary);
    font-size: 1.2em;
}

/* Neon Helper Classes */
.color-magenta {
    color: var(--primary);
    text-shadow: 0 0 15px rgba(217, 70, 239, 0.4);
}

.color-green {
    color: var(--accent);
    text-shadow: 0 0 15px rgba(61, 242, 160, 0.4);
}

.landing-btn {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
}

.landing-btn:hover {
    background: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.6);
    transform: translateY(-2px) scale(1.05);
}
