html {
    scroll-behavior: smooth;
}

/* Fluidity & Transitions */
.page-fade-in {
    animation: fadeInPage 0.6s ease-out;
}

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

:root {
    /* Sophisticated Palette */
    --bg-main: #0F0F12; /* Deep Charcoal-Violet */
    --surface-card: #1A1A1E;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.06);
    
    --accent-soft: #E2A6B4; /* Muted Dusty Rose */
    --accent-muted: #8E7C80;
    --accent-gold: #C5A059; /* Sophisticated Muted Gold */
    
    --text-primary: #F2F2F7;
    --text-secondary: #8E8E93;
    --text-tertiary: #48484A;
    
    --nav-height: 76px;
    --radius-lg: 24px;
    --radius-md: 16px;
    --padding-card: 24px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    /* Prevent content overlap with nav */
    padding-bottom: calc(var(--nav-height) + 40px);
}

/* Typography Purge - Radical Simplicity */
h1, h2, h3, .brand-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
}

header {
    padding: 3rem 1.5rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.brand {
    font-family: 'Dancing Script', cursive; /* The only allowed exception */
    font-size: 2.8rem;
    color: var(--accent-soft);
    letter-spacing: -0.01em;
}

.music-btn {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
}

.music-btn.playing {
    color: var(--accent-soft);
    border-color: var(--accent-soft);
    box-shadow: 0 0 15px rgba(226, 166, 180, 0.2);
}

.music-btn:active {
    transform: translateY(-50%) scale(0.9);
}

/* Unified Masking Container */
.mask-portal {
    background-image: url("/static/uploads/IMG-20260517-WA0000.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: baseline;
    justify-content: center;
    line-height: 0.85;
}

/* Modern Card Structure */
.memory-card, .game-card {
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin: 0 1.2rem 2rem;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.memory-card:active, .game-card:active {
    transform: scale(0.985);
}

/* Photo Styling */
.photo-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    background: #000;
}

.photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Content & Padding */
.memory-content, .game-info {
    padding: var(--padding-card);
}

.memory-content p, .game-info p {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    font-weight: 400;
}

.date, .subtitle-mimi {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Checkbox Harmony */
.checkbox {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--glass-border);
    border-radius: 6px; /* Cohesive with card radius */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-soft);
}

.quest-item.completed .checkbox { border-color: var(--accent-soft); background: rgba(226, 166, 180, 0.1); }

/* Quote Refinement */
.memory-card.quote {
    padding: calc(var(--padding-card) * 1.5) var(--padding-card);
    text-align: center;
}

.quote-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Games Grid & Cards */
.games-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1rem 0;
}

.game-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-right: 1.2rem;
}

.game-cover {
    width: 80px;
    height: 100px;
    border-radius: var(--radius-md);
    margin: 1.2rem;
    flex-shrink: 0;
}

.game-info {
    padding-left: 0;
    flex-grow: 1;
}

.game-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

/* Integrated Status Indicator */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.dot.finished { background: #4CD964; }
.dot.playing { background: #FFCC00; }
.dot.to_play { background: var(--text-tertiary); }

/* Navigation Pilule */
.mobile-nav {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 400px;
    height: 64px;
    background: rgba(26, 26, 30, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.nav-item {
    color: var(--text-secondary);
    font-size: 1.4rem;
    padding: 12px;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--accent-soft);
}

/* Reactions Bar */
.reactions-bar {
    padding: 0 var(--padding-card) 0.5rem;
    display: flex;
    gap: 1.2rem;
}

.reaction-btn {
    font-size: 1.2rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.reaction-btn.liked { color: var(--accent-soft); }

/* Landing Section */
.landing-parallax {
    height: 85vh; /* Reduce initial height to show hint better */
}

.count-item {
    background: var(--surface-card);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    width: 140px;
}

.count-value { color: var(--accent-soft); }

/* Utilities */
.hidden { display: none; }
.mimi-btn {
    background: var(--surface-card);
    border: 1px solid var(--accent-soft);
    color: var(--accent-soft);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    margin-top: 2rem;
}
