/**
 * You Are The Model — Visual Design
 *
 * Design Principles:
 * - No transitions. Hard cuts.
 * - No progress bar.
 * - Timer is felt, not displayed numerically.
 * - Whitespace is pressure.
 * - No gamification.
 */

/* ============================================
   Reset & Base
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: #0a0a0a;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    max-width: 100vw;
}

/* Full viewport background to catch any edge cases */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0a0a0a;
    z-index: -1;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    color: #e8e8e8;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
}

/* ============================================
   Screen Management
   ============================================ */

.screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    overflow: hidden;
}

.screen.active {
    display: flex;
}

/* ============================================
   Typography
   ============================================ */

/* Questions and titles */
.intro-title,
.results-title,
.reflection-text {
    font-family: 'Spectral', 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
}

/* Concepts */
.concept-text {
    font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
    font-size: 18px;
    line-height: 1.7;
    font-weight: 400;
}

/* UI elements */
.btn-primary,
.btn-secondary,
.rating-btn,
.rating-labels {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
}

/* ============================================
   Intro Screen
   ============================================ */

.intro-content {
    max-width: 520px;
    padding: 2rem;
    text-align: center;
}

.intro-title {
    font-size: 28px;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.intro-text {
    font-family: 'Spectral', Georgia, serif;
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: #c0c0c0;
}

.intro-rules {
    text-align: left;
    margin-bottom: 3rem;
}

.intro-rules p {
    margin-bottom: 0.75rem;
    color: #888;
    font-size: 14px;
}

.redacted-sample {
    background: #3a3a3a;
    color: #3a3a3a;
    padding: 0 4px;
    border-radius: 2px;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: -0.05em;
}

.intro-fine-print {
    margin-top: 3.5rem;
    font-size: 14px;
    color: #3a3a3a;
    line-height: 1.5;
}

.intro-footer,
.final-footer {
    margin-top: 2rem;
    font-size: 13px;
}

.intro-footer a,
.final-footer a {
    color: #333;
    text-decoration: none;
}

.intro-footer a:hover,
.final-footer a:hover {
    color: #555;
}

/* ============================================
   Buttons
   ============================================ */

.btn-primary,
.btn-secondary {
    background: transparent;
    border: 1px solid #d4a574;
    color: #d4a574;
    padding: 12px 32px;
    cursor: pointer;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.btn-primary:hover,
.btn-secondary:hover {
    background: #d4a574;
    color: #0a0a0a;
}

.btn-secondary {
    border-color: #555;
    color: #888;
}

.btn-secondary:hover {
    border-color: #888;
    background: #888;
    color: #0a0a0a;
}

/* ============================================
   Judgment Screen
   ============================================ */

.judgment-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 4rem 2rem;
}

.concept-display {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 680px;
    padding: 0 2rem;
}

.concept-text {
    color: #e8e8e8;
    text-align: center;
}

/* Timer Bar */
.timer-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
}

.timer-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: #d4a574;
    transform-origin: left;
    transform: scaleX(1);
}

.timer-bar.running::after {
    animation: timer-shrink 8s linear forwards;
}

@keyframes timer-shrink {
    from {
        transform: scaleX(1);
        background: #d4a574;
    }
    to {
        transform: scaleX(0);
        background: #4a3a3a;
    }
}

/* ============================================
   Rating Controls
   ============================================ */

.rating-controls {
    padding: 2rem 0 4rem;
}

.rating-scale {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 12px;
}

.rating-btn {
    width: 56px;
    height: 56px;
    background: transparent;
    border: 1px solid #333;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-btn:hover {
    border-color: #d4a574;
    color: #d4a574;
}

.rating-btn:active,
.rating-btn.selected {
    background: #d4a574;
    border-color: #d4a574;
    color: #0a0a0a;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    width: 320px;
    margin: 0 auto;
    color: #555;
    font-size: 12px;
    text-transform: lowercase;
}

/* ============================================
   Loading Screen
   ============================================ */

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

.loading-text {
    font-family: 'Spectral', Georgia, serif;
    font-size: 20px;
    color: #666;
    margin-bottom: 2rem;
}

.loading-orb {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    animation:
        loading-pulse 1.5s ease-in-out infinite,
        loading-spin 4s linear infinite,
        loading-colour 0.8s ease-in-out infinite;
}

.loading-orb svg {
    width: 100%;
    height: 100%;
}

.loading-orb path {
    fill: currentColor;
}

@keyframes loading-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

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

@keyframes loading-colour {
    0%, 100% {
        color: #d4a574;
        filter: drop-shadow(0 0 15px #d4a574);
    }
    25% {
        color: #e8a060;
        filter: drop-shadow(0 0 12px #e8a060);
    }
    50% {
        color: #c47a5a;
        filter: drop-shadow(0 0 15px #c47a5a);
    }
    75% {
        color: #d49074;
        filter: drop-shadow(0 0 12px #d49074);
    }
}

/* ============================================
   Waiting Screen
   ============================================ */

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

.waiting-text {
    font-family: 'Spectral', Georgia, serif;
    font-size: 32px;
    color: #333;
}

/* ============================================
   Results Screen
   ============================================ */

.results-content {
    max-width: 720px;
    padding: 2rem;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/Edge */
}

.results-content::-webkit-scrollbar {
    display: none;                   /* Chrome/Safari */
}

.results-title {
    font-size: 24px;
    margin-bottom: 0.5rem;
    text-align: center;
}

.results-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 3rem;
    text-align: center;
}

.results-list {
    margin-bottom: 3rem;
}

.result-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid #1a1a1a;
}

.result-item:last-child {
    border-bottom: none;
}

.result-concept {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #999;
    margin-bottom: 1rem;
}

.result-ratings {
    display: flex;
    gap: 2rem;
    font-size: 13px;
}

.result-you,
.result-ai {
    display: flex;
    gap: 8px;
}

.result-label {
    color: #555;
}

.result-value {
    color: #e8e8e8;
}

.result-match {
    color: #d4a574;
}

.result-diff {
    color: #666;
}

/* ============================================
   Reflection
   ============================================ */

.results-reflection {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #1a1a1a;
    margin-bottom: 2rem;
}

.reflection-text {
    font-size: 18px;
    line-height: 1.8;
    color: #888;
    font-style: italic;
}

/* ============================================
   Submit Your Own
   ============================================ */

.submit-content,
.submit-result-content {
    max-width: 600px;
    padding: 2rem;
    text-align: center;
}

.submit-title,
.submit-result-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.submit-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 2rem;
}

.submit-form {
    text-align: left;
}

.concept-input {
    width: 100%;
    min-height: 150px;
    padding: 16px;
    background: #111;
    border: 1px solid #333;
    color: #e8e8e8;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 1.5rem;
}

.concept-input:focus {
    outline: none;
    border-color: #d4a574;
}

.concept-input::placeholder {
    color: #555;
}

.submit-rating {
    margin-bottom: 1.5rem;
}

.submit-rating-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 12px;
}

.submit-form .rating-scale {
    justify-content: flex-start;
}

.submit-form .btn-primary {
    width: 100%;
}

/* Submit Result */
.submit-result-concept {
    padding: 1.5rem;
    background: #111;
    border: 1px solid #222;
    margin-bottom: 2rem;
    text-align: left;
}

.submit-result-ratings {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.submit-result-rating {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.submit-result-rating .result-label {
    font-size: 14px;
    color: #888;
}

.submit-result-rating .result-value {
    font-size: 32px;
    color: #d4a574;
    font-family: 'IBM Plex Mono', monospace;
}

.submit-result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ============================================
   Email Signup
   ============================================ */

.signup-content {
    max-width: 440px;
    padding: 2rem;
    text-align: center;
}

.signup-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.signup-subtitle {
    font-size: 14px;
    color: #888;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.signup-subtitle a {
    color: #d4a574;
    text-decoration: none;
}

.signup-subtitle a:hover {
    text-decoration: underline;
}

.signup-form {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
}

.email-input {
    flex: 1;
    padding: 12px 16px;
    background: #111;
    border: 1px solid #333;
    color: #e8e8e8;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

.email-input:focus {
    outline: none;
    border-color: #d4a574;
}

.email-input::placeholder {
    color: #555;
}

.signup-note {
    font-size: 13px;
    color: #888;
    min-height: 20px;
    margin-bottom: 1.5rem;
}

.signup-note.success {
    color: #d4a574;
}

.btn-link {
    background: none;
    border: none;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: #888;
}

/* ============================================
   Final Screen
   ============================================ */

.final-content {
    max-width: 440px;
    padding: 2rem;
    text-align: center;
}

.final-title {
    font-family: 'Spectral', Georgia, serif;
    font-size: 28px;
    margin-bottom: 2rem;
}

.final-text {
    font-family: 'Spectral', Georgia, serif;
    font-size: 18px;
    line-height: 1.8;
    color: #888;
    margin-bottom: 2rem;
}

.final-link {
    margin-bottom: 2rem;
}

.final-link a {
    color: #d4a574;
    text-decoration: none;
    font-size: 14px;
}

.final-link a:hover {
    text-decoration: underline;
}

/* ============================================
   Results Actions
   ============================================ */

.results-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
    .intro-content {
        padding: 1.5rem;
    }

    .intro-title {
        font-size: 24px;
    }

    .intro-text {
        font-size: 18px;
    }

    .concept-text {
        font-size: 16px;
    }

    .rating-btn {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .rating-scale {
        gap: 10px;
    }

    .rating-labels {
        width: 270px;
    }

    .signup-form {
        flex-direction: column;
    }

    .results-actions,
    .submit-result-actions {
        flex-direction: column;
    }

    .submit-result-ratings {
        flex-direction: column;
        gap: 1rem;
    }
}
