/* ==========================================
   WIG VIBE QUIZ - ENHANCED INTERACTIVE STYLES
   Mobile-First, Fun & Highly Engaging Design
   ========================================== */

/* CSS Variables */
:root {
    --primary-pink: #ec4899;
    --primary-purple: #8b5cf6;
    --primary-coral: #f472b6;
    --accent-gold: #fbbf24;
    --accent-teal: #06b6d4;
    --accent-green: #10b981;
    --dark-bg: #0f0a1a;
    --card-bg: #1a1225;
    --card-bg-light: #251a35;
    --text-primary: #ffffff;
    --text-secondary: #a78bfa;
    --text-muted: #9ca3af;
    --gradient-primary: linear-gradient(135deg, var(--primary-pink) 0%, var(--primary-purple) 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-card: linear-gradient(145deg, var(--card-bg-light) 0%, var(--card-bg) 100%);
    --shadow-glow: 0 0 40px rgba(236, 72, 153, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(236, 72, 153, 0.5);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.4);
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    background-image:
        radial-gradient(ellipse at 20% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 50%);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* App Container */
.app-container {
    max-width: 500px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    overflow: hidden;
}

/* Floating Sparkles - Enhanced */
.floating-sparkle {
    position: fixed;
    font-size: 1.5rem;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 10px currentColor);
}

.sparkle-1 { top: 10%; left: 10%; animation-delay: 0s; }
.sparkle-2 { top: 30%; right: 15%; animation-delay: 2s; }
.sparkle-3 { bottom: 20%; left: 20%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-15px) rotate(5deg) scale(1.1); }
    50% { transform: translateY(-25px) rotate(10deg) scale(1); }
    75% { transform: translateY(-10px) rotate(-5deg) scale(1.1); }
}

/* Screen States */
.screen {
    display: none;
    padding: 1.5rem;
    min-height: 100vh;
    min-height: 100dvh;
    opacity: 0;
    transform: translateY(20px);
}

.screen.active {
    display: flex;
    flex-direction: column;
    animation: screenEnter 0.6s ease-out forwards;
}

.screen.exit {
    animation: screenExit 0.4s ease-in forwards;
}

@keyframes screenEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes screenExit {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(-30px) scale(0.98); }
}

/* ==========================================
   WELCOME SCREEN
   ========================================== */
#welcome-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.welcome-content {
    width: 100%;
    max-width: 400px;
}

.logo-badge {
    width: 90px;
    height: 90px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow-glow);
    animation: logoPulse 2s ease-in-out infinite, logoFloat 3s ease-in-out infinite;
    cursor: pointer;
    transition: var(--transition-bounce);
}

.logo-badge:hover {
    transform: scale(1.1) rotate(5deg);
}

.logo-badge:active {
    transform: scale(0.95);
}

.crown {
    font-size: 2.8rem;
    animation: crownBounce 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 30px rgba(236, 72, 153, 0.4); }
    50% { box-shadow: 0 0 60px rgba(236, 72, 153, 0.7); }
}

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

@keyframes crownBounce {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    animation: titleShimmer 3s ease-in-out infinite;
}

@keyframes titleShimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.subtext {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    padding: 0 1rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

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

/* Wig Preview Grid - Enhanced */
.wig-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.preview-wig {
    aspect-ratio: 1;
    background: var(--gradient-card);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wigPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
    animation-delay: var(--delay);
    transition: var(--transition-bounce);
    border: 2px solid rgba(139, 92, 246, 0.2);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.preview-wig::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-wig:hover {
    transform: scale(1.1) rotate(3deg);
    border-color: var(--primary-pink);
    box-shadow: var(--shadow-glow);
}

.preview-wig:hover::before {
    opacity: 0.1;
}

.preview-wig:active {
    transform: scale(0.95);
}

@keyframes wigPop {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

.wig-icon {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* CTA Button - Enhanced */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1.1rem 3rem;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-bounce);
    box-shadow: var(--shadow-glow);
    font-family: inherit;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: buttonShine 3s ease-in-out infinite;
}

@keyframes buttonShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-glow-strong);
}

.cta-button:active {
    transform: scale(0.96);
}

.cta-button.pulse {
    animation: fadeInUp 0.8s ease-out 0.6s backwards, buttonPulse 2s ease-in-out infinite 1.4s;
}

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

.arrow {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.cta-button:hover .arrow {
    transform: translateX(8px);
}

.time-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

/* ==========================================
   QUIZ SCREEN - ENHANCED
   ========================================== */
#quiz-screen {
    padding-top: 1rem;
}

.quiz-header {
    margin-bottom: 1.5rem;
}

/* Streak Counter */
.streak-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.streak-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-gold);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
    animation: streakPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.streak-badge.hidden {
    display: none;
}

@keyframes streakPop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.streak-fire {
    animation: fireFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    from { transform: scale(1) rotate(-5deg); }
    to { transform: scale(1.1) rotate(5deg); }
}

/* Progress Bar - Enhanced */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 10px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 16.66%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
    min-width: 50px;
    text-align: right;
}

/* Question Container - Enhanced */
.question-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.question-wrapper {
    animation: questionSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.question-wrapper.exit {
    animation: questionExit 0.3s ease-in forwards;
}

@keyframes questionSlide {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes questionExit {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-50px); }
}

.question-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    animation: emojiPop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s backwards;
}

@keyframes emojiPop {
    from { transform: scale(0) rotate(-20deg); }
    to { transform: scale(1) rotate(0deg); }
}

.question-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    animation: fadeInUp 0.5s ease-out 0.1s backwards;
}

.question-subtext {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease-out 0.2s backwards;
}

/* Answer Options - Enhanced */
.options-grid {
    display: grid;
    gap: 1rem;
}

.options-grid.two-column {
    grid-template-columns: repeat(2, 1fr);
}

.options-grid.single-column {
    grid-template-columns: 1fr;
}

.option-card {
    background: var(--gradient-card);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--border-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    animation: optionPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) backwards;
}

.option-card:nth-child(1) { animation-delay: 0.1s; }
.option-card:nth-child(2) { animation-delay: 0.15s; }
.option-card:nth-child(3) { animation-delay: 0.2s; }
.option-card:nth-child(4) { animation-delay: 0.25s; }

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

/* Ripple effect */
.option-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(236, 72, 153, 0.4);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

.option-card:hover {
    border-color: var(--primary-pink);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(236, 72, 153, 0.25);
}

.option-card:active {
    transform: scale(0.97);
}

.option-card.selected {
    border-color: var(--primary-pink);
    background: linear-gradient(145deg, rgba(236, 72, 153, 0.25) 0%, rgba(139, 92, 246, 0.25) 100%);
    box-shadow: var(--shadow-glow);
    animation: selectPulse 0.5s ease-out;
}

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

/* Checkmark animation */
.option-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    animation: checkPop 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkPop {
    from { transform: scale(0) rotate(-180deg); }
    to { transform: scale(1) rotate(0deg); }
}

.option-wig-image {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition-bounce);
}

.option-card:hover .option-wig-image {
    transform: scale(1.1) rotate(5deg);
}

.option-wig-image svg {
    width: 70%;
    height: 70%;
}

.option-emoji {
    font-size: 2.8rem;
    transition: var(--transition-bounce);
}

.option-card:hover .option-emoji {
    transform: scale(1.2);
}

.option-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.option-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Slider Question - Enhanced */
.slider-container {
    padding: 1rem 0;
}

.slider-track {
    position: relative;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.slider-input {
    width: 100%;
    height: 12px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 50%;
    cursor: grab;
    box-shadow: var(--shadow-glow);
    transition: var(--transition-bounce);
    border: 3px solid white;
}

.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-glow-strong);
}

.slider-input::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
}

.slider-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-smooth);
}

.slider-label.active {
    color: var(--primary-pink);
    transform: scale(1.1);
}

.slider-label-emoji {
    font-size: 1.8rem;
    transition: var(--transition-bounce);
}

.slider-label.active .slider-label-emoji {
    animation: emojiJump 0.5s ease-out;
}

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

.slider-value {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-pink);
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(236, 72, 153, 0.1);
    border-radius: var(--border-radius-sm);
    animation: fadeInUp 0.4s ease-out;
}

.next-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-bounce);
    margin-top: 1.5rem;
    width: 100%;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.next-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.next-button:hover::before {
    left: 100%;
}

.next-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.next-button:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.next-button:not(:disabled):active {
    transform: scale(0.98);
}

/* ==========================================
   LOADING SCREEN - ENHANCED
   ========================================== */
#loading-screen {
    justify-content: center;
    align-items: center;
}

.loading-content {
    text-align: center;
}

.loading-wig {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
}

.spinning-wig {
    width: 100%;
    height: 100%;
    animation: spin 1.2s linear infinite;
}

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

.loading-emoji {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    animation: loadingBounce 0.8s ease-in-out infinite;
}

@keyframes loadingBounce {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    25% { transform: translate(-50%, -55%) scale(1.1) rotate(-5deg); }
    75% { transform: translate(-50%, -45%) scale(1.1) rotate(5deg); }
}

.loading-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.loading-subtext {
    color: var(--text-muted);
    font-size: 1rem;
    min-height: 1.5em;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-pink);
    border-radius: 50%;
    animation: dotBounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* Loading progress */
.loading-progress {
    width: 200px;
    height: 6px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    margin: 1.5rem auto 0;
    overflow: hidden;
}

.loading-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    animation: loadingFill 2.5s ease-out forwards;
}

@keyframes loadingFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* ==========================================
   RESULTS SCREEN - ENHANCED
   ========================================== */
#results-screen {
    padding-bottom: 3rem;
}

.results-content {
    position: relative;
}

/* Confetti - Enhanced */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    animation: confettiFall 4s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-20px) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.5);
        opacity: 0;
    }
}

.result-header {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.result-emoji {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.5rem;
    animation: starSpin 2s ease-in-out infinite;
}

@keyframes starSpin {
    0%, 100% { transform: rotate(-10deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.result-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--text-secondary);
}

/* Result Card - Enhanced */
.result-card {
    background: var(--gradient-card);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    border: 2px solid rgba(139, 92, 246, 0.3);
    box-shadow: var(--shadow-card);
    margin-bottom: 2rem;
    animation: cardReveal 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s backwards;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(236, 72, 153, 0.1), transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: cardShine 8s linear infinite;
}

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

@keyframes cardReveal {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wig-showcase {
    width: 180px;
    height: 180px;
    margin: 0 auto 1.5rem;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: showcaseGlow 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes showcaseGlow {
    0%, 100% { box-shadow: 0 0 40px rgba(236, 72, 153, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 60px rgba(236, 72, 153, 0.5); transform: scale(1.02); }
}

.wig-showcase svg {
    width: 140px;
    height: 140px;
    animation: wigFloat 3s ease-in-out infinite;
}

@keyframes wigFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.wig-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    animation: nameReveal 0.8s ease-out 0.5s backwards;
}

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

.match-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.match-percent {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    animation: percentCount 1s ease-out 0.7s backwards;
}

@keyframes percentCount {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

.match-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.result-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    position: relative;
    z-index: 1;
    animation: sectionReveal 0.6s ease-out backwards;
}

.result-section:nth-child(5) { animation-delay: 0.8s; }
.result-section:nth-child(6) { animation-delay: 0.9s; }
.result-section:nth-child(7) { animation-delay: 1s; }

@keyframes sectionReveal {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.result-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.result-section h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.result-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.result-section ul {
    list-style: none;
    padding: 0;
}

.result-section li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-left: 1.75rem;
    position: relative;
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.result-section li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: bold;
    font-size: 1rem;
}

.price-range {
    font-size: 1.4rem !important;
    font-weight: 700;
    color: var(--accent-gold) !important;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

.confidence-line {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
    animation: confidenceReveal 0.8s ease-out 1.1s backwards;
}

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

.confidence-line p {
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-primary) !important;
    margin: 0;
}

/* Result Actions - Enhanced */
.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 1.2s backwards;
}

.share-button, .replay-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-bounce);
    font-family: inherit;
    border: none;
    position: relative;
    overflow: hidden;
}

.share-button {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.share-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: buttonShine 3s ease-in-out infinite;
}

.share-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-glow-strong);
}

.share-button:active {
    transform: scale(0.97);
}

.replay-button {
    background: transparent;
    border: 2px solid var(--primary-purple);
    color: var(--text-primary);
}

.replay-button:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-3px);
    border-color: var(--primary-pink);
}

.replay-button:active {
    transform: scale(0.97);
}

.replay-hint {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    animation: fadeInUp 0.6s ease-out 1.3s backwards;
}

/* Particles container */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.3; }
    25% { transform: translateY(-30px) translateX(10px); opacity: 0.6; }
    50% { transform: translateY(-50px) translateX(-10px); opacity: 0.3; }
    75% { transform: translateY(-20px) translateX(15px); opacity: 0.5; }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (min-width: 400px) {
    .main-title {
        font-size: 3rem;
    }

    .option-wig-image {
        width: 95px;
        height: 95px;
    }

    .result-actions {
        flex-direction: row;
    }

    .share-button, .replay-button {
        flex: 1;
    }
}

@media (min-width: 500px) {
    .screen {
        padding: 2rem;
    }

    .wig-showcase {
        width: 200px;
        height: 200px;
    }

    .wig-showcase svg {
        width: 160px;
        height: 160px;
    }
}

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

/* Touch device optimizations */
@media (hover: none) {
    .option-card:hover {
        transform: none;
        box-shadow: none;
        border-color: rgba(139, 92, 246, 0.2);
    }

    .option-card:active {
        transform: scale(0.97);
        border-color: var(--primary-pink);
    }

    .preview-wig:hover {
        transform: none;
    }

    .preview-wig:active {
        transform: scale(0.95);
    }
}

/* Safe area insets for notched devices */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-container {
        padding-bottom: env(safe-area-inset-bottom);
    }
}
