:root {
    --primary-orange: #ff7a00;
    --primary-light: #fff5eb;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-color: #fffaf5;
    --border-color: #ffd4b3;
    --white: #ffffff;
    --success-green: #4CAF50;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f5f5f5;
    color: var(--text-dark);
}

.app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid #f0e0d0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-placeholder {
    width: 48px;
    height: 48px;
    background-color: var(--primary-orange);
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    font-size: 20px;
    color: var(--primary-orange);
    font-weight: 700;
}

.logo-text span {
    font-size: 12px;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

.btn-outline {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Main Layout */
.dashboard-layout {
    display: flex;
    flex: 1;
    padding: 40px;
    gap: 40px;
}

/* Left Sidebar */
.sidebar-left {
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 36px;
    color: var(--primary-orange);
    line-height: 1.2;
    margin-bottom: 12px;
}

.sidebar-header p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Stepper */
.stepper {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    left: 18px; /* Adjusted center for 38px circle */
    top: 20px;
    bottom: 20px;
    width: 2px;
    background-color: #f0e0d0;
    z-index: 1;
}

.step {
    display: flex;
    gap: 16px;
    position: relative;
    z-index: 2;
    padding: 16px 0;
}

.step-circle {
    width: 38px; /* Enlarged from 32px */
    height: 38px; /* Enlarged from 32px */
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid #f0e0d0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 16px; /* Enlarged from 14px */
    color: var(--text-gray);
    flex-shrink: 0;
}

.step.active .step-circle {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
    color: var(--white);
}

.step.completed .step-circle {
    background-color: var(--success-green);
    border-color: var(--success-green);
    color: var(--white);
}

.step-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.step-content strong {
    font-size: 17px; /* Enlarged from 15px */
    color: var(--text-dark);
}

.step.active .step-content strong {
    color: var(--primary-orange);
}

.step-status {
    font-size: 13px; /* Enlarged from 12px */
    color: var(--text-gray);
    margin-top: 4px;
}

/* Privacy Box */
.privacy-box {
    background-color: var(--primary-light);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: auto;
}

.privacy-icon {
    color: var(--primary-orange);
    flex-shrink: 0;
}

.privacy-box strong {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.privacy-box p {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.5;
}

/* Main Content Area */
.main-content {
    flex: 1;
    background-color: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

/* Right Sidebar */
.sidebar-right {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Footer */
.bottom-footer {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 32px 40px;
    border-top: 1px solid #f0e0d0;
    background-color: var(--primary-light);
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 400px;
}

.footer-icon {
    color: var(--primary-orange);
}

.footer-item strong {
    font-size: 14px;
    display: block;
    margin-bottom: 4px;
}

.footer-item p {
    font-size: 12px;
    color: var(--text-gray);
}

/* Utilities for dynamic JS content */

/* Question Header */
.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.question-header h3 {
    font-size: 16px;
    color: var(--text-gray);
}
.question-header .progress-text {
    font-size: 14px;
    color: var(--primary-orange);
    font-weight: 600;
}

.progress-bar-container {
    height: 8px;
    background-color: #f0e0d0;
    border-radius: 4px;
    margin-bottom: 32px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-orange);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.question-title-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.q-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-orange);
    flex-shrink: 0;
}
.question-title-box h1 {
    font-family: 'Merriweather', serif;
    font-size: 36px;
    line-height: 1.3;
    color: var(--text-dark);
}
.subtitle {
    color: var(--text-gray);
    margin-bottom: 32px;
    padding-left: 64px;
}

/* Options Grid */
.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.option-card {
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px 52px 20px 20px; /* Prevent text overlap with checkbox */
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    gap: 16px;
    position: relative;
}

.option-card:hover {
    border-color: var(--primary-orange);
    background-color: var(--primary-light);
}

.option-card.selected {
    border-color: var(--primary-orange);
    background-color: var(--primary-light);
}

.option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-orange);
    flex-shrink: 0;
}

.option-text h4 {
    font-size: 16px;
    margin-bottom: 8px;
}
.option-text p {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
}

.checkbox-circle {
    width: 24px;
    height: 24px;
    border: 2px solid #ccc;
    border-radius: 6px;
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.option-card.selected .checkbox-circle {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}
.option-card.selected .checkbox-circle::after {
    content: '✓';
    color: white;
    font-size: 14px;
}

/* Input Lainnya */
.input-lainnya {
    margin-bottom: 32px;
}
.input-lainnya label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}
.input-lainnya input {
    width: 100%;
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
}

/* Actions */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    padding: 14px 28px;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    padding: 14px 28px;
    border: none;
    border-radius: 30px;
    background-color: var(--primary-orange);
    color: white;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tip Card */
.tip-card {
    border: 1px solid #f0e0d0;
    border-radius: 16px;
    padding: 24px;
    background-color: var(--white);
}

.tip-card h3 {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.tip-card p {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

.legend-card {
    border: 1px solid #f0e0d0;
    border-radius: 16px;
    padding: 24px;
    background-color: var(--primary-light);
}
.legend-card h4 {
    font-size: 14px;
    margin-bottom: 16px;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 12px;
}
.legend-item svg {
    color: var(--primary-orange);
}

/* Results State */
.results-header {
    text-align: center;
    margin-bottom: 40px;
}
.results-header h2 {
    font-family: 'Merriweather', serif;
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 12px;
}
.results-header p {
    color: var(--text-gray);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.result-box {
    border: 1px solid #f0e0d0;
    border-radius: 16px;
    padding: 24px;
}
.result-box h3 {
    font-size: 18px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.match-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.match-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--primary-orange);
    flex-shrink: 0;
}
.match-info {
    flex: 1;
}
.match-info h4 {
    font-size: 15px;
    margin-bottom: 4px;
}
.match-info p {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
}
.match-bar-bg {
    height: 6px;
    background-color: #f0e0d0;
    border-radius: 3px;
    overflow: hidden;
}
.match-bar-fill {
    height: 100%;
    background-color: var(--primary-orange);
    border-radius: 3px;
}
.match-score {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-orange);
}

/* Donut Chart Mock */
.donut-chart-box {
    text-align: center;
    padding: 24px;
    border: 1px solid #f0e0d0;
    border-radius: 16px;
}
.donut {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-orange) 87%, #f0e0d0 0);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 16px;
}
.donut-inner {
    width: 120px;
    height: 120px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.donut-inner strong {
    font-size: 32px;
    color: var(--primary-orange);
}
.donut-inner span {
    font-size: 12px;
    color: var(--text-gray);
    text-align: center;
}

/* --- Media Query for Mobile Adaptability --- */
@media (max-width: 768px) {
    .topbar {
        padding: 16px 20px;
    }
    
    .dashboard-layout {
        flex-direction: column;
        padding: 16px;
        gap: 24px;
    }

    .sidebar-left {
        width: 100%;
        gap: 20px;
    }

    .sidebar-header {
        text-align: center;
    }

    .sidebar-header h2 {
        font-size: 28px;
    }

    /* Horizontal Stepper on Mobile */
    .stepper {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        padding: 0 10px;
    }

    .stepper::before {
        left: 10px;
        right: 10px;
        top: 50%;
        bottom: auto;
        width: calc(100% - 20px);
        height: 2px;
        transform: translateY(-50%);
    }

    .step {
        padding: 0;
        gap: 0;
        flex-direction: column;
        align-items: center;
    }

    .step-content {
        display: none; /* Hide labels/text on mobile */
    }

    .step-circle {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    #sidebar-left-content {
        display: none;
    }

    .privacy-box {
        display: none;
    }

    /* Main Content */
    .main-content {
        padding: 24px 16px;
        border-radius: 16px;
    }

    .question-title-box {
        gap: 12px;
    }

    .question-title-box h1 {
        font-size: 22px; /* Adjusted down slightly for mobile screen fitting */
    }

    .q-icon {
        width: 38px;
        height: 38px;
    }
    
    .q-icon svg {
        width: 20px;
        height: 20px;
    }

    .subtitle {
        padding-left: 0;
        margin-bottom: 24px;
        text-align: center;
    }

    .options-grid {
        grid-template-columns: 1fr; /* Single column for options */
        gap: 12px;
    }

    .option-card {
        padding: 16px;
        border-radius: 12px;
    }

    .option-card h4 {
        font-size: 14px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .action-buttons button {
        width: 100%;
        justify-content: center;
    }

    /* Results */
    .results-header h2 {
        font-size: 26px;
    }

    .results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .result-box {
        padding: 20px 16px;
        border-radius: 16px;
    }

    .result-box h3 {
        font-size: 16px;
    }

    .match-item {
        margin-bottom: 16px;
    }

    .match-score {
        font-size: 16px;
    }

    .bottom-footer {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 24px;
        text-align: center;
    }

    /* Compact Quiz Layout on Mobile to prevent scrolling */
    .dashboard-layout.in-quiz {
        gap: 12px;
        padding: 10px 12px;
    }
    
    .dashboard-layout.in-quiz .sidebar-left {
        gap: 12px;
    }
    
    .dashboard-layout.in-quiz .sidebar-header {
        display: none; /* Hide header completely in quiz screen on mobile */
    }
    
    .dashboard-layout.in-quiz .stepper {
        margin-bottom: 4px;
    }
    
    .dashboard-layout.in-quiz .main-content {
        padding: 16px 14px;
        border-radius: 12px;
    }
    
    .dashboard-layout.in-quiz .progress-bar-container {
        margin-bottom: 12px;
    }
    
    .dashboard-layout.in-quiz .question-title-box {
        margin-bottom: 8px;
        gap: 10px;
    }
    
    .dashboard-layout.in-quiz .question-title-box h1 {
        font-size: 16px !important;
        font-weight: 700;
        line-height: 1.4;
    }
    
    .dashboard-layout.in-quiz .q-icon {
        width: 32px;
        height: 32px;
    }
    
    .dashboard-layout.in-quiz .q-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .dashboard-layout.in-quiz .subtitle {
        margin-bottom: 12px;
        font-size: 12px;
    }
    
    .dashboard-layout.in-quiz .options-grid {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .dashboard-layout.in-quiz .option-card {
        padding: 10px 44px 10px 12px; /* Pad right to prevent overlap with checkbox */
        border-radius: 8px;
        border-width: 1.5px;
    }
    
    .dashboard-layout.in-quiz .option-card h4 {
        font-size: 13px;
        line-height: 1.3;
    }

    .dashboard-layout.in-quiz .checkbox-circle {
        top: 50%;
        transform: translateY(-50%);
        right: 12px;
    }

    .dashboard-layout.in-quiz .input-lainnya {
        margin-bottom: 12px;
    }

    .dashboard-layout.in-quiz .input-lainnya label {
        font-size: 11px;
        margin-bottom: 4px;
        display: block;
    }

    .dashboard-layout.in-quiz .input-lainnya input {
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .dashboard-layout.in-quiz .action-buttons {
        gap: 8px;
        flex-direction: row; /* Keep buttons horizontal if possible, or vertical but compact */
    }
    
    .dashboard-layout.in-quiz .action-buttons button {
        padding: 10px 16px;
        font-size: 13px;
        width: 100%;
        margin-top: 0;
    }
}
