/* Daily Games - Premium TikTok-Style Vertical Swipe Experience */
/* Apple-inspired motion & polish */

:root {
    /* Color Palette */
    --primary: #ff6b9d;
    --primary-glow: rgba(255, 107, 157, 0.4);
    --secondary: #c44fff;
    --accent: #00f2fe;
    --accent-glow: rgba(0, 242, 254, 0.3);
    
    /* Vibe Colors */
    --vibe-soft: #a8e6cf;
    --vibe-chaos: #ff6b6b;
    --vibe-deep: #9b59b6;
    --vibe-argument: #f39c12;
    --vibe-memory: #ffd700;
    
    /* Neutral */
    --bg-dark: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-card-solid: rgba(20, 20, 30, 0.95);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    
    /* Sizing */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-full: 100px;
    
    /* Apple-like Easing */
    --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Safe Areas */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
    touch-action: none;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior: none;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #0a0a0f 0%,
        #1a0a1f 25%,
        #0f0a1a 50%,
        #1a0f1f 75%,
        #0a0a0f 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    z-index: -3;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.bg-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: orbFloat 15s ease-in-out infinite;
    will-change: transform, opacity;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.orb-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.2;
    }
    25% { 
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.35;
    }
    50% { 
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.25;
    }
    75% { 
        transform: translate(20px, 30px) scale(1.05);
        opacity: 0.3;
    }
}

/* ===== PARTICLE CONTAINER ===== */
#particle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.particle {
    position: absolute;
    pointer-events: none;
    animation: particleFade 2s ease-out forwards;
}

.heart-particle {
    font-size: 20px;
    animation: heartFloat 2s ease-out forwards;
}

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

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

/* ===== HOME BUTTON ===== */
.home-btn {
    position: fixed;
    top: calc(var(--safe-top) + 16px);
    left: 16px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s var(--ease-out-expo);
}

.home-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.15);
}

.home-btn:active {
    transform: scale(0.95);
}

/* ===== SWIPE INDICATOR ===== */
.swipe-indicator {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.swipe-dots {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.4s var(--ease-out-expo);
    cursor: pointer;
}

.dot.active {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    transform: scale(1.3);
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.swipe-hint {
    font-size: 10px;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.6;
    animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* ===== APP CONTAINER ===== */
.app {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.games-container {
    position: relative;
    width: 100%;
    height: 100%;
    will-change: transform;
    transition: transform 0.6s var(--ease-out-expo);
}

/* ===== GAME SCREEN ===== */
.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: calc(var(--safe-top) + 60px);
    padding-bottom: calc(var(--safe-bottom) + 24px);
    will-change: transform, opacity;
    transition: opacity 0.4s var(--ease-out-expo), 
                transform 0.4s var(--ease-out-expo);
}

.game-screen:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.game-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.game-screen.transition-up {
    transform: translateY(-30px) scale(0.95);
    opacity: 0;
}

.game-screen.transition-down {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
}

/* ===== GAME CONTENT ===== */
.game-content {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    animation: contentFadeIn 0.6s var(--ease-out-expo) forwards;
}

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

/* ===== GAME HEADER ===== */
.game-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.game-icon {
    font-size: 48px;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.game-title {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.game-prompt {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 300px;
    line-height: 1.5;
}

.animated-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    margin-top: 8px;
    animation: dividerPulse 2s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { 
        width: 60px; 
        opacity: 0.8; 
    }
    50% { 
        width: 80px; 
        opacity: 1; 
    }
}

/* ===== GAME BODY ===== */
.game-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200px;
    justify-content: center;
}

/* ===== GAME FOOTER ===== */
.game-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* ===== REVEAL BUTTON ===== */
.reveal-btn {
    width: 100%;
    max-width: 320px;
    padding: 18px 32px;
    font-size: 17px;
    font-family: inherit;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 10px 40px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.reveal-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.5s ease;
}

.reveal-btn:not(:disabled):hover::before {
    left: 100%;
}

.reveal-btn:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 50px var(--primary-glow);
}

.reveal-btn:not(:disabled):active {
    transform: scale(0.96) translateY(0);
}

.reveal-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.btn-sparkle {
    font-size: 18px;
    animation: sparkle 1.5s ease-in-out infinite;
}

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

.daily-note {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== INPUT STYLES ===== */
.names-input-container,
.crush-input-container,
.compatibility-inputs {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.input-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.names-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.name-input-wrapper {
    width: 100%;
}

.name-input,
.crush-input,
.compat-input,
.them-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.3s var(--ease-out-expo);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.name-input::placeholder,
.crush-input::placeholder,
.compat-input::placeholder,
.them-input::placeholder {
    color: var(--text-muted);
}

.name-input:focus,
.crush-input:focus,
.compat-input:focus,
.them-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px var(--primary-glow);
    transform: translateY(-2px);
}

.add-name-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 600;
    color: var(--primary);
    background: transparent;
    border: 2px dashed rgba(255, 107, 157, 0.4);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.add-name-btn:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 157, 0.1);
}

/* ===== CRUSH INPUT GROUP ===== */
.crush-input-group {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.medal {
    font-size: 28px;
    min-width: 40px;
    text-align: center;
}

/* ===== TEXT FIRST OPTIONS ===== */
.text-first-options {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.text-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px;
    background: var(--bg-card);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    min-width: 120px;
    transition: all 0.3s var(--ease-out-expo);
}

.option-emoji {
    font-size: 32px;
}

.option-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.vs-badge {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.them-input {
    text-align: center;
    max-width: 120px;
}

/* ===== COMPATIBILITY INPUTS ===== */
.compatibility-inputs {
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

.compat-input-group {
    flex: 1;
}

.compat-connector {
    display: flex;
    align-items: center;
    justify-content: center;
}

.connector-emoji {
    font-size: 28px;
    animation: connectorPulse 2s ease-in-out infinite;
}

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

/* ===== VIBE DISPLAY ===== */
.vibe-display {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.vibe-display:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.vibe-aura {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.vibe-display:hover .vibe-aura {
    opacity: 0.5;
}

.vibe-emoji {
    font-size: 64px;
    z-index: 1;
}

.vibe-text {
    font-size: 14px;
    color: var(--text-muted);
    z-index: 1;
}

/* ===== CHAOS METER ===== */
.chaos-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.chaos-meter-visual {
    width: 100%;
    max-width: 300px;
}

.meter-bg {
    width: 100%;
    height: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.meter-bg.large {
    height: 32px;
}

.meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--vibe-soft), var(--vibe-chaos));
    border-radius: var(--radius-full);
    transition: width 1.5s var(--ease-out-expo);
}

.meter-fill.animated {
    animation: meterPulse 2s ease-in-out infinite;
}

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

.meter-markers {
    display: flex;
    justify-content: space-between;
    padding: 8px 4px 0;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chaos-tease {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

/* ===== RESULT OVERLAY ===== */
.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    padding-top: calc(var(--safe-top) + 60px);
    padding-bottom: calc(var(--safe-bottom) + 24px);
    opacity: 0;
    visibility: hidden;
    z-index: 50;
    transition: all 0.5s var(--ease-out-expo);
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.result-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== RESULT CARD ===== */
.result-card {
    width: 100%;
    max-width: 360px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.5s var(--ease-out-back);
}

.result-overlay.visible .result-card {
    transform: scale(1);
}

.glassmorphism {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12), 
        rgba(255, 255, 255, 0.05)
    );
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.result-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-top: 8px;
}

.result-prompt {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.result-emoji {
    font-size: 64px;
    animation: resultEmojiPop 0.5s var(--ease-out-back);
}

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

.result-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.result-date {
    font-size: 12px;
    color: var(--text-muted);
}

.result-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 15px;
    font-family: inherit;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-expo);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.share-btn:active {
    transform: scale(0.96);
}

.comeback-text {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== ROULETTE DISPLAY ===== */
.roulette-display {
    width: 100%;
    height: 60px;
    overflow: hidden;
    position: relative;
    margin: 16px 0;
}

.roulette-names {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: rouletteScroll 2s ease-out forwards;
}

.roulette-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0;
    opacity: 0.5;
}

@keyframes rouletteScroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(var(--scroll-offset, -100px)); }
}

.result-winner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: winnerReveal 0.5s var(--ease-out-back) 2s forwards;
}

@keyframes winnerReveal {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.winner-emoji {
    font-size: 48px;
}

.winner-name {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CRUSH CARDS STACK ===== */
.crush-cards-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.crush-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateX(-20px);
    animation: cardSlideIn 0.4s var(--ease-out-expo) forwards;
}

.crush-card[data-rank="1"] { animation-delay: 0.8s; }
.crush-card[data-rank="2"] { animation-delay: 1.1s; }
.crush-card[data-rank="3"] { animation-delay: 1.4s; }

@keyframes cardSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.crush-medal {
    font-size: 32px;
}

.crush-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== COIN FLIP ===== */
.coin-flip-container {
    perspective: 1000px;
    width: 120px;
    height: 120px;
    margin: 20px 0;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: coinFlip 2s ease-out forwards;
}

@keyframes coinFlip {
    0% { transform: rotateY(0); }
    100% { transform: rotateY(var(--flip-rotations, 1800deg)); }
}

.coin-front,
.coin-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    backface-visibility: hidden;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.coin-back {
    transform: rotateY(180deg);
}

.text-winner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: winnerReveal 0.5s var(--ease-out-back) 2.2s forwards;
}

.text-winner .winner-name {
    font-size: 24px;
}

.winner-copy {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* ===== SCANNING DISPLAY ===== */
.scanning-display {
    width: 150px;
    height: 150px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.scan-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: scanRotate 1s linear infinite;
}

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

.scan-text {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    animation: scanPulse 1s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.thought-reveal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    position: relative;
}

.thought-reveal.visible {
    animation: thoughtFadeIn 1s var(--ease-out-expo) forwards;
}

@keyframes thoughtFadeIn {
    to { opacity: 1; }
}

.heart-particles {
    position: absolute;
    width: 200px;
    height: 200px;
    pointer-events: none;
}

.thought-name {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.thought-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== COMPATIBILITY DISPLAY ===== */
.compat-names {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.compat-and {
    color: var(--text-muted);
}

.compat-result-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: compatReveal 0.5s var(--ease-out-back) 1.5s forwards;
}

@keyframes compatReveal {
    0% { opacity: 0; transform: scale(0.5); }
    100% { opacity: 1; transform: scale(1); }
}

.compat-emoji {
    font-size: 64px;
}

.compat-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== CHAOS RESULT ===== */
.chaos-meter-result {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.chaos-percentage {
    font-size: 48px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--vibe-soft), var(--vibe-chaos));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chaos-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
}

.chaos-emoji {
    font-size: 28px;
}

.chaos-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out-expo);
}

.loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    font-size: 16px;
    color: var(--text-secondary);
    animation: loadingTextPulse 1.5s ease-in-out infinite;
}

@keyframes loadingTextPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===== ALREADY PLAYED TOAST ===== */
.already-played-toast {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 100px);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-card-solid);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    z-index: 3000;
    transition: all 0.4s var(--ease-out-expo);
}

.already-played-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 20px;
}

.toast-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== VIBE THEMES ===== */
.vibe-soft .vibe-aura { background: radial-gradient(circle, rgba(168, 230, 207, 0.6) 0%, transparent 70%); }
.vibe-chaos .vibe-aura { background: radial-gradient(circle, rgba(255, 107, 107, 0.6) 0%, transparent 70%); }
.vibe-deep .vibe-aura { background: radial-gradient(circle, rgba(155, 89, 182, 0.6) 0%, transparent 70%); }
.vibe-argument .vibe-aura { background: radial-gradient(circle, rgba(243, 156, 18, 0.6) 0%, transparent 70%); }
.vibe-memory .vibe-aura { background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, transparent 70%); }

/* ===== RESPONSIVE ===== */
@media (max-height: 700px) {
    .game-content {
        gap: 24px;
    }
    
    .game-icon {
        font-size: 36px;
    }
    
    .game-title {
        font-size: 24px;
    }
    
    .vibe-display {
        width: 160px;
        height: 160px;
    }
    
    .vibe-emoji {
        font-size: 48px;
    }
    
    .result-card {
        padding: 24px 20px;
    }
}

@media (max-width: 380px) {
    .game-screen {
        padding: 16px;
    }
    
    .result-card {
        padding: 20px 16px;
    }
    
    .game-title {
        font-size: 22px;
    }
    
    .compatibility-inputs {
        flex-direction: column;
    }
    
    .text-first-options {
        flex-direction: column;
        gap: 16px;
    }
}

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

/* ===== KEYBOARD NAVIGATION ===== */
.reveal-btn:focus-visible,
.share-btn:focus-visible,
.add-name-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

