/* ==================== RESET AND BASE ==================== */

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a2e;
    background-color: #fafafa;
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== LAYOUT ==================== */

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* ==================== LANDING ==================== */

.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0 2rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.5px;
}

.tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2d6a4f;
    background: #d8f3dc;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
}

.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a2e;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.hero-sub {
    font-size: 1.1rem;
    color: #4a4a68;
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.stat-counter {
    font-weight: 700;
    color: #1a1a2e;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #1a1a2e;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #2d2d44;
}

.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.15rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==================== TRUST POINTS ==================== */

.trust-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2.5rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.trust-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #d8f3dc;
    color: #2d6a4f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 2px;
}

.trust-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.trust-item span {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==================== ANTI-GURU SECTION ==================== */

.anti-guru {
    padding: 2.5rem 0;
}

.anti-guru h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #1a1a2e;
}

.anti-guru ul {
    list-style: none;
    padding: 0;
}

.anti-guru li {
    padding: 0.6rem 0 0.6rem 1.8rem;
    position: relative;
    color: #4a4a68;
    font-size: 0.95rem;
}

.anti-guru li::before {
    content: "--";
    position: absolute;
    left: 0;
    color: #2d6a4f;
    font-weight: 700;
}

/* ==================== PROGRESS BAR ==================== */

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #1a1a2e;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 2rem;
    text-align: right;
}

/* ==================== QUESTIONS ==================== */

#question-container {
    min-height: 400px;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
}

.question-block {
    margin-bottom: 2.5rem;
}

.question-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    background: #ffffff;
}

.option-item:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.option-item.selected {
    border-color: #1a1a2e;
    background: #f0f0f5;
}

.option-item {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.option-marker {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 0.85rem;
    transition: all 0.15s ease;
    position: relative;
}

.option-item.multi .option-marker {
    border-radius: 4px;
}

.option-item.selected .option-marker {
    border-color: #1a1a2e;
    background: #1a1a2e;
}

.option-item.selected .option-marker::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
}

.option-item.multi.selected .option-marker::after {
    border-radius: 1px;
    width: 10px;
    height: 6px;
    background: transparent;
    border-bottom: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    transform: translate(-50%, -60%) rotate(-45deg);
}

.option-label {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.4;
}

/* ==================== TEXT INPUTS ==================== */

.text-input-container {
    margin-bottom: 1.5rem;
}

.text-input,
.email-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #1a1a2e;
    transition: border-color 0.2s ease;
    outline: none;
}

.text-input:focus,
.email-input:focus {
    border-color: #1a1a2e;
}

.text-input::placeholder,
.email-input::placeholder {
    color: #9ca3af;
}

textarea.text-input {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* ==================== NAV BUTTONS ==================== */

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

/* ==================== LOADING ==================== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #1a1a2e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 2rem;
}

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

.loading-container h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.loading-sub {
    color: #6b7280;
    margin-bottom: 2rem;
}

.loading-steps {
    text-align: left;
    width: 100%;
    max-width: 400px;
}

.loading-step {
    padding: 0.6rem 0 0.6rem 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

.loading-step::before {
    content: "( )";
    position: absolute;
    left: 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.loading-step.active {
    color: #1a1a2e;
    font-weight: 500;
}

.loading-step.active::before {
    content: ">>>";
}

.loading-step.done {
    color: #2d6a4f;
}

.loading-step.done::before {
    content: "[/]";
    color: #2d6a4f;
}

/* ==================== RESULTS ==================== */

.guide-header {
    text-align: center;
    padding: 2rem 0 3rem;
    border-bottom: 2px solid #1a1a2e;
    margin-bottom: 3rem;
}

.guide-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.guide-header .date {
    font-size: 0.85rem;
    color: #6b7280;
}

.guide-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.guide-section:last-child {
    border-bottom: none;
}

.guide-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.guide-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin: 1.5rem 0 0.5rem;
}

.guide-text {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.summary-box {
    background: #f0f0f5;
    border-left: 4px solid #1a1a2e;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 2rem;
}

.summary-box p {
    font-size: 1rem;
    line-height: 1.7;
    color: #1a1a2e;
}

.honest-talk-item {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.honest-talk-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
}

.recommendation-card {
    background: #ffffff;
    border: 2px solid #1a1a2e;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.recommendation-card.primary {
    background: #f8f8fc;
}

.recommendation-card.alternative {
    border-color: #d1d5db;
}

.recommendation-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    margin-top: 0;
}

.recommendation-card .model-description {
    color: #4a4a68;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.model-meta {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.model-meta-item {
    display: flex;
    flex-direction: column;
}

.model-meta-item .label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.model-meta-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
}

.match-reasons {
    margin: 1rem 0;
}

.match-reason {
    padding: 0.3rem 0 0.3rem 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #2d6a4f;
}

.match-reason::before {
    content: "+";
    position: absolute;
    left: 0;
    font-weight: 700;
}

.step-list {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.step-list li {
    counter-increment: step-counter;
    padding: 0.75rem 0 0.75rem 3rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.step-list li:last-child {
    border-bottom: none;
}

.step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 24px;
    height: 24px;
    background: #1a1a2e;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.week-block {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.week-block h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.week-block ul {
    list-style: none;
    padding: 0;
    margin-bottom: 0.75rem;
}

.week-block li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #374151;
}

.week-block li::before {
    content: ">";
    position: absolute;
    left: 0.25rem;
    font-weight: 700;
    color: #1a1a2e;
}

.week-milestone {
    font-size: 0.85rem;
    color: #2d6a4f;
    font-weight: 500;
    font-style: italic;
    padding-top: 0.5rem;
    border-top: 1px solid #f3f4f6;
}

.resource-card {
    display: block;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.resource-card:hover {
    border-color: #1a1a2e;
    background: #f8f8fc;
}

.resource-card .resource-name {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.resource-card .resource-description {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

.resource-card .resource-cost {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    margin-top: 0.35rem;
}

.resource-cost.free {
    background: #d8f3dc;
    color: #2d6a4f;
}

.resource-cost.free_tier {
    background: #dbeafe;
    color: #1e40af;
}

.resource-cost.low_cost {
    background: #fef3c7;
    color: #92400e;
}

.resource-cost.paid {
    background: #fee2e2;
    color: #991b1b;
}

.mindset-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.mindset-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.4rem;
}

.mindset-item p {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
}

.mistake-item {
    background: #ffffff;
    border-left: 3px solid #ef4444;
    border-radius: 0 8px 8px 0;
    padding: 1.25rem;
    margin-bottom: 0.75rem;
}

.mistake-item .mistake-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #991b1b;
    margin-bottom: 0.4rem;
}

.mistake-item .mistake-fix {
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.6;
}

.challenge-day {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    align-items: flex-start;
}

.challenge-day:last-child {
    border-bottom: none;
}

.challenge-day .day-label {
    flex-shrink: 0;
    width: 80px;
    font-weight: 700;
    font-size: 0.85rem;
    color: #1a1a2e;
    padding-top: 2px;
}

.challenge-day .day-task {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    line-height: 1.5;
}

.challenge-day .day-time {
    flex-shrink: 0;
    font-size: 0.8rem;
    color: #6b7280;
    text-align: right;
    padding-top: 2px;
}

.guide-actions {
    text-align: center;
    padding: 3rem 0 2rem;
    border-top: 2px solid #1a1a2e;
    margin-top: 2rem;
}

.guide-actions h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.guide-actions p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.guide-actions .btn {
    margin: 0 0.5rem;
}

.share-url {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-family: monospace;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    margin-top: 1rem;
    text-align: center;
    cursor: pointer;
    outline: none;
}

.share-url:focus {
    border-color: #1a1a2e;
}

.resource-group {
    margin-bottom: 2rem;
}

.resource-group h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* ==================== VALIDATION ==================== */

.validation-message {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

.validation-message.visible {
    display: block;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .trust-points {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .model-meta {
        gap: 1rem;
    }

    .challenge-day {
        flex-wrap: wrap;
    }

    .challenge-day .day-time {
        width: 100%;
        text-align: left;
        padding-left: 0;
        margin-top: 0.25rem;
    }

    .landing-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .container {
        padding: 1.5rem 1rem;
    }

    .guide-actions .btn {
        display: block;
        margin: 0.5rem auto;
        width: 100%;
        max-width: 300px;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .screen { display: block !important; min-height: auto; }
    #landing, #questionnaire, #loading { display: none !important; }
    .guide-actions { display: none; }
    .nav-buttons { display: none; }
    .progress-bar-container { display: none; }
    .progress-text { display: none; }
    body { background: white; }
    .recommendation-card { break-inside: avoid; }
    .week-block { break-inside: avoid; }
    .resource-card { border: 1px solid #ccc; }
}