/* ============================================
   Prompt Engineering Simulator — BigHand Training
   Brand colors from LaTeX template (teal palette)
   ============================================ */

/* --- CSS Variables --- */
:root {
    /* Brand — from templates/slides/config/colors.tex */
    --teal-900: rgb(0, 80, 115);
    --teal-700: rgb(0, 60, 87);
    --teal-600: rgb(16, 125, 172);
    --teal-500: rgb(24, 154, 211);
    --teal-100: rgb(180, 225, 245);
    --teal-50: rgb(224, 242, 241);

    /* Semantic */
    --practice-dark: var(--teal-900);
    --practice-base: var(--teal-600);
    --practice-light: var(--teal-50);

    /* Grays */
    --gray-900: rgb(30, 32, 34);
    --gray-800: rgb(52, 58, 64);
    --gray-700: rgb(73, 80, 87);
    --gray-600: rgb(95, 100, 105);
    --gray-500: rgb(134, 142, 150);
    --gray-400: rgb(173, 181, 189);
    --gray-300: rgb(210, 215, 220);
    --gray-200: rgb(233, 236, 239);
    --gray-100: rgb(247, 248, 250);
    --gray-50: rgb(250, 251, 252);

    /* Accents */
    --amber-600: rgb(251, 140, 0);
    --amber-100: rgb(255, 243, 224);
    --green-600: rgb(67, 160, 71);
    --green-100: rgb(232, 245, 233);
    --red-600: rgb(229, 57, 53);
    --red-100: rgb(255, 235, 238);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

    /* Fonts */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--gray-900);
    background: var(--gray-100);
    line-height: 1.6;
    min-height: 100vh;
}

/* --- Header --- */
.header {
    background: var(--teal-900);
    color: white;
    padding: var(--space-sm) var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.logo-text { white-space: nowrap; }

.logo-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-img {
    width: 26px;
    height: auto;
    object-fit: contain;
}

.header-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.header-nav {
    display: flex;
    gap: var(--space-xs);
}

.nav-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.15s;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-active {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.8rem;
}

.course-switcher {
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    padding: 4px 24px 4px 10px;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='white' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px 6px;
}
.course-switcher:hover { background-color: rgba(255, 255, 255, 0.2); }
.course-switcher:focus { outline: 2px solid rgba(255, 255, 255, 0.5); outline-offset: 1px; }
.course-switcher option { color: var(--gray-900); background: white; }

.status-divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255, 255, 255, 0.2);
    margin: 2px 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-live {
    background: var(--green-600);
    box-shadow: 0 0 6px rgba(67, 160, 71, 0.5);
}

.status-mock {
    background: var(--amber-600);
    box-shadow: 0 0 6px rgba(251, 140, 0, 0.5);
}

.status-text {
    opacity: 0.85;
}

/* --- Main Content --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
    min-height: calc(100vh - 120px);
}

.page-header {
    margin-bottom: var(--space-2xl);
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: var(--space-sm);
}

.subtitle {
    color: var(--gray-600);
    font-size: 1rem;
}

/* --- Card Grid --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-lg);
}

.exercise-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
}

.exercise-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-500);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
    min-height: 22px;
}

.card-badge {
    background: var(--teal-50);
    color: var(--teal-900);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.card-desc {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.meta-tag {
    background: var(--amber-100);
    color: var(--gray-800);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.meta-steps {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.card-concepts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.concept-chip {
    background: var(--gray-100);
    color: var(--gray-700);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* --- Exercise View --- */
.exercise-header {
    margin-bottom: var(--space-xl);
}

.back-btn {
    background: none;
    border: none;
    color: var(--teal-600);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
    margin-bottom: var(--space-md);
    font-weight: 500;
}

.back-btn:hover {
    color: var(--teal-900);
}

.exercise-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: var(--space-xs);
}

/* Step progress dots */
.step-progress {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    background: white;
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-active {
    border-color: var(--teal-600);
    background: var(--teal-600);
    color: white;
}

.step-done {
    border-color: var(--teal-500);
    background: var(--teal-50);
    color: var(--teal-900);
}

.step-future {
    opacity: 0.5;
}

/* Step content */
.step-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.step-instruction {
    background: white;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--teal-600);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.step-instruction h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

.step-label {
    color: var(--teal-600);
    margin-right: var(--space-sm);
}

.instruction-text {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Hints */
.hints-section, .issues-section {
    margin-top: 0;
}

.hints-toggle {
    background: none;
    border: none;
    color: var(--teal-600);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 500;
    padding: var(--space-sm) 0;
}

.hints-toggle:hover {
    color: var(--teal-900);
}

.hints-list, .issues-list {
    background: var(--amber-100);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
}

.hint-item, .issue-item {
    color: var(--gray-800);
    font-size: 0.9rem;
    padding: var(--space-xs) 0;
}

.hint-item::before {
    content: '💡 ';
}

.issue-item::before {
    content: '⚠️ ';
}

.issues-list {
    background: var(--green-100);
}

/* Editor grid */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .editor-grid {
        grid-template-columns: 1fr;
    }
}

.editor-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.panel-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.lock-badge {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.prompt-editor {
    width: 100%;
    border: none;
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    color: var(--gray-900);
    background: white;
}

.prompt-editor:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px var(--teal-500);
}

.editor-readonly {
    background: var(--gray-50);
    color: var(--gray-700);
    cursor: default;
}

/* Action bar */
.action-bar {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.btn-primary {
    background: var(--teal-600);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--teal-900);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: white;
    color: var(--teal-600);
    border: 1px solid var(--teal-600);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--teal-50);
}

.btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.spinner::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Output panels */
.output-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-900);
    color: white;
}

.output-header .panel-label {
    color: rgba(255, 255, 255, 0.9);
}

.output-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cached-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.output-body {
    padding: var(--space-lg);
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-800);
    max-height: 500px;
    overflow-y: auto;
}

.output-body p {
    margin-bottom: var(--space-sm);
}

.output-body .output-code {
    background: var(--gray-900);
    color: var(--teal-100);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    overflow-x: auto;
    margin: var(--space-sm) 0;
}

.output-body .inline-code {
    background: var(--gray-100);
    color: var(--teal-900);
    padding: 1px 5px;
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 0.85em;
}

.output-body .output-list {
    padding-left: var(--space-lg);
    margin: var(--space-sm) 0;
}

.output-body .output-h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

.output-body .output-h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: var(--space-md);
    margin-bottom: var(--space-xs);
    color: var(--gray-800);
}

/* Comparison grid */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

@media (max-width: 768px) {
    .compare-grid {
        grid-template-columns: 1fr;
    }
}

/* Discussion & issues sections */
.discussion-section {
    background: var(--teal-50);
    border: 1px solid var(--teal-100);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.discussion-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--teal-900);
}

.discussion-section ul {
    list-style: disc;
    padding-left: var(--space-lg);
}

.discussion-section li {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

/* Step navigation */
.step-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--gray-200);
}

.spacer {
    flex: 1;
}

/* --- Sandbox --- */
.template-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.template-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-600);
}

.template-btn {
    background: white;
    border: 1px solid var(--gray-300);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--gray-700);
    transition: all 0.15s;
}

.template-btn:hover {
    border-color: var(--teal-500);
    color: var(--teal-900);
}

.template-clear {
    color: var(--gray-500);
    border-style: dashed;
}

/* History */
.history-section {
    margin-top: var(--space-xl);
}

.history-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-md);
}

.history-entry {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.history-entry:hover {
    border-color: var(--teal-500);
}

.history-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.history-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-family: var(--font-mono);
}

.history-model {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.history-preview {
    font-size: 0.8rem;
    color: var(--gray-600);
    font-family: var(--font-mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: var(--space-lg) var(--space-xl);
    color: var(--gray-500);
    font-size: 0.8rem;
    border-top: 1px solid var(--gray-200);
    background: white;
}

.footer-sep {
    margin: 0 var(--space-sm);
    opacity: 0.4;
}

/* --- Utility --- */
.bg-gray-50 {
    background: var(--gray-50);
}

.min-h-screen {
    min-height: 100vh;
}

/* --- Model Settings Panel --- */
.model-settings-panel {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.model-settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.model-settings-header:hover {
    background: var(--gray-200);
}

.model-settings-summary {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.model-settings-current {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal-900);
    background: var(--teal-50);
    padding: 2px 10px;
    border-radius: 999px;
}

.model-settings-temp {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-family: var(--font-mono);
}

.model-settings-toggle {
    font-size: 0.9rem;
    color: var(--gray-500);
    width: 20px;
    text-align: center;
}

.model-settings-body {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.setting-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.setting-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.setting-label.setting-disabled {
    font-weight: 400;
    color: var(--gray-400);
    font-style: italic;
    font-size: 0.75rem;
}

.setting-value {
    font-weight: 400;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--teal-600);
    background: var(--teal-50);
    padding: 0 6px;
    border-radius: 4px;
}

.setting-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--gray-900);
    background: white;
    cursor: pointer;
    appearance: auto;
}

.setting-select:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 2px rgba(16, 125, 172, 0.15);
}

.setting-select optgroup {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.setting-select option {
    font-weight: 400;
    padding: 4px;
}

.setting-range {
    width: 100%;
    height: 6px;
    appearance: none;
    background: var(--gray-200);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.setting-range::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--teal-600);
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.setting-range::-webkit-slider-thumb:hover {
    background: var(--teal-900);
}

.setting-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--teal-600);
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

/* Reasoning effort segmented control */
.effort-selector {
    display: flex;
    gap: 0;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.effort-btn {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    border: none;
    border-right: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    text-transform: capitalize;
    transition: all 0.15s;
}

.effort-btn:last-child {
    border-right: none;
}

.effort-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.effort-btn.effort-active {
    background: var(--teal-600);
    color: white;
    font-weight: 600;
}

/* --- Progress Bar --- */
.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-right: var(--space-sm);
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-partial {
    background: var(--amber-600);
}

.progress-done {
    background: var(--green-600);
}

/* Card border accents for progress */
.exercise-card.card-started {
    border-left: 3px solid var(--amber-600);
}

.exercise-card.card-completed {
    border-left: 3px solid var(--green-600);
}

/* Reset progress button */
.reset-progress-btn {
    background: none;
    border: none;
    color: var(--gray-500);
    font-family: var(--font-body);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    margin-top: var(--space-sm);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.reset-progress-btn:hover {
    color: var(--gray-700);
}

/* --- JSON Syntax Highlighting --- */
.output-body .output-json {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
}

.output-json code {
    font-family: inherit;
    font-size: inherit;
}

.json-key { color: var(--teal-100); }
.json-string { color: rgb(129, 199, 132); }
.json-number { color: var(--amber-600); }
.json-boolean { color: rgb(206, 147, 216); }
.json-null { color: var(--gray-500); }

/* --- Materials Page --- */

/* Filter chips */
.materials-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-chip {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: var(--space-xs) var(--space-md);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-chip:hover {
    border-color: var(--teal-500);
    color: var(--teal-900);
}

.filter-active {
    background: var(--teal-600) !important;
    color: white !important;
    border-color: var(--teal-600) !important;
}

/* Category sections */
.materials-category {
    margin-bottom: var(--space-2xl);
}

.category-heading {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--teal-500);
    display: inline-block;
}

/* Material cards */
.material-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s;
}

.material-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-500);
    transform: translateY(-2px);
}

.material-card .card-header {
    margin-bottom: var(--space-sm);
}

/* Type badges */
.material-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-slides {
    background: var(--teal-50);
    color: var(--teal-900);
}

.badge-workshop {
    background: var(--amber-100);
    color: rgb(180, 100, 0);
}

.badge-exercise {
    background: var(--green-100);
    color: rgb(27, 94, 32);
}

.badge-book {
    background: rgb(237, 231, 246);
    color: rgb(106, 27, 154);
}

.badge-assessment {
    background: var(--red-100);
    color: var(--red-600);
}

.badge-bonus {
    background: rgb(237, 231, 246);
    color: rgb(106, 27, 154);
}

/* --- PDF Viewer --- */
.pdf-viewer-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-sm);
}

.pdf-viewer-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}

.pdf-viewer-title h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--teal-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-viewer-actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.pdf-action-btn {
    display: inline-block;
    text-decoration: none;
    background: white;
    color: var(--teal-600);
    border: 1px solid var(--teal-600);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.pdf-action-btn:hover {
    background: var(--teal-50);
}

.pdf-action-btn-primary {
    background: var(--teal-600);
    color: white;
    border-color: var(--teal-600);
}

.pdf-action-btn-primary:hover {
    background: var(--teal-900);
    border-color: var(--teal-900);
}

.pdf-viewer-frame iframe {
    width: 100%;
    height: calc(100vh - 220px);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: white;
}

@media (max-width: 768px) {
    .pdf-viewer-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .pdf-viewer-actions {
        width: 100%;
    }

    .pdf-action-btn {
        flex: 1;
        text-align: center;
    }
}

/* --- Landing Page --- */

.landing-hero {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    margin-bottom: var(--space-xl);
}

.landing-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: var(--space-md);
    line-height: 1.3;
}

.landing-subtitle {
    color: var(--gray-600);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto var(--space-md);
}

.landing-byline {
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.landing-session-badge {
    display: inline-block;
    background: var(--teal-50);
    color: var(--teal-900);
    padding: var(--space-xs) var(--space-lg);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--teal-100);
}

.landing-instructors {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
    flex-wrap: wrap;
}

.landing-instructor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.instructor-role {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.instructor-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.instructor-email {
    font-size: 0.85rem;
    color: var(--teal-600);
    text-decoration: none;
}

.instructor-email:hover {
    color: var(--teal-900);
    text-decoration: underline;
}

.landing-section {
    margin-bottom: var(--space-2xl);
}

.landing-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--teal-900);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 3px solid var(--teal-500);
    display: inline-block;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.landing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.landing-card-icon {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.landing-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.landing-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

.landing-card-bonus {
    border-style: dashed;
    border-color: var(--gray-300);
}

.landing-bonus-tag {
    display: inline-block;
    background: rgb(237, 231, 246);
    color: rgb(106, 27, 154);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    margin-left: var(--space-xs);
}

.landing-card-link {
    cursor: pointer;
    transition: all 0.2s;
}

.landing-card-link:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--teal-500);
    transform: translateY(-2px);
}

/* Schedule */
.schedule-container {
    margin-bottom: var(--space-xl);
}

.schedule-day {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--teal-900);
    padding: var(--space-sm) var(--space-md);
    border-left: 4px solid var(--teal-600);
    margin-bottom: var(--space-md);
    background: var(--teal-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.schedule-tz {
    font-weight: 400;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-left: var(--space-sm);
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.schedule-table th {
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-100);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--gray-200);
}

.schedule-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.9rem;
    color: var(--gray-800);
    border-bottom: 1px solid var(--gray-100);
}

.schedule-table tr:last-child td {
    border-bottom: none;
}

.schedule-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}

.schedule-day-bonus {
    border-left-color: rgb(106, 27, 154);
    background: rgb(237, 231, 246);
}

.schedule-bonus-note {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-style: italic;
    margin-bottom: var(--space-md);
}

.schedule-break td {
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-100) !important;
}

@media (max-width: 768px) {
    .landing-title {
        font-size: 1.5rem;
    }

    .landing-grid {
        grid-template-columns: 1fr;
    }

    .schedule-tz {
        display: block;
        margin-left: 0;
        margin-top: var(--space-xs);
    }
}

/* --- Timer --- */

.local-clock {
    display: inline-block;
    margin-left: var(--space-md);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    vertical-align: middle;
}

.clock-sep {
    color: var(--gray-400);
    margin: 0 2px;
}

.timer-notify-btn {
    display: inline-block;
    margin-left: var(--space-md);
    background: white;
    color: var(--teal-600);
    border: 1px solid var(--teal-600);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s;
}

.timer-notify-btn:hover {
    background: var(--teal-50);
}

.timer-notify-status {
    display: inline-block;
    margin-left: var(--space-md);
    font-size: 0.8rem;
    color: var(--green-600);
    font-weight: 500;
    vertical-align: middle;
}

.schedule-timer {
    white-space: nowrap;
    text-align: center;
    width: 110px;
}

.timer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--teal-600);
    background: white;
    color: var(--teal-600);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    vertical-align: middle;
    padding: 0;
    line-height: 1;
    text-align: center;
}

.timer-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.timer-btn:hover {
    background: var(--teal-50);
}

.timer-btn-running {
    background: var(--teal-600);
    color: white;
    animation: timer-pulse 1.5s ease-in-out infinite;
}

.timer-btn-running:hover {
    background: var(--teal-900);
}

.timer-btn-expired {
    background: var(--red-600);
    border-color: var(--red-600);
    color: white;
    animation: none;
}

.timer-btn-expired:hover {
    opacity: 0.85;
}

.timer-display {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    min-width: 3.5rem;
    text-align: left;
    margin-left: var(--space-xs);
    vertical-align: middle;
    color: var(--gray-800);
}

.timer-expired {
    color: var(--red-600);
    font-weight: 700;
}

@keyframes timer-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 125, 172, 0.4); }
    50% { box-shadow: 0 0 0 4px rgba(16, 125, 172, 0); }
}

/* "You are here" row highlight */
.schedule-now {
    background: rgba(16, 125, 172, 0.08) !important;
    border-left: 3px solid var(--teal-600);
}

.schedule-now td:first-child {
    position: relative;
}

.schedule-now td:first-child::before {
    content: '\25B8';
    color: var(--teal-600);
    font-weight: 700;
    margin-right: 4px;
}

/* Ahead/behind delta badge */
.timer-delta {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: var(--space-xs);
    vertical-align: middle;
}

.timer-ahead {
    background: var(--green-100);
    color: var(--green-600);
}

.timer-behind {
    background: var(--red-100);
    color: var(--red-600);
}

/* Transitions for Alpine.js */
[x-cloak] { display: none !important; }

/* --- Prompt Improver --- */

.btn-improve {
    background: linear-gradient(135deg, rgb(106, 27, 154), rgb(156, 39, 176));
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-improve:hover:not(:disabled) {
    background: linear-gradient(135deg, rgb(74, 20, 110), rgb(126, 30, 146));
}

.btn-improve:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner-improve::before {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

/* Improve panel */
.improve-panel {
    background: white;
    border: 2px solid rgb(206, 147, 216);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.improve-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, rgb(106, 27, 154), rgb(156, 39, 176));
    color: white;
}

.improve-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.improve-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.improve-model-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.improve-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 var(--space-xs);
    line-height: 1;
    transition: color 0.15s;
}

.improve-close:hover {
    color: white;
}

/* Maturity section */
.maturity-section {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.maturity-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.maturity-heading, .blocks-heading, .improved-heading, .improve-summary-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.maturity-level-badge {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}

.maturity-l1 { background: var(--red-100); color: var(--red-600); }
.maturity-l2 { background: var(--amber-100); color: rgb(180, 100, 0); }
.maturity-l3 { background: var(--teal-50); color: var(--teal-900); }
.maturity-l4 { background: var(--green-100); color: var(--green-600); }

/* Maturity bar */
.maturity-bar {
    display: flex;
    gap: 3px;
    margin-bottom: var(--space-md);
}

.maturity-seg {
    flex: 1;
    padding: var(--space-sm) var(--space-xs);
    border-radius: var(--radius-sm);
    text-align: center;
    background: var(--gray-100);
    color: var(--gray-400);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.maturity-seg-num {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
}

.maturity-seg-name {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 1px;
}

.maturity-seg-reached.maturity-seg-l1 { background: var(--red-100); color: var(--red-600); }
.maturity-seg-reached.maturity-seg-l2 { background: var(--amber-100); color: rgb(180, 100, 0); }
.maturity-seg-reached.maturity-seg-l3 { background: var(--teal-50); color: var(--teal-900); }
.maturity-seg-reached.maturity-seg-l4 { background: var(--green-100); color: var(--green-600); }

.maturity-seg-current {
    border-color: currentColor;
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.maturity-explanation {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Building blocks section */
.blocks-section {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.blocks-heading {
    display: block;
    margin-bottom: var(--space-md);
}

.blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

.block-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: border-color 0.2s;
}

.block-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.block-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-900);
}

.block-score-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.block-badge-0 { background: var(--red-100); color: var(--red-600); }
.block-badge-1 { background: var(--amber-100); color: rgb(180, 100, 0); }
.block-badge-2 { background: var(--teal-50); color: var(--teal-900); }
.block-badge-3 { background: var(--green-100); color: var(--green-600); }

.block-score-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: var(--space-sm);
}

.block-score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.block-score-0 .block-score-fill { background: var(--red-600); }
.block-score-1 .block-score-fill { background: var(--amber-600); }
.block-score-2 .block-score-fill { background: var(--teal-500); }
.block-score-3 .block-score-fill { background: var(--green-600); }

.block-score-0 { border-left: 3px solid var(--red-600); }
.block-score-1 { border-left: 3px solid var(--amber-600); }
.block-score-2 { border-left: 3px solid var(--teal-500); }
.block-score-3 { border-left: 3px solid var(--green-600); }

.block-assessment {
    font-size: 0.8rem;
    color: var(--gray-700);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.block-recommendation {
    font-size: 0.8rem;
    color: var(--teal-900);
    line-height: 1.4;
    font-style: italic;
}

.block-recommendation::before {
    content: '\2192 ';
    font-style: normal;
    font-weight: 700;
}

/* Improved prompt section */
.improved-section {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--gray-200);
}

.improved-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.btn-accept {
    font-size: 0.8rem;
    padding: var(--space-xs) var(--space-md);
}

.improved-prompt-box {
    background: var(--gray-900);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.improved-prompt-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--teal-100);
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

/* Summary section */
.improve-summary {
    padding: var(--space-lg);
}

.improve-summary-heading {
    display: block;
    margin-bottom: var(--space-sm);
}

.improve-summary-text {
    color: var(--gray-700);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .blocks-grid {
        grid-template-columns: 1fr;
    }

    .maturity-seg-name {
        display: none;
    }

    .improved-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
}

/* --- Data Generator --- */

.generator-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: var(--space-xl);
    align-items: start;
}

@media (max-width: 900px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }
}

.generator-config {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.generator-section {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.generator-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.generator-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
}

.generator-section-header .generator-label {
    margin-bottom: 0;
}

.generator-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
    line-height: 1.4;
}

.generator-task-editor {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
}

.btn-add-seed {
    background: none;
    border: 1px dashed var(--teal-500);
    color: var(--teal-600);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-add-seed:hover {
    background: var(--teal-50);
    border-color: var(--teal-600);
}

.seed-examples-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.seed-example-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
}

.seed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.seed-card-num {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--gray-500);
    font-family: var(--font-mono);
}

.seed-remove-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.15s;
}

.seed-remove-btn:hover {
    color: var(--red-600);
}

.seed-fields {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.seed-field-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.seed-textarea {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.4;
    resize: vertical;
    color: var(--gray-900);
    background: white;
}

.seed-textarea:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 2px rgba(16, 125, 172, 0.15);
}

.generator-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.generator-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-generate {
    flex: 1;
    background: linear-gradient(135deg, rgb(106, 27, 154), rgb(156, 39, 176));
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-generate:hover:not(:disabled) {
    background: linear-gradient(135deg, rgb(74, 20, 110), rgb(126, 30, 146));
}

.btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Generator results panel */
.generator-results {
    min-height: 400px;
}

.generator-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-2xl);
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    min-height: 400px;
}

.generator-empty-icon {
    margin-bottom: var(--space-md);
    color: var(--teal-500);
}

.generator-empty h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.generator-empty p {
    color: var(--gray-500);
    font-size: 0.9rem;
    max-width: 320px;
}

.generator-error {
    background: var(--red-100);
    border: 1px solid var(--red-600);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--red-600);
    font-size: 0.9rem;
}

.generator-results-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.generator-results-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.generator-bulk-actions {
    display: flex;
    gap: var(--space-xs);
    margin-left: auto;
}

.btn-bulk {
    background: white;
    border: 1px solid var(--gray-300);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-bulk-accept {
    color: var(--green-600);
    border-color: var(--green-600);
}

.btn-bulk-accept:hover {
    background: var(--green-100);
}

.btn-bulk-clear {
    color: var(--gray-600);
}

.btn-bulk-clear:hover {
    background: var(--gray-100);
}

.generator-results-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.generator-accepted-count {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--green-600);
    background: var(--green-100);
    padding: 2px 10px;
    border-radius: 999px;
}

/* Example result cards */
.example-result-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s;
}

.example-result-card.example-accepted {
    border-color: var(--green-600);
    border-left: 4px solid var(--green-600);
}

.example-result-card.example-rejected {
    border-color: var(--gray-300);
    opacity: 0.5;
}

.example-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.variation-badge {
    display: inline-block;
    background: var(--teal-50);
    color: var(--teal-900);
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}

.example-quality {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quality-bar {
    width: 80px;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.quality-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.quality-bar-fill.quality-excellent { background: var(--teal-600); }
.quality-bar-fill.quality-high { background: var(--green-600); }
.quality-bar-fill.quality-medium { background: var(--amber-600); }
.quality-bar-fill.quality-low { background: var(--red-600); }

.quality-label {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.quality-label.quality-excellent { color: var(--teal-600); }
.quality-label.quality-high { color: var(--green-600); }
.quality-label.quality-medium { color: rgb(180, 100, 0); }
.quality-label.quality-low { color: var(--red-600); }

.example-result-body {
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.example-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.example-field-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.example-field-text {
    font-size: 0.85rem;
    color: var(--gray-800);
    line-height: 1.5;
    background: var(--gray-50);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.example-result-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.example-reasoning-text {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
    margin-top: var(--space-xs);
}

.example-actions {
    display: flex;
    gap: var(--space-xs);
}

.example-btn {
    background: white;
    border: 1px solid var(--gray-300);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.example-btn-accept:hover,
.example-btn-accept.example-btn-active {
    background: var(--green-100);
    border-color: var(--green-600);
    color: var(--green-600);
}

.example-btn-reject:hover,
.example-btn-reject.example-btn-active {
    background: var(--red-100);
    border-color: var(--red-600);
    color: var(--red-600);
}

/* Export bar */
.export-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    box-shadow: var(--shadow-sm);
}

.export-bar-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.export-bar-actions {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.export-format-select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    appearance: auto;
}

.export-format-select:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 2px rgba(16, 125, 172, 0.15);
}

/* Export preview */
.export-preview {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-top: var(--space-md);
    overflow: hidden;
}

.export-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--gray-900);
    border-bottom: 1px solid var(--gray-200);
}

.export-preview-header .panel-label {
    color: rgba(255, 255, 255, 0.9);
}

.export-preview-format {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--teal-100);
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.export-preview-code {
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-50);
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    margin: 0;
    user-select: all;
}

@media (max-width: 768px) {
    .export-bar {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .export-bar-actions {
        width: 100%;
    }

    .export-bar-actions .btn-secondary,
    .export-bar-actions .btn-primary {
        flex: 1;
        text-align: center;
    }

    .example-result-footer {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .example-actions {
        width: 100%;
    }

    .example-btn {
        flex: 1;
        text-align: center;
    }
}
