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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f6f3;
    --text-primary: #37352f;
    --text-secondary: #787774;
    --text-tertiary: #9b9a97;
    --border-color: #e9e9e7;
    --accent-color: #2eaadc;
    --accent-hover: #2496c4;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 640px;
}

.screen {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 48px 40px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.screen.hidden {
    display: none;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
}

.content-wrapper.center {
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

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

.description {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* Logo & Headers */
.logo {
    font-size: 48px;
    margin-bottom: 16px;
}

h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Setup Form */
.setup-form {
    display: flex;
    flex-direction: column;
}

.setup-form label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.setup-form input {
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.setup-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(46, 170, 220, 0.15);
}

.setup-form input::placeholder {
    color: var(--text-tertiary);
}

.hint {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
    margin-bottom: 24px;
}

/* Buttons */
.primary-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: white;
    background: var(--accent-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
}

.primary-btn:hover {
    background: var(--accent-hover);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    background: var(--text-tertiary);
    cursor: not-allowed;
}

.secondary-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
}

.secondary-btn:hover {
    background: var(--border-color);
    border-color: var(--text-tertiary);
}

/* Progress */
.progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color);
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 10%;
}

.progress-text {
    font-size: 13px;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Question */
.question-container {
    margin-bottom: 32px;
}

.question-text {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: -0.2px;
}

/* Multiple Choice */
.choices-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.choice-btn {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-align: left;
}

.choice-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--accent-color);
}

.choice-btn:active {
    transform: scale(0.98);
}

.choice-btn.selected {
    background: rgba(46, 170, 220, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Loading */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--bg-secondary);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 24px;
}

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

.loading-text {
    font-size: 15px;
    color: var(--text-secondary);
}

/* Result */
.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.result-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.book-cover-container {
    margin-bottom: 20px;
}

.book-cover {
    max-width: 150px;
    height: auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.book-cover.hidden {
    display: none;
}

.book-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.book-author {
    font-size: 16px;
    color: var(--text-secondary);
}

.book-description {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.why-section {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 32px;
}

.why-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.why-section p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Support Section */
.support-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.support-text {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}


/* Responsive */
@media (max-width: 640px) {
    .screen {
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

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

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

/* Animation for screen transitions */
.fade-in {
    animation: fadeIn 0.3s ease;
}

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