:root {
    --primary: #ec4899;
    --primary-light: #f9a8d4;
    --primary-dark: #be185d;
    --secondary: #8b5cf6;
    --success: #10b981;
    --background: #0f172a;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-primary: #1f2937;
    --text-light: #6b7280;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #ec4899, #be185d);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6, #6d28d9);
    bottom: -250px;
    right: -250px;
    animation-delay: 7s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #f59e0b, #dc2626);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 14s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50px, -50px) scale(1.1); }
    50% { transform: translate(-30px, 50px) scale(0.9); }
    75% { transform: translate(40px, 30px) scale(1.05); }
}

/* Namen Rotation */
.name-rotation {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

.rotation-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    padding: 4rem 3rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rotating-names {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease-out;
}

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

.rotation-subtitle {
    margin-top: 1.5rem;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    animation: pulse 2s infinite;
}

/* Container */
.container {
    max-width: 42rem;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Glass Morphism Card */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 2rem;
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(236, 72, 153, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wedding-info {
    flex: 1;
}

.couple-names {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.wedding-date {
    color: var(--text-light);
    font-size: 1rem;
}

.photo-counter {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(236, 72, 153, 0.3);
}

/* Select */
.section {
    margin-bottom: 1.5rem;
}

.label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.label-icon {
    font-size: 1.5rem;
}

.select-wrapper {
    position: relative;
}

.select {
    width: 100%;
    padding: 1.25rem 3rem 1.25rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid rgba(236, 72, 153, 0.3);
    border-radius: 1rem;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    font-family: 'Poppins', sans-serif;
}

.select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.2),
                0 10px 15px -3px rgba(236, 72, 153, 0.1);
    transform: translateY(-2px);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    transition: transform 0.3s;
}

.select:focus + .select-arrow {
    transform: translateY(-50%) rotate(180deg);
}

/* Greeting */
.greeting {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: white;
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(236, 72, 153, 0.3);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.greeting::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2), transparent);
    animation: rotate 10s linear infinite;
}

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

.greeting-emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.greeting-text {
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

/* Challenge Box */
.challenge-box {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 3px solid #fbbf24;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.challenge-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.8; }
}

.challenge-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
}

.challenge-text {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Upload Button */
.upload-btn {
    width: 100%;
    padding: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    border: none;
    border-radius: 1.25rem;
    cursor: pointer;
    box-shadow: 0 20px 25px -5px rgba(236, 72, 153, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.upload-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(236, 72, 153, 0.5);
}

.upload-btn:active {
    transform: translateY(-2px) scale(0.98);
}

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

.btn-icon {
    font-size: 2rem;
}

/* Upload Progress */
.upload-progress {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s;
}

.progress-bar {
    height: 0.75rem;
    background: rgba(236, 72, 153, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    border-radius: 1rem;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(236, 72, 153, 0.5);
}

.progress-text {
    text-align: center;
    color: var(--text-light);
    font-weight: 500;
}

/* Success Message */
.success-msg {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border: 3px solid #10b981;
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    margin-bottom: 1rem;
    animation: checkmark 0.8s ease-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0) rotate(-45deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

.success-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.success-text {
    font-size: 1.125rem;
    color: #047857;
    font-weight: 500;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
}

.back-btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    background: white;
    border: 2px solid var(--primary);
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.back-btn:hover {
    background: #fef2f2;
    transform: translateX(-4px);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(236, 72, 153, 0.2);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-icon {
    font-size: 1.5rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(1); }
}

/* Utilities */
.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Responsive */
@media (max-width: 640px) {
    .couple-names {
        font-size: 1.5rem;
    }
    
    .photo-counter {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }
    
    .rotating-names {
        font-size: 2rem;
    }
    
    .challenge-text {
        font-size: 1.125rem;
    }
    
    .upload-btn {
        font-size: 1.25rem;
    }
}
