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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

h1 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 20px 0 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Screen Management */
.screen {
    display: none;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

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

/* Welcome Screen */
#welcomeScreen h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

#welcomeScreen ul {
    margin: 20px 0 20px 30px;
}

#welcomeScreen li {
    margin: 10px 0;
}

.important {
    background: #fef3c7;
    border-left: 4px solid var(--warning-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Scenario Screen */
.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.scenario-tag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.complexity-indicator {
    display: flex;
    gap: 4px;
}

.complexity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
}

.complexity-dot.filled {
    background: var(--warning-color);
}

.scenario-text {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    line-height: 1.8;
}

.scenario-question {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--primary-color);
    margin: 30px 0 20px 0;
}

.choice-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.choice-card {
    border: 2px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.choice-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateX(5px);
}

.choice-card.selected {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.choice-title {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.choice-description {
    color: var(--text-secondary);
    font-size: 0.95em;
}

/* Reflection Screen */
.reflection-prompt {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    font-size: 1.05em;
    border-left: 4px solid var(--primary-color);
}

.reflection-input {
    margin-bottom: 30px;
}

.reflection-input label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1em;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    text-align: right;
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-top: 5px;
}

.framework-selection {
    margin-bottom: 30px;
}

.framework-selection > label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

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

.framework-option {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.framework-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-color);
}

.framework-option input[type="radio"] {
    display: none;
}

.framework-option input[type="radio"]:checked + .framework-name {
    color: var(--primary-color);
}

.framework-option input[type="radio"]:checked ~ * {
    color: var(--primary-color);
}

.framework-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.framework-name {
    font-weight: 600;
    font-size: 1.05em;
    margin-bottom: 5px;
}

.framework-desc {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* Analysis Screen */
.your-choice-summary {
    background: #eff6ff;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.your-choice-summary h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.framework-analyses {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.framework-analysis {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.framework-analysis h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.framework-analysis p {
    line-height: 1.8;
    color: var(--text-secondary);
}

.reflection-box {
    background: #fef3c7;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.reflection-box h4 {
    color: var(--warning-color);
    margin-bottom: 10px;
}

/* Reconsideration Screen */
.reconsideration-intro {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 1.05em;
    border-left: 4px solid var(--warning-color);
}

.original-choice-reminder {
    background: #eff6ff;
    border: 2px solid var(--primary-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.original-choice-reminder h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.original-choice-reminder .choice-label {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 8px;
    display: block;
}

.reconsideration-question {
    font-size: 1.1em;
    margin-bottom: 20px;
    font-weight: 600;
}

.reconsideration-reflection {
    margin-top: 30px;
}

.reconsideration-reflection label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.choice-card.original-choice {
    border: 2px solid var(--primary-color);
    background: #eff6ff;
    position: relative;
}

.choice-card.original-choice::before {
    content: "Your Original Choice";
    position: absolute;
    top: -12px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

.choice-card.changed-choice {
    border: 2px solid var(--success-color);
    background: #f0fdf4;
}

.choice-card.changed-choice::after {
    content: "New Choice";
    position: absolute;
    top: -12px;
    right: 15px;
    background: var(--success-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

/* Completion Screen */
.summary-stats {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.framework-chart {
    margin-top: 20px;
}

.chart-bar {
    margin: 15px 0;
}

.chart-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.chart-fill-container {
    width: 100%;
    height: 30px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 1s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: 600;
    font-size: 0.85em;
}

.spaced-retrieval {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.spaced-retrieval h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.callback-scenario {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.final-reflection {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.final-reflection h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: 1em;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-primary:disabled {
    background: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .screen {
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .choice-card:hover {
        transform: none;
    }
}
