/* ========== CSS RESET & VARS ========== */
:root {
    --bg-color: #f1f5f2;
    --card-bg: #ffffff;
    --text-color: #333333;
    --text-muted: #888888;
    --primary-color: #4a6c50;
    --primary-hover: #3d5a42;
    --accent-color: #e0eae2;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --border-radius: 20px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: #f1f5f2;
}

/* ========== SCREENS & TRANSITIONS ========== */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.98);
    transition: var(--transition);
    visibility: hidden;
    overflow-y: auto;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* ========== CARDS ========== */
.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

/* START SCREEN */
#start-screen {
    justify-content: center;
}

.start-card {
    text-align: center;
    padding: 50px 30px;
}

.title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    line-height: 1.3;
}

.footer-info {
    margin-top: 40px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-info a {
    color: #4a6c50;
    text-decoration: none;
    font-weight: 500;
}

/* BUTTONS */
.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 36px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    width: 80%;
    max-width: 300px;
}

.primary-btn:hover, .primary-btn:active {
    background: var(--primary-hover);
    transform: scale(0.98);
}

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

.primary-btn.outline:hover, .primary-btn.outline:active {
    background: var(--accent-color);
}

/* QUIZ SCREEN */
.quiz-header {
    text-align: center;
    padding: 10px 0 20px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-muted);
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.badge {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge.dim {
    background: #f0f0f0;
    color: var(--text-muted);
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.5;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    background: white;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.option-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.option-btn .opt-letter {
    font-weight: 700;
    margin-right: 12px;
}

/* LOADING */
#loading-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--accent-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* RESULT SCREEN */
#result-screen {
    padding-bottom: 40px;
}

.result-card {
    margin-bottom: 16px;
}

.main-result {
    text-align: center;
    padding: 40px 20px;
}

.main-result h4 {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 16px;
}

.main-result h1 {
    font-size: 32px;
    margin: 5px 0 0;
}

.main-result h2 {
    font-size: 24px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.green-text {
    color: #4CAF50;
}

.avatar-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: #fdfdfd;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.avatar-container img {
    width: 90%;
    height: auto;
    object-fit: contain;
}

.match-rate {
    font-size: 13px;
    color: var(--text-muted);
    background: #f5f5f5;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
}

.desc-card h4, .dims-card h4 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.desc-card p {
    font-size: 15px;
    color: #444;
}

.dim-item {
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dim-name {
    font-weight: 600;
    font-size: 15px;
}

.dim-score {
    font-weight: 700;
    color: var(--primary-color);
}
