/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #fdf0f0;
    color: #333;
    min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(135deg, #e8524a, #c0392b);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.header .scenario-tag {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 8px;
}

.header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 5px;
}

.header p {
    font-size: 14px;
    opacity: 0.85;
}

.game-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* ===== NAV TABS ===== */
.nav-tabs {
    display: flex;
    background: white;
    border-bottom: 3px solid #e8524a;
    overflow-x: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-tabs a {
    padding: 14px 20px;
    text-decoration: none;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all 0.2s;
}

.nav-tabs a:hover {
    color: #e8524a;
    background: #fff5f5;
}

.nav-tabs a.active {
    color: #e8524a;
    border-bottom: 3px solid #e8524a;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 820px;
    margin: 30px auto;
    padding: 0 20px 80px;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.card-red {
    border-left: 5px solid #e8524a;
}

.card-blue {
    border-left: 5px solid #3498db;
}

.card-green {
    border-left: 5px solid #27ae60;
}

.card-orange {
    border-left: 5px solid #f39c12;
}

.card h2 {
    font-size: 17px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-red h2 { color: #e8524a; }
.card-blue h2 { color: #3498db; }
.card-green h2 { color: #27ae60; }
.card-orange h2 { color: #f39c12; }

/* ===== SECTION HEADER ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 28px 0 14px;
}

.section-header .bar {
    width: 4px;
    height: 22px;
    background: #e8524a;
    border-radius: 2px;
}

.section-header h2 {
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
}

/* ===== STUDENT PAPER FORM ===== */
.paper-form {
    background: #fffef5;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 4px 4px 0px #e0e0e0,
                8px 8px 0px #ebebeb;
    position: relative;
    margin-bottom: 24px;
}

.paper-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    right: 30px;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        #e8524a 0px,
        #e8524a 30px,
        transparent 30px,
        transparent 40px
    );
    border-radius: 4px 4px 0 0;
}

.form-header {
    text-align: center;
    border-bottom: 2px solid #333;
    padding-bottom: 16px;
    margin-bottom: 24px;
    margin-top: 10px;
}

.form-header .form-logo {
    font-size: 32px;
    margin-bottom: 6px;
}

.form-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: #222;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.form-header p {
    font-size: 12px;
    color: #666;
    letter-spacing: 1px;
}

/* ===== FORM ROWS ===== */
.form-section-title {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: white;
    background: #333;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 18px 0 12px;
    font-weight: 700;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.form-row label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
    margin-bottom: 4px;
}

.form-value {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    border-bottom: 2px solid #333;
    padding: 6px 4px;
    min-height: 34px;
    line-height: 1.4;
}

.form-value.highlight {
    color: #e8524a;
    font-weight: 700;
}

.form-value.tricky {
    color: #c0392b;
    font-weight: 800;
    font-size: 17px;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

.form-row-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.form-checkbox-row {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.form-checkbox .box {
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.form-checkbox .box.checked {
    background: #333;
    color: white;
}

.form-signature {
    border-top: 1px solid #ccc;
    margin-top: 24px;
    padding-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-signature .sig-line {
    border-bottom: 1px solid #333;
    min-height: 40px;
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4px;
    font-style: italic;
}

.form-signature .sig-label {
    font-size: 11px;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* ===== TEACHER BLANK FORM ===== */
.teacher-form {
    background: white;
    border: 2px solid #3498db;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    position: relative;
}

.teacher-form::before {
    content: '👩‍🏫 TEACHER COPY — BLANK FORM';
    position: absolute;
    top: -14px;
    left: 20px;
    background: #3498db;
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Teacher form input fields */
.teacher-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #3498db;
    border-radius: 0;
    padding: 6px 4px;
    font-size: 15px;
    font-family: 'Segoe UI', sans-serif;
    background: transparent;
    color: #333;
    outline: none;
    min-height: 34px;
}

.teacher-input:focus {
    border-bottom-color: #e8524a;
    background: #fff5f5;
}

.teacher-input::placeholder {
    color: #ccc;
    font-style: italic;
    font-size: 13px;
}

/* ===== INSTRUCTION BOX ===== */
.instruction-box {
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 16px;
}

.instruction-box.student-box {
    background: #fff5f5;
    border: 2px solid #e8524a;
}

.instruction-box.teacher-box {
    background: #f0f7ff;
    border: 2px solid #3498db;
}

.instruction-box h3 {
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instruction-box.student-box h3 { color: #e8524a; }
.instruction-box.teacher-box h3 { color: #3498db; }

.instruction-box ol, 
.instruction-box ul {
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #555;
}

/* ===== CHALLENGE TAGS ===== */
.challenge-tag {
    display: inline-block;
    background: #c0392b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 6px;
    vertical-align: middle;
}

.easy-tag {
    background: #27ae60;
}

.medium-tag {
    background: #f39c12;
}

/* ===== ANSWER KEY ===== */
.answer-key {
    background: #f9f9f9;
    border: 2px dashed #e8524a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.answer-key h3 {
    color: #e8524a;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 700;
}

.answer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.answer-row:last-child {
    border-bottom: none;
}

.answer-row .q {
    color: #888;
    flex: 1;
}

.answer-row .a {
    color: #222;
    font-weight: 700;
    flex: 1;
    text-align: right;
}

.answer-row .a.hard {
    color: #e8524a;
}

/* ===== SCORE AREA ===== */
.score-area {
    background: linear-gradient(135deg, #e8524a, #c0392b);
    color: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.score-area h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.score-display {
    font-size: 60px;
    font-weight: 800;
    line-height: 1;
    margin: 10px 0;
}

.score-area p {
    font-size: 14px;
    opacity: 0.85;
}

/* ===== CHECKLIST ===== */
.checklist {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

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

.check-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s;
}

.check-circle.done {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

.check-circle.wrong {
    background: #e8524a;
    border-color: #e8524a;
    color: white;
}

.checklist li .points {
    margin-left: auto;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    flex-shrink: 0;
}

.checklist li .points.earned {
    color: #27ae60;
}

/* ===== DIFFICULTY METER ===== */
.difficulty {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.difficulty span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.diff-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
}

.diff-dot.fill-red { background: #e8524a; }
.diff-dot.fill-orange { background: #f39c12; }
.diff-dot.fill-green { background: #27ae60; }

/* ===== PRINT BUTTON ===== */
.btn-print {
    display: inline-block;
    padding: 10px 20px;
    background: #333;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    margin-right: 8px;
    transition: all 0.2s;
}

.btn-print:hover {
    background: #111;
}

/* ===== NEXT BUTTON ===== */
.btn-next {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e8524a, #c0392b);
    color: white;
    text-align: center;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,82,74,0.4);
}

/* ===== SPLIT LAYOUT ===== */
.split-note {
    background: #fff8e1;
    border: 2px solid #f39c12;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #555;
    margin-bottom: 16px;
    text-align: center;
    font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    font-size: 13px;
    color: #aaa;
}

.footer span { color: #e8524a; }

/* ===== PRINT STYLES ===== */
@media print {
    .nav-tabs, .btn-next, .btn-print, 
    .footer, .header { display: none; }
    body { background: white; }
    .container { margin: 0; padding: 10px; }
    .paper-form { box-shadow: none; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .form-row-2col { grid-template-columns: 1fr; }
    .form-row-3col { grid-template-columns: 1fr 1fr; }
    .header h1 { font-size: 20px; }
    .paper-form { padding: 20px 16px; }
}