:root {
    /* Color Palette - Premium Bachelorette Vibe */
    --bg-dark: #1a0b2e; /* Deep purple background */
    --bg-surface: #2d1b4e;
    --primary-color: #ff2a85; /* Neon Pink */
    --primary-hover: #e01b70;
    --secondary-color: #00e5ff; /* Cyan pop */
    --secondary-hover: #00c4db;
    --text-primary: #ffffff;
    --text-secondary: #b39ddb;
    --success-color: #00e676;
    --error-color: #ff1744;
    
    /* Layout & Utilities */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-round: 999px;
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 20px rgba(255, 42, 133, 0.4);
    
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

.btn-back-hub {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-back-hub:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px var(--secondary-color);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    overflow: hidden; /* Prevent body scroll, manage in container */
}

.app-container {
    width: 100%;
    max-width: 480px; /* Mobile first, capped for desktop */
    height: 100vh;
    height: 100dvh; /* Mobile viewport height */
    position: relative;
    background: radial-gradient(circle at top right, #2a0845, #1a0b2e);
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Screens */
.screen {
    display: none;
    width: 100%;
    min-height: 100%;
    padding: 2rem 1.5rem;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
}

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

/* --- HOME SCREEN --- */
.hero-image {
    width: 140px;
    height: 140px;
    border-radius: var(--border-radius-round);
    object-fit: cover;
    margin-bottom: -1rem;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-glow);
    animation: floating 3s ease-in-out infinite;
}

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

.home-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 3rem;
}

.title-container h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, var(--primary-color), #ff8c42);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: var(--shadow-glow);
}

.eyebrow {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    font-weight: 700;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.mode-selection {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

/* --- BUTTONS --- */
.btn {
    font-family: var(--font-heading);
    border: none;
    border-radius: var(--border-radius-round);
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
}

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

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 42, 133, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-primary);
}

.mode-btn {
    text-align: left;
    justify-content: flex-start;
    padding: 1.2rem;
    border-radius: var(--border-radius-md);
}

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

.mode-btn .btn-text {
    display: flex;
    flex-direction: column;
}

.mode-btn .btn-text small {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

/* --- GAME SCREEN --- */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-icon-only {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.score-display {
    background: rgba(255,255,255,0.1);
    padding: 0.4rem 1rem;
    border-radius: var(--border-radius-round);
    font-weight: 700;
    font-family: var(--font-heading);
    border: 1px solid rgba(255,255,255,0.1);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: var(--border-radius-round);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.game-prompt {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

/* Images Container */
.image-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.image-container.mode-2 {
    flex-direction: row;
}

.game-image-wrapper {
    flex: 1;
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 1 / 1;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.game-image-wrapper:active {
    transform: scale(0.95);
}

.game-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.game-image-wrapper.selected {
    border-color: var(--secondary-color);
    box-shadow: 0 0 20px var(--secondary-color);
}

/* Options (Mode 1) */
.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.option-btn {
    background: var(--bg-surface);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.option-btn:active {
    background: var(--primary-color);
    transform: scale(0.95);
}

/* --- FEEDBACK OVERLAY --- */
.feedback-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 11, 46, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.feedback-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.feedback-content {
    background: var(--bg-surface);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    width: 85%;
    box-shadow: var(--shadow-soft);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feedback-overlay.hidden .feedback-content {
    transform: scale(0.8);
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.feedback-content h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feedback-content p {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.feedback-success h2 { color: var(--success-color); }
.feedback-success p { color: var(--success-color); }
.feedback-error h2 { color: var(--error-color); }
.feedback-error p { color: var(--error-color); }

/* --- RESULT SCREEN --- */
.result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.confetti-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.result-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.final-score-box {
    background: var(--bg-surface);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    width: 100%;
    margin-bottom: 3rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.score-label {
    display: block;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.score-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--primary-color);
    text-shadow: var(--shadow-glow);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}
