/* Senior-Friendly "Simple but Designed" Theme - Wizard Edition */
:root {
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --primary-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --radius: 16px;
    --input-height: 56px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    line-height: 1.6;
    font-size: 18px;
}

.container {
    width: 90%;
    max-width: 800px;
    padding: 40px;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    /* Added for absolute positioning context */
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #111827;
}

.subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0;
}

/* --- Wizard Progress Bar --- */
#wizard-progress {
    margin-bottom: 30px;
}

.progress-track {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.4s ease;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #9ca3af;
}

.progress-labels span.active {
    color: #2563eb;
    font-weight: 600;
}

/* --- Search Section --- */
.search-section {
    text-align: center;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

input[type="text"],
input[type="email"] {
    flex: 1;
    max-width: 400px;
    height: var(--input-height);
    padding: 0 24px;
    font-size: 1.1rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    background: #f9fafb;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
}

.btn {
    height: var(--input-height);
    padding: 0 36px;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: var(--primary-gradient);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--primary-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-text {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1rem;
    cursor: pointer;
    padding: 10px;
}

.btn-text:hover {
    color: #111827;
    text-decoration: underline;
}

.btn-outline {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
    box-shadow: none;
    margin: 5px;
}

.btn-outline:hover {
    background: #eff6ff;
}

/* --- Choice Grid (The Core Wizard UI) --- */
.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

.step-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: #111827;
}

.choice-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Mobile: 1 col */
    gap: 16px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .choice-grid {
        grid-template-columns: 1fr;
        /* Stack cards on mobile */
    }

    .choice-card {
        padding: 1rem;
        /* Less padding on mobile */
    }

    /* Fix PAA Recursive Padding */
    .choice-card .choice-card {
        margin-left: 10px;
        /* Reduce indentation */
        padding-left: 10px;
        border-left: 3px solid #e5e7eb;
    }

    /* Type Selection Stacking */
    #type-grid {
        grid-template-columns: 1fr;
    }

    /* Thumb-friendly Buttons */
    .btn,
    .choice-card,
    input[type="text"] {
        min-height: 48px;
        /* Ensure 48px+ touch target */
    }

    h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .choice-grid {
        grid-template-columns: 1fr 1fr;
        /* Desktop: 2 cols */
    }
}

.choice-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.choice-card:hover {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.choice-card .arrow {
    color: #d1d5db;
    font-weight: bold;
}

.choice-card:hover .arrow {
    color: #2563eb;
}

/* --- Final Result --- */
.analysis-card {
    background-color: #f0fdf4;
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 25px;
}

.analysis-card h3 {
    color: #16a34a;
    margin-top: 0;
}

.path-display {
    margin-bottom: 15px;
    font-weight: 500;
    color: #374151;
}

.advice-box {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1f2937;
}

.path-summary-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

#final-path-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#final-path-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
    color: #4b5563;
}

#final-path-list li:last-child {
    border-bottom: none;
    font-weight: 600;
    color: #111827;
}

/* Utilities */
.hidden {
    display: none !important;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

    100% {
        transform: rotate(360deg);
    }
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: white;
    padding: 12px 24px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s;
    z-index: 9999;
}

.export-section {
    text-align: center;
    margin-top: 20px;
}

/* --- Added Button Styles for Pointer Cursor --- */
.btn {
    display: inline-block;
    background-color: #2563eb;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #1d4ed8;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    cursor: pointer;
}

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

.btn-text {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px 16px;
    font-size: 0.95rem;
}

.btn-text:hover {
    color: #111827;
    background: #f3f4f6;
    border-radius: 8px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    cursor: pointer;
}