/* ============================================
   MonoMind — Minimal Modern
   Pure white, clean type, one accent color
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #FFFFFF;
    --text: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --accent: #1a1a1a;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --hover-bg: #f9fafb;
    --radius: 8px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-serif: 'DM Serif Display', 'Georgia', serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 16px;
    font-weight: 400;
}

/* --- Layout --- */
.container {
    max-width: 560px;
    margin: 0 auto;
    padding: 24px 24px 80px;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    color: var(--text);
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 48px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 36px;
    border: none;
    border-radius: 50px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
}

.btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text);
}

.btn-lg {
    padding: 16px 48px;
    font-size: 1rem;
}

/* --- Quiz Screens --- */
.quiz-screen {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.quiz-screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* --- Welcome Screen --- */
.welcome-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    display: block;
}

.welcome-meta {
    display: flex;
    gap: 32px;
    margin: 32px 0 48px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 400;
}

.meta-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
}

/* --- Progress --- */
.progress-container {
    margin-bottom: 48px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0.03em;
}

.progress-bar {
    height: 2px;
    background: var(--border-light);
    border-radius: 1px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--text);
    border-radius: 1px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

/* --- Question --- */
.question-number {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.question-text {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 40px;
    color: var(--text);
}

/* --- Options --- */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.option-btn {
    display: block;
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.5;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.option-btn:first-child {
    border-top: 1px solid var(--border-light);
}

.option-btn:hover {
    background: var(--hover-bg);
    padding-left: 32px;
}

.option-btn.selected {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    border-radius: var(--radius);
}

.option-btn span {
    position: relative;
    z-index: 1;
}

/* --- Result Screen --- */
.result-card {
    padding: 0;
}

.result-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
    width: 100%;
}

.result-philosopher {
    font-size: clamp(2.5rem, 10vw, 4rem);
    color: var(--text);
    margin-bottom: 8px;
}

.result-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 32px;
}

.result-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 48px;
    font-weight: 300;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 48px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-card {
    padding: 24px 16px;
    text-align: center;
    border-right: 1px solid var(--border-light);
    background: transparent;
    border-radius: 0;
    border-bottom: none;
}

.stat-card:last-child {
    border-right: none;
}

.stat-value {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text);
    display: block;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 4px;
    font-weight: 400;
}

/* Traits */
.traits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 48px;
}

.trait-tag {
    padding: 6px 16px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Secondary match */
.secondary-match {
    padding: 24px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 48px;
}

.secondary-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.secondary-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Share */
.share-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.share-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    text-decoration: none;
    font-family: var(--font-sans);
}

.share-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* --- Landing Page --- */
.quiz-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.quiz-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

.quiz-card .glass-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 28px 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    box-shadow: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

.quiz-card:hover .glass-card {
    background: transparent;
    transform: none;
    border-color: var(--border);
}

.quiz-card-left {
    display: flex;
    gap: 20px;
    align-items: baseline;
}

.quiz-card-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.quiz-card-info h3 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--text);
}

.quiz-card-info p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0;
    font-weight: 300;
}

.quiz-card-meta {
    display: none;
}

.quiz-card-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.quiz-card:hover .quiz-card-arrow {
    color: var(--text);
    transform: translateX(4px);
}

.badge-new {
    display: inline-block;
    padding: 2px 8px;
    background: var(--text);
    color: var(--bg);
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: middle;
    margin-left: 8px;
    font-family: var(--font-sans);
}

.badge-soon {
    display: inline-block;
    padding: 2px 8px;
    background: var(--border-light);
    color: var(--text-muted);
    border-radius: 3px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    vertical-align: middle;
    margin-left: 8px;
    font-family: var(--font-sans);
}

.quiz-card.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* --- Header --- */
.site-header {
    padding: 8px 0 40px;
}

.site-header a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition);
    font-weight: 400;
}

.site-header a:hover {
    color: var(--text);
}

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 60px 0 20px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* --- Result animations --- */
.result-card > * {
    animation: fadeUp 0.5s ease both;
}
.result-card > *:nth-child(1) { animation-delay: 0.05s; }
.result-card > *:nth-child(2) { animation-delay: 0.15s; }
.result-card > *:nth-child(3) { animation-delay: 0.25s; }
.result-card > *:nth-child(4) { animation-delay: 0.35s; }
.result-card > *:nth-child(5) { animation-delay: 0.45s; }
.result-card > *:nth-child(6) { animation-delay: 0.55s; }
.result-card > *:nth-child(7) { animation-delay: 0.65s; }
.result-card > *:nth-child(8) { animation-delay: 0.75s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .container {
        padding: 20px 20px 60px;
    }

    .stat-value {
        font-size: 1.6rem;
    }

    .quiz-card .glass-card {
        padding: 20px 0;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }
}
