/* ============================= */
/*   BEST SCORE BADGE            */
/* ============================= */
.module-best-score {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #34A853;
    background: #E6F4EA;
    padding: 1px 6px;
    border-radius: 50px;
    margin-left: 4px;
    min-width: 1px;
}

.module-best-score:empty { display: none; }

/* ============================= */
/*      MODULE HERO              */
/* ============================= */
.module-hero {
    padding: 60px 20px;
    text-align: center;
    color: white;
}

.word-hero {
    background: linear-gradient(135deg, #2B579A 0%, #1a3a6b 100%);
}

.ppt-hero {
    background: linear-gradient(135deg, #D24726 0%, #a0351b 100%);
}

.excel-hero {
    background: linear-gradient(135deg, #217346 0%, #165232 100%);
}

.module-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

.module-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.module-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.module-info-bar {
    display: flex;
    justify-content: center;
    gap: 25px;
    font-size: 0.95rem;
    opacity: 0.85;
}

.module-info-bar i {
    margin-right: 5px;
}

/* ============================= */
/*      STEP NAVIGATION          */
/* ============================= */
.step-nav-section {
    background: var(--bg-white);
    padding: 25px 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 62px;
    z-index: 999;
}

.step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
}

.step-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 5px 15px;
    transition: all 0.3s;
}

.step-nav-item span {
    font-size: 0.78rem;
    color: var(--text-gray);
    font-weight: 500;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #E2E8F0;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.step-nav-item.active .step-number {
    background: var(--primary);
    color: white;
}

.step-nav-item.completed .step-number {
    background: #22C55E;
    color: white;
}

.step-nav-item.active span {
    color: var(--primary);
    font-weight: 600;
}

.step-connector {
    width: 40px;
    height: 3px;
    background: #E2E8F0;
    margin-bottom: 20px;
}

/* ============================= */
/*      STEP PANELS              */
/* ============================= */
.step-content-area {
    padding: 40px 20px;
    min-height: 80vh;
}

.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-header {
    text-align: center;
    margin-bottom: 35px;
}

.step-label {
    display: inline-block;
    background: #EEF2FF;
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.step-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.step-header p {
    color: var(--text-gray);
    font-size: 1.05rem;
}

/* ============================= */
/*   INSTRUCTION CARDS           */
/* ============================= */
.instruction-card {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.instruction-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.instruction-card h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.instruction-card > p {
    color: var(--text-gray);
    margin-bottom: 15px;
}

.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.checklist li i {
    color: #22C55E;
}

/* ============================= */
/*   WORD SIMULATOR              */
/* ============================= */
.simulation-container {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.simulation-container h3 {
    margin-bottom: 8px;
}

.simulation-container h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.sim-instruction {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.word-simulator {
    border: 2px solid #D1D5DB;
    border-radius: 8px;
    overflow: hidden;
    background: #F9FAFB;
}

.sim-toolbar {
    display: flex;
    background: #F3F4F6;
    border-bottom: 1px solid #D1D5DB;
    padding: 0;
    overflow-x: auto;
}

.sim-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--text-gray);
    cursor: default;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.sim-tab.active-tab {
    color: var(--text-dark);
    border-bottom-color: var(--primary);
}

.sim-copilot-tab {
    color: var(--primary) !important;
    font-weight: 600;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sim-ribbon {
    padding: 10px 15px;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.sim-ribbon-content {
    display: flex;
    gap: 10px;
}

.ribbon-placeholder {
    width: 80px;
    height: 12px;
    background: #E5E7EB;
    border-radius: 4px;
}

.ribbon-placeholder.short {
    width: 50px;
}

.sim-document {
    min-height: 300px;
    padding: 30px;
    position: relative;
    background: white;
}

.sim-cursor-line {
    width: 2px;
    height: 20px;
    background: black;
    animation: blink 1s step-end infinite;
    margin-bottom: 10px;
}

@keyframes blink {
    50% { opacity: 0; }
}

.sim-placeholder-text {
    color: #9CA3AF;
    font-style: italic;
}

/* Highlight Pulse Animation */
.highlight-pulse {
    animation: pulse 2s infinite;
    position: relative;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 70, 229, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

.sim-copilot-tab.highlight-pulse {
    background: rgba(79, 70, 229, 0.1);
    border-radius: 4px;
}

/* Copilot Panel */
.sim-copilot-panel {
    display: none;
    position: absolute;
    right: 20px;
    top: 20px;
    width: 280px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.sim-copilot-panel.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.copilot-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.copilot-panel-body {
    padding: 15px;
}

.copilot-panel-body > p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 12px;
}

.copilot-suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.copilot-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.88rem;
    cursor: default;
    transition: all 0.2s;
}

.copilot-suggestion i {
    color: var(--primary);
}

.copilot-suggestion.highlight-pulse {
    cursor: pointer;
    border-color: var(--primary);
    background: #EEF2FF;
}

/* Draft Input */
.copilot-draft-input {
    display: none;
    padding: 15px;
    border-top: 1px solid #E2E8F0;
}

.copilot-draft-input.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.copilot-draft-input h4 {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.draft-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    cursor: pointer;
}

.draft-placeholder {
    color: #9CA3AF;
    font-size: 0.82rem;
}

.draft-generate-btn {
    width: 100%;
    padding: 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

/* Simulation Feedback */
.sim-feedback {
    margin-top: 20px;
    padding: 15px;
    background: #F8FAFC;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.feedback-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.feedback-step.hidden {
    display: none;
}

/* ============================= */
/*   RACE FORMULA                */
/* ============================= */
.formula-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.formula-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #F8FAFC;
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.formula-letter {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
}

.formula-text strong {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 3px;
}

.formula-text p {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.formula-text em {
    font-size: 0.85rem;
    color: var(--primary);
    background: #EEF2FF;
    padding: 3px 8px;
    border-radius: 4px;
}

/* ============================= */
/*   PROMPT BUILDER              */
/* ============================= */
.prompt-builder {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.prompt-builder h3 {
    margin-bottom: 8px;
}

.prompt-builder h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.prompt-builder > p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.builder-section {
    margin-bottom: 18px;
}

.builder-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.builder-section select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.3s;
}

.builder-section select:focus {
    outline: none;
    border-color: var(--primary);
}

.generated-prompt {
    background: #1E293B;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.prompt-label {
    color: #818CF8;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.prompt-label i {
    margin-right: 5px;
}

.prompt-text {
    color: #E2E8F0;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    font-family: 'Segoe UI', monospace;
}

.copy-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: var(--primary-light);
}

/* ============================= */
/*   COMPARISON SECTION          */
/* ============================= */
.comparison-section {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.comparison-section h3 {
    margin-bottom: 20px;
}

.comparison-section h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.comparison-card {
    padding: 20px;
    border-radius: 10px;
    border: 2px solid;
}

.comparison-card.bad {
    border-color: #FCA5A5;
    background: #FEF2F2;
}

.comparison-card.good {
    border-color: #86EFAC;
    background: #F0FDF4;
}

.comparison-label {
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.comparison-card.bad .comparison-label {
    color: #DC2626;
}

.comparison-card.good .comparison-label {
    color: #16A34A;
}

.comparison-label i {
    margin-right: 5px;
}

.comparison-text {
    font-style: italic;
    padding: 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 0.92rem;
    line-height: 1.6;
}

.comparison-why strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.comparison-why ul {
    padding-left: 20px;
    font-size: 0.88rem;
    color: var(--text-gray);
}

.comparison-why li {
    padding: 3px 0;
}

/* ============================= */
/*   LIVE DEMO SIMULATOR         */
/* ============================= */
.live-demo {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}

.live-demo h3 {
    margin-bottom: 8px;
}

.live-demo h3 i {
    color: var(--primary);
    margin-right: 8px;
}

/* (continuing from live-demo > p) */

.live-demo > p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.demo-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .demo-container {
        grid-template-columns: 1fr;
    }
}

.demo-input-area {
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    overflow: hidden;
}

.demo-input-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
}

.demo-input-area textarea {
    width: 100%;
    padding: 15px;
    border: none;
    font-size: 0.95rem;
    font-family: 'Segoe UI', sans-serif;
    resize: vertical;
    background: white;
    color: var(--text-dark);
    line-height: 1.6;
}

.demo-input-area textarea:focus {
    outline: none;
}

.demo-input-area textarea::placeholder {
    color: #9CA3AF;
}

.quick-templates {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-top: 1px solid #E2E8F0;
}

.template-label {
    font-size: 0.82rem;
    color: var(--text-gray);
    font-weight: 600;
    width: 100%;
    margin-bottom: 3px;
}

.template-btn {
    padding: 5px 12px;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 50px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.template-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.generate-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.generate-btn:hover {
    background: #4338CA;
}

.demo-output-area {
    background: white;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.7;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    color: #9CA3AF;
    text-align: center;
}

.output-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

/* Typing Animation */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Generated output styling */
.demo-output-area h4 {
    color: var(--text-dark);
    margin: 15px 0 8px;
    font-size: 1rem;
}

.demo-output-area ul, .demo-output-area ol {
    padding-left: 20px;
    margin: 8px 0;
}

.demo-output-area li {
    margin-bottom: 5px;
}

.demo-output-area strong {
    color: var(--primary);
}

/* ============================= */
/*   AFTER STEPS                 */
/* ============================= */
.after-steps {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.after-step {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #F8FAFC;
    border-radius: 10px;
    transition: transform 0.2s;
}

.after-step:hover {
    transform: translateX(5px);
}

.after-number {
    width: 35px;
    height: 35px;
    min-width: 35px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.after-text strong {
    display: block;
    margin-bottom: 3px;
}

.after-text p {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* ============================= */
/*   REFINE CHIPS                */
/* ============================= */
.refine-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.refine-chip {
    padding: 8px 16px;
    background: #EEF2FF;
    color: var(--primary);
    border: 1px solid #C7D2FE;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.refine-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================= */
/*   TEMPLATE SECTION            */
/* ============================= */
.template-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #E2E8F0;
    background: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.template-card {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
}

.template-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.template-card.hidden-template {
    display: none;
}

.template-tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.lesson-tag { background: #DBEAFE; color: #1D4ED8; }
.worksheet-tag { background: #FEF3C7; color: #B45309; }
.communication-tag { background: #FCE7F3; color: #BE185D; }
.assessment-tag { background: #D1FAE5; color: #065F46; }

.template-card h4 {
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.template-prompt {
    background: #1E293B;
    color: #E2E8F0;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.copy-template-btn {
    width: 100%;
    padding: 10px;
    background: #F1F5F9;
    border: 2px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-dark);
}

.copy-template-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.copy-template-btn.copied {
    background: #22C55E;
    color: white;
    border-color: #22C55E;
}

/* ============================= */
/*   QUIZ SECTION                */
/* ============================= */
.quiz-container {
    max-width: 700px;
    margin: 0 auto;
}

.quiz-question {
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 20px;
}

.question-number {
    font-size: 0.82rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.quiz-question h4 {
    font-size: 1.05rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #F8FAFC;
    border: 2px solid #E2E8F0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.quiz-option:hover {
    border-color: var(--primary-light);
    background: #EEF2FF;
}

.quiz-option input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

.quiz-option.correct {
    background: #F0FDF4;
    border-color: #22C55E;
}

.quiz-option.incorrect {
    background: #FEF2F2;
    border-color: #EF4444;
}

.submit-quiz-btn {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 30px auto;
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.submit-quiz-btn:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================= */
/*   QUIZ RESULTS                */
/* ============================= */
.quiz-results {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 30px;
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
}

.quiz-results.hidden {
    display: none;
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.quiz-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.quiz-results > p {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.results-score {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
}

.results-review {
    text-align: left;
    margin-bottom: 25px;
}

.review-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.92rem;
    border-bottom: 1px solid #F1F5F9;
}

.review-item i.fa-check-circle { color: #22C55E; }
.review-item i.fa-times-circle { color: #EF4444; }

.results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================= */
/*   COMPLETION BADGE            */
/* ============================= */
.completion-badge {
    text-align: center;
    padding: 50px 20px;
}

.completion-badge.hidden {
    display: none;
}

.badge-animation {
    animation: badgeAppear 0.6s ease;
}

@keyframes badgeAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.badge-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 0 30px rgba(245, 158, 11, 0.4);
}

.completion-badge h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.badge-stars {
    font-size: 2rem;
    margin: 15px 0;
}

.badge-next {
    color: var(--text-gray);
    margin-bottom: 20px;
}

.badge-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================= */
/*   BUTTONS                     */
/* ============================= */
.step-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 2px solid #E2E8F0;
}

.btn-primary {
    padding: 12px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    padding: 12px 25px;
    background: white;
    color: var(--text-dark);
    border: 2px solid #E2E8F0;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-secondary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================= */
/*   RESPONSIVE                  */
/* ============================= */
@media (max-width: 768px) {
    .module-hero h1 {
        font-size: 1.6rem;
    }

    .step-nav-item span {
        display: none;
    }

    .step-connector {
        width: 20px;
    }

    .formula-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .template-grid {
        grid-template-columns: 1fr;
    }

    .step-actions {
        flex-direction: column;
        gap: 10px;
    }

    .step-actions button, .step-actions a {
        width: 100%;
        justify-content: center;
    }

    .sim-copilot-panel {
        position: relative;
        right: auto;
        top: auto;
        width: 100%;
        margin-top: 15px;
    }

    .badge-actions {
        flex-direction: column;
    }

    .badge-actions a {
        width: 100%;
        justify-content: center;
    }
}

/* ============================= */
/*   QUIZ COMPONENT (quiz.js)    */
/* ============================= */

/* fieldset/legend reset for accessible quiz questions */
.quiz-question fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

.quiz-question legend {
    display: block;
    padding: 0;
    margin-bottom: 15px;
    font-weight: normal;
}

.question-text {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-dark);
    margin-top: 4px;
}

/* review items for the new component */
.review-correct i { color: #22C55E; }
.review-incorrect i { color: #EF4444; }

/* quiz-mount wrapper spacing */
#quiz-mount { margin-top: 10px; }

/* ============================= */
/*   LOCKED MODULE CARDS         */
/* ============================= */
.module-card.locked {
    opacity: 0.6;
    cursor: not-allowed;
    position: relative;
}

.module-card.locked::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255,255,255,0.3);
    pointer-events: none;
}

.module-lock-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #64748B;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    z-index: 2;
}

/* ============================= */
/*   LOCKED PAGE MESSAGE         */
/* ============================= */
.locked-page-message {
    max-width: 480px;
    margin: 80px auto;
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-white);
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
}

.locked-page-message .lock-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #64748B;
}

.locked-page-message h2 {
    margin-bottom: 12px;
}

.locked-page-message p {
    color: var(--text-gray);
    margin-bottom: 24px;
}

