/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gold-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    
    --primary-color: #667eea;
    --secondary-color: #f093fb;
    --accent-color: #4facfe;
    --gold-color: #f6d365;
    
    --background-light: #f8fafc;
    --background-dark: #1a202c;
    --card-background: rgba(255, 255, 255, 0.95);
    --glass-background: rgba(255, 255, 255, 0.1);
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-light: #a0aec0;
    --text-white: #ffffff;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    
    /* Typography */
    --font-family-primary: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-family-script: 'Dancing Script', cursive;
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s ease-out;
    --transition-slow: 0.5s ease-out;
    
    /* Z-index */
    --z-background: -1;
    --z-normal: 1;
    --z-elevated: 10;
    --z-sticky: 20;
    --z-dropdown: 30;
    --z-modal: 40;
    --z-popover: 50;
    --z-tooltip: 60;
    --z-toast: 70;
    --z-custom-select: 10000;
}

/* ==================== RESET & BASE STYLES ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-light);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background var(--transition-slow);
}

/* ==================== BACKGROUND EFFECTS ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(240, 147, 251, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(79, 172, 254, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    z-index: var(--z-background);
    pointer-events: none;
}

/* Enhanced background for different screens */
body.gift-screen-active::before {
    background: 
        radial-gradient(ellipse at top left, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(240, 147, 251, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at center, rgba(79, 172, 254, 0.1) 0%, transparent 70%),
        linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    animation: background-shift 8s ease-in-out infinite alternate;
}

body.reveal-screen-active::before {
    background: 
        radial-gradient(ellipse at bottom right, rgba(102, 126, 234, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at bottom left, rgba(240, 147, 251, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse at center, rgba(246, 211, 101, 0.1) 0%, transparent 80%),
        linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
}

@keyframes background-shift {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* ==================== FLOATING BACKGROUND ELEMENTS ==================== */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-background);
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    border-radius: var(--radius-full);
    opacity: 0.1;
    animation: float 20s infinite linear;
}

.circle-1 {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 25s;
}

.circle-2 {
    width: 120px;
    height: 120px;
    background: var(--secondary-gradient);
    top: 60%;
    right: 15%;
    animation-delay: -5s;
    animation-duration: 30s;
    animation-direction: reverse;
}

.circle-3 {
    width: 60px;
    height: 60px;
    background: var(--accent-gradient);
    bottom: 20%;
    left: 20%;
    animation-delay: -10s;
    animation-duration: 35s;
}

.circle-4 {
    width: 100px;
    height: 100px;
    background: var(--gold-gradient);
    top: 30%;
    right: 30%;
    animation-delay: -15s;
    animation-duration: 28s;
    animation-direction: reverse;
}

.circle-5 {
    width: 150px;
    height: 150px;
    background: var(--primary-gradient);
    bottom: 10%;
    right: 10%;
    animation-delay: -20s;
    animation-duration: 40s;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    33% { transform: translateY(-30px) translateX(30px) rotate(120deg); }
    66% { transform: translateY(30px) translateX(-20px) rotate(240deg); }
    100% { transform: translateY(0px) translateX(0px) rotate(360deg); }
}

/* ==================== CANVAS STYLES ==================== */
#three-canvas,
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-background);
}

#confetti-canvas {
    z-index: var(--z-toast);
}

/* ==================== MAIN LAYOUT ==================== */
main {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    padding: var(--spacing-md);
    position: relative;
    z-index: 100;
    transition: max-width var(--transition-slow) ease-out;
}

body.reveal-screen-active main {
    max-width: 1200px;
}

/* ==================== CONTAINER STYLES ==================== */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--spacing-xl);
    gap: var(--spacing-xl);
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transition: all var(--transition-normal);
}

.container.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* ==================== CARD STYLES ==================== */
.card {
    background: var(--card-background);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-width: 420px;
    text-align: center;
    position: relative;
    overflow: visible;
    transition: all var(--transition-normal);
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        transparent,
        rgba(102, 126, 234, 0.1),
        transparent 30%
    );
    animation: rotate 15s linear infinite;
    z-index: -2;
}

.card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--card-background);
    border-radius: calc(var(--radius-2xl) - 2px);
    z-index: -1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ==================== FORM CARD SPECIFIC ==================== */
.form-card {
    transform: translateY(20px);
    animation: slideInUp 0.8s ease-out forwards;
}

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

.card-header {
    margin-bottom: var(--spacing-xl);
}

.graduation-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    color: var(--text-white);
    box-shadow: var(--shadow-glow);
    animation: pulse 2s ease-in-out infinite;
}

.graduation-icon svg {
    width: 30px;
    height: 30px;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-family-script);
}

.card p {
    color: #2d3748;
    font-size: 1.1rem;
    line-height: 1.6;
    font-weight: 500;
}

/* ==================== FORM STYLES ==================== */
.wish-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

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

.input-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
}

.label-icon {
    font-size: 1.2rem;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.input-wrapper {
    position: relative;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-lg);
    font-family: var(--font-family-primary);
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2d3748;
    transition: all var(--transition-normal);
    outline: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    color: #1a202c;
}

.input-wrapper input:focus + .input-highlight,
.input-wrapper select:focus + .input-highlight {
    transform: scaleX(1);
}

.input-wrapper input::placeholder {
    color: #718096;
    opacity: 0.8;
}

.input-wrapper select option {
    background: #ffffff;
    color: #2d3748;
    padding: var(--spacing-sm);
}

/* ==================== CUSTOM SELECT STYLES ==================== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    z-index: 99999;
}

.custom-select {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all var(--transition-normal);
    z-index: 99999;
}

.custom-select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.custom-select.open {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    background: rgba(255, 255, 255, 1);
    z-index: 999999;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    font-family: var(--font-family-primary);
    font-size: 1rem;
    color: #2d3748;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.custom-select__placeholder {
    color: #718096;
    font-style: italic;
}

.custom-select__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    transition: transform var(--transition-normal);
}

.custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid var(--primary-color);
    /* border-top: none; */
    border-radius: var(--radius-lg) var(--radius-lg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(15px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 99999;
    max-height: 0;
    overflow: hidden;
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 300px;
    z-index: 999999;
}

.custom-select__option {
    display: flex;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
    position: relative;
    overflow: hidden;
}

.custom-select__option:last-child {
    border-bottom: none;
}

.custom-select__option:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(240, 147, 251, 0.1) 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.custom-select__option:hover .option-icon {
    transform: scale(1.2) rotate(5deg);
}

.custom-select__option.selected {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(240, 147, 251, 0.15) 100%);
    color: var(--primary-color);
    font-weight: 600;
}

.option-icon {
    font-size: 1.5rem;
    margin-right: var(--spacing-md);
    width: 30px;
    text-align: center;
    animation: bounce 2s ease-in-out infinite;
    transition: all var(--transition-normal);
}

.option-text {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
    display: block;
}

.option-desc {
    font-size: 0.85rem;
    color: #718096;
    font-style: italic;
    display: block;
}

.custom-select__option:hover .option-text {
    color: var(--primary-color);
}

.custom-select__option:hover .option-desc {
    color: #4a5568;
}

/* Ripple effect for options */
.custom-select__option::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-select__option:active::before {
    width: 300px;
    height: 300px;
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--transition-normal);
    border-radius: var(--radius-sm);
}

/* ==================== BUTTON STYLES ==================== */
.submit-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
    padding: var(--spacing-lg) var(--spacing-xl);
    background: var(--primary-gradient);
    color: var(--text-white);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-shimmer {
    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.5s;
}

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

.btn-icon {
    font-size: 1.3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ==================== GIFT SCREEN STYLES ==================== */
.gift-scene {
    text-align: center;
    max-width: 500px;
}

.gift-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-2xl);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-family-script);
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#gift-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding: var(--spacing-2xl);
    transition: all var(--transition-normal);
    border-radius: var(--radius-full);
}

#gift-wrapper:hover {
    transform: translateY(-10px) scale(1.05);
    filter: drop-shadow(0 20px 40px rgba(240, 147, 251, 0.4));
}

#gift-wrapper:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

#gift-wrapper:active {
    transform: translateY(-5px) scale(1.02);
}

#gift-box {
    width: 320px;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(102, 126, 234, 0.3));
    animation: giftFloat 3s ease-in-out infinite;
}

@keyframes giftFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

#gift-box svg .box {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
    transition: all var(--transition-normal);
}

#gift-box svg .ribbon-v,
#gift-box svg .ribbon-h {
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 2px 4px rgba(249, 224, 118, 0.3));
}

#gift-box svg .bow {
    filter: drop-shadow(0 3px 6px rgba(249, 224, 118, 0.4));
    animation: bowPulse 2s ease-in-out infinite;
}

#gift-box svg .bow-knot {
    filter: drop-shadow(0 2px 8px rgba(249, 224, 118, 0.5));
    animation: knotSpin 4s linear infinite;
}

@keyframes bowPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes knotSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== SPARKLES ==================== */
.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0;
    animation: sparkleAnim 3s ease-in-out infinite;
    pointer-events: none;
}

.sparkle-1 { top: 10%; left: 15%; animation-delay: 0s; }
.sparkle-2 { top: 20%; right: 10%; animation-delay: 0.5s; }
.sparkle-3 { bottom: 30%; left: 10%; animation-delay: 1s; }
.sparkle-4 { bottom: 20%; right: 20%; animation-delay: 1.5s; }
.sparkle-5 { top: 60%; left: 5%; animation-delay: 2s; }
.sparkle-6 { top: 70%; right: 5%; animation-delay: 2.5s; }

@keyframes sparkleAnim {
    0%, 100% {
        opacity: 0;
        transform: scale(0.3) rotate(0deg);
    }
    25% {
        opacity: 0.8;
        transform: scale(1) rotate(90deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
    75% {
        opacity: 0.6;
        transform: scale(0.8) rotate(270deg);
    }
}

.gift-instruction {
    margin-top: var(--spacing-xl);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==================== REVEAL SCREEN STYLES ==================== */
.invitation-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.invitation-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-3xl);
    align-items: center;
    min-height: 80vh;
}

.invitation-image-section {
    display: flex;
    justify-content: center;
}

.image-frame {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    transition: all var(--transition-normal);
}

.image-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

#revealed-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-2xl);
    transition: all var(--transition-normal);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.1) 0%,
        rgba(240, 147, 251, 0.05) 50%,
        rgba(79, 172, 254, 0.1) 100%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    border-radius: var(--radius-2xl);
}

.image-frame:hover .image-overlay {
    opacity: 1;
}

.invitation-content-section {
    color: var(--text-white);
    padding: var(--spacing-xl);
}

.thank-you-message {
    margin-bottom: var(--spacing-2xl);
}

#revealed-wish {
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#revealed-wish::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: var(--primary-color);
    opacity: 0.6;
    line-height: 1;
}

.invitation-details {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--spacing-xl);
}

.divider {
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    margin: var(--spacing-xl) 0;
    border: none;
}

.invite-header {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.event-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, #ffffff 0%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(240, 147, 251, 0.5);
    font-family: var(--font-family-script);
}

.event-host {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xl);
    color: rgba(255, 255, 255, 0.9);
}

.event-host strong {
    font-weight: 700;
    color: var(--text-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 25%, #48dbfb 50%, #ff9ff3 75%, #f368e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
    margin-left: 18px;
    position: relative;
    display: inline-block;
    animation: rainbowText 3s ease-in-out infinite;
}

.event-host strong::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -10px;
    right: -10px;
    bottom: -5px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(254, 202, 87, 0.2), rgba(72, 219, 251, 0.2), rgba(255, 159, 243, 0.2), rgba(243, 104, 224, 0.2));
    border-radius: 20px;
    z-index: -1;
    animation: rainbowGlow 3s ease-in-out infinite;
}

.event-host strong::after {
    content: '✨';
    position: absolute;
    top: -15px;
    right: -20px;
    font-size: 1.2rem;
    animation: twinkle 2s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

@keyframes rainbowText {
    0%, 100% { 
        filter: hue-rotate(0deg) brightness(1);
        transform: scale(1);
    }
    25% { 
        filter: hue-rotate(90deg) brightness(1.1);
        transform: scale(1.02);
    }
    50% { 
        filter: hue-rotate(180deg) brightness(1.2);
        transform: scale(1.05);
    }
    75% { 
        filter: hue-rotate(270deg) brightness(1.1);
        transform: scale(1.02);
    }
}

@keyframes rainbowGlow {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes sparkleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-30px) scale(0.5);
    }
}

.event-details {
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(5px);
}

.event-details p {
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.event-details p:last-child {
    margin-bottom: 0;
}

.event-details strong {
    color: var(--text-white);
    font-weight: 600;
}

.closing-text {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    line-height: 1.6;
    font-style: italic;
}

/* ==================== QR CODE MESSAGE STYLES ==================== */
.qr-message {
    background: rgba(102, 126, 234, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
    backdrop-filter: blur(5px);
}

.qr-message p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.qr-message.insider p {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.action-buttons {
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-xl);
}

.reset-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    backdrop-filter: blur(10px);
}

.reset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.reset-btn svg {
    width: 18px;
    height: 18px;
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 1;
    visibility: visible;
    transition: all var(--transition-slow);
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: var(--text-white);
}

.loading-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    animation: loadingBounce 1.5s ease-in-out infinite;
}

@keyframes loadingBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xl);
    opacity: 0.9;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #ffffff, #f093fb);
    border-radius: var(--radius-full);
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; transform: translateX(-100%); }
    50% { width: 100%; transform: translateX(0%); }
    100% { width: 100%; transform: translateX(100%); }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1024px) {
    .invitation-layout {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .invitation-content-section {
        padding: var(--spacing-lg);
    }
    
    .event-title {
        font-size: 1.8rem;
    }
    
    #revealed-wish {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    main {
        padding: var(--spacing-sm);
    }
    
    .container {
        padding: var(--spacing-lg);
    }
    
    .card {
        padding: var(--spacing-xl);
    }
    
    .card h1 {
        font-size: 1.6rem;
    }
    
    .gift-title {
        font-size: 2rem;
    }
    
    #gift-box {
        width: 280px;
    }
    
    .event-title {
        font-size: 1.6rem;
    }
    
    #revealed-wish {
        font-size: 1.1rem;
        padding: var(--spacing-lg);
    }
    
    .invitation-details {
        padding: var(--spacing-lg);
    }
    
    /* Custom select mobile adjustments */
    .custom-select__option {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .option-icon {
        margin-right: 0;
        margin-bottom: var(--spacing-sm);
    }
    
    .event-host strong {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .card {
        padding: var(--spacing-lg);
        margin: var(--spacing-md);
    }
    
    .card h1 {
        font-size: 1.4rem;
    }
    
    .card p {
        font-size: 1rem;
    }
    
    .gift-title {
        font-size: 1.7rem;
    }
    
    #gift-box {
        width: 240px;
    }
    
    .event-title {
        font-size: 1.4rem;
    }
    
    .event-host {
        font-size: 1.2rem;
    }
    
    #revealed-wish {
        font-size: 1rem;
    }
    
    .floating-circle {
        display: none;
    }
}

/* ==================== ACCESSIBILITY ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --card-background: rgba(255, 255, 255, 0.1);
        --text-primary: #f7fafc;
        --text-secondary: #e2e8f0;
    }
}

/* Focus states for better accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-primary);
    }
    
    button {
        border: 2px solid var(--text-white);
    }
}

/* ==================== PRINT STYLES ==================== */
@media print {
    body::before,
    .floating-elements,
    #three-canvas,
    #confetti-canvas,
    .sparkles,
    .action-buttons {
        display: none !important;
    }
    
    .container {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}