/* --- CSS Variables --- */
:root {
    --primary-hue: 25; /* Orange */
    --color-primary: hsl(var(--primary-hue), 100%, 50%);
    --color-primary-hover: hsl(var(--primary-hue), 100%, 45%);
    --color-bg-dark: #12081c;
    --color-text-light: #ffad66; /* Orange text */
    --color-text-muted: rgba(255, 173, 102, 0.7);
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --glass-bg: rgba(20, 10, 30, 0.75);
    --glass-border: rgba(255, 173, 102, 0.15);
    --glass-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* --- Resets & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Required Utility Class */
.hidden {
    display: none !important;
}

/* --- Background Image & Overlay --- */
.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(18, 8, 28, 0.9) 0%, rgba(33, 15, 52, 0.7) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
}

/* --- Layout & Typography --- */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #ff8a00 0%, #ffad66 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 0.02em;
}

h2 {
    font-size: 2rem;
}

p {
    color: var(--color-text-muted);
}

.subtitle {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 24px;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.5);
    color: #ffad66;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

/* --- Glassmorphism Cards --- */
.glass-card, .status-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 700px;
    box-shadow: var(--glass-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Decorative glowing orb inside card */
.glass-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.15) 0%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
}

#rsvp-form, .success-container, .share-section {
    position: relative;
    z-index: 1;
}

/* --- Form Styles --- */
#rsvp-form {
    text-align: left;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 8px;
    letter-spacing: 0.02em;
}

input, select, textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 173, 102, 0.05);
    border: 1px solid rgba(255, 173, 102, 0.2);
    border-radius: var(--radius-sm);
    color: #ffad66;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 173, 102, 0.4);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(255, 173, 102, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffad66' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

select option {
    background-color: var(--color-bg-dark);
    color: #ffad66;
}

/* --- Buttons --- */
button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--color-primary);
    color: #12081c;
    width: 100%;
    padding: 16px;
    margin-top: 10px;
    font-size: 1.1rem;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.4);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

.btn-secondary {
    background: rgba(255, 173, 102, 0.1);
    color: #ffad66;
    border: 1px solid rgba(255, 173, 102, 0.2);
    padding: 14px 24px;
}

.btn-secondary:hover {
    background: rgba(255, 173, 102, 0.15);
    border-color: rgba(255, 173, 102, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    z-index: 2;
    width: 24px;
    height: 24px;
}
.spinner .path {
    stroke: #12081c;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* --- Error Messages --- */
.error-msg {
    background-color: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #fca5a5;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 0.9rem;
    text-align: center;
}

/* --- Success Screen --- */
.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 107, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--color-primary);
}

.event-details-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 173, 102, 0.1);
    padding: 24px;
    border-radius: var(--radius-sm);
    margin-top: 32px;
    text-align: left;
}

.event-details-card p {
    margin-bottom: 8px;
    color: var(--color-text-light);
}
.event-details-card p:last-child {
    margin-bottom: 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
}

/* --- Share Panel --- */
.divider {
    height: 1px;
    background: rgba(255, 173, 102, 0.2);
    margin: 40px 0;
    width: 100%;
}

.share-controls {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.share-controls input {
    flex: 1;
    color: var(--color-primary);
    background: rgba(0,0,0,0.3);
}

/* --- Footer Slot --- */
#wbx-powered-by-slot {
    margin-top: 40px;
    text-align: center;
    width: 100%;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .glass-card {
        padding: 32px 20px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .share-controls {
        flex-direction: column;
    }
}
