/**
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║                    SciQuest.io - Room Styles                              ║
 * ╠═══════════════════════════════════════════════════════════════════════════╣
 * ║  Stili za učne sobe (rooms) po vzoru TryHackMe                            ║
 * ║  Collapsible kartice s taski                                              ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 *
 * STRUKTURA:
 * 1. Room Layout
 * 2. Room Header
 * 3. Room Sidebar
 * 4. Room Content
 * 5. Task Cards (Collapsible)
 * 6. Task Types (intro, quiz, lab, sim, ctf, nobel)
 * 7. Quiz Elements
 * 8. CTF Input
 * 9. Progress & XP
 * 10. Responsive
 */


/* ═══════════════════════════════════════════════════════════════════════════
   1. ROOM LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.room-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 100px; /* Prostor za fixed nav - enako kot ostale strani */
}

.room-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}


/* ═══════════════════════════════════════════════════════════════════════════
   2. ROOM HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.room-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 24px;
}

.room-header-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

/* Ikona tipa sobe */
.room-type-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.room-header-info {
    flex: 1;
    min-width: 0;
}

/* Breadcrumb navigacija */
.room-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.room-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.room-breadcrumb a:hover {
    color: var(--accent);
}

.room-breadcrumb .separator {
    color: var(--text-muted);
}

/* Naslov sobe */
.room-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

/* Koncept */
.room-concept {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Meta info (XP, težavnost, čas) */
.room-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.room-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.room-meta-item .icon {
    font-size: 1rem;
}

/* Težavnost barve */
.room-meta-item.difficulty-easy { border-color: #22c55e; color: #22c55e; }
.room-meta-item.difficulty-medium { border-color: #f59e0b; color: #f59e0b; }
.room-meta-item.difficulty-hard { border-color: #ef4444; color: #ef4444; }


/* ═══════════════════════════════════════════════════════════════════════════
   3. ROOM SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */

.room-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}

/* Sidebar naslov */
.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

/* Seznam taskov v sidebaru */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.task-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.task-list-item:hover {
    background: var(--bg-tertiary);
}

.task-list-item.active {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
    margin-left: -3px;
}

/* Status ikone */
.task-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.task-status.locked {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    color: var(--text-muted);
}

.task-status.available {
    background: var(--bg-tertiary);
    border: 2px solid var(--accent);
    color: var(--accent);
}

.task-status.completed {
    background: var(--accent);
    color: var(--bg-primary);
}

/* Task info */
.task-list-info {
    flex: 1;
    min-width: 0;
}

.task-list-title {
    font-size: 0.9rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-list-item.locked .task-list-title {
    color: var(--text-muted);
}

.task-list-type {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Progress v sidebaru */
.sidebar-progress {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

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

/* XP v sidebaru */
.sidebar-xp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-weight: 600;
}

/* Navigacija med sobami (← / →) */
.sidebar-nav {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.sidebar-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-nav-btn img {
    display: block;
    transition: transform 0.2s ease;
}

.sidebar-nav-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
}

.sidebar-nav-btn:hover img {
    transform: scale(1.15);
}


/* ═══════════════════════════════════════════════════════════════════════════
   4. ROOM CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.room-content {
    padding: 24px;
    max-width: 900px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   5. TASK CARDS (COLLAPSIBLE)
   ═══════════════════════════════════════════════════════════════════════════ */

.task-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.task-card:hover {
    border-color: var(--text-muted);
}

.task-card.active {
    border-color: var(--accent);
}

/* Dokončana kartica - zelena obroba in subtilen glow */
.task-card.completed {
    border-color: var(--accent);
    border-width: 2px;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}

/* Animacija ob dokončanju */
@keyframes taskComplete {
    0% {
        box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    }
    50% {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
    }
    100% {
        box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
    }
}

.task-card.just-completed {
    animation: taskComplete 0.6s ease-out;
}

/* Locked - ODSTRANJENO: kartice znotraj sobe so vedno dostopne */
/* .task-card.locked - ne uporabljamo več */

/* Task header (klikljiv za collapse) */
.task-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background var(--transition-fast);
}

.task-header:hover {
    background: var(--bg-tertiary);
}

/* Številka taska */
.task-number {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.task-card.completed .task-number {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-primary);
}

.task-card.completed .task-number::after {
    content: '✓';
}

.task-card.completed .task-number span {
    display: none;
}

/* Task naslov in tip */
.task-header-info {
    flex: 1;
    min-width: 0;
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px 0;
}

.task-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Collapse puščica */
.task-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.task-card.open .task-toggle {
    transform: rotate(180deg);
}

/* Task vsebina (collapsible) */
.task-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.task-card.open .task-body {
    max-height: 2000px; /* Dovolj visoko za vso vsebino */
}

.task-content {
    padding: 0 20px 20px 20px;
    border-top: 1px solid var(--border);
}

/* Tekst vsebina */
.task-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.task-text p {
    margin: 16px 0;
}

.task-text p:first-child {
    margin-top: 16px;
}

.task-text strong {
    color: var(--text);
}

.task-text code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent);
}

/* Etimologija box */
.etymology-box {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--accent);
    padding: 16px;
    margin: 16px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.etymology-box h4 {
    font-size: 0.85rem;
    color: var(--accent);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.etymology-item {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.etymology-item:last-child {
    margin-bottom: 0;
}

.etymology-term {
    font-weight: 600;
    color: var(--text);
}

.etymology-origin {
    color: var(--text-muted);
}


/* ═══════════════════════════════════════════════════════════════════════════
   6. TASK TYPES (intro, quiz, lab, sim, ctf, nobel)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Barve tipov */
.task-type-intro { --task-color: #3b82f6; }
.task-type-quiz { --task-color: #8b5cf6; }
.task-type-lab { --task-color: #22c55e; }
.task-type-sim { --task-color: #06b6d4; }
.task-type-ctf { --task-color: #f59e0b; }
.task-type-nobel { --task-color: #eab308; }

.task-card[data-type="intro"] .task-number { border-color: #3b82f6; }
.task-card[data-type="quiz"] .task-number { border-color: #8b5cf6; }
.task-card[data-type="lab"] .task-number { border-color: #22c55e; }
.task-card[data-type="sim"] .task-number { border-color: #06b6d4; }
.task-card[data-type="ctf"] .task-number { border-color: #f59e0b; }
.task-card[data-type="nobel"] .task-number { border-color: #eab308; }


/* ═══════════════════════════════════════════════════════════════════════════
   7. QUIZ ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.quiz-question {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 16px 0;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quiz-option:hover {
    border-color: var(--text-muted);
}

.quiz-option.selected {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.1);
}

.quiz-option.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.quiz-option.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.quiz-option-marker {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.quiz-option.selected .quiz-option-marker {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--bg-primary);
}

.quiz-option-text {
    flex: 1;
    color: var(--text-secondary);
}

.quiz-option.selected .quiz-option-text {
    color: var(--text);
}

/* Quiz feedback */
.quiz-feedback {
    display: none;
    padding: 16px;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.quiz-feedback.incorrect {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7b. FILL-IN VPRAŠANJA (PIN stil input)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container za vprašanja znotraj kartice */
.integrated-questions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.questions-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

/* Posamezno vprašanje */
.fill-question {
    margin-bottom: 24px;
}

.fill-question:last-child {
    margin-bottom: 0;
}

.fill-question-text {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.5;
}

/* Container za besede (skupine polj) */
.fill-answer {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

/* Skupina polj za eno besedo */
.fill-word {
    display: flex;
    gap: 4px;
}

/* Posamezno polje (ena črka) */
.fill-char {
    width: 36px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    caret-color: var(--accent);
}

.fill-char:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Pravilno izpolnjeno polje */
.fill-char.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Napačno izpolnjeno polje */
.fill-char.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Shake animacija za napačne odgovore */
.fill-question.shake .fill-char {
    animation: shake 0.5s ease-in-out;
}

/* Pravilna beseda - vsa polja */
.fill-word.correct .fill-char {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

/* Zaklenjeno polje (po Enter) */
.fill-char:disabled {
    cursor: not-allowed;
    opacity: 0.9;
}

.fill-char:disabled.correct,
.fill-word.correct .fill-char:disabled {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

/* Feedback za vprašanje */
.fill-feedback {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.fill-feedback.show {
    display: block;
}

.fill-feedback.correct {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.fill-feedback.incorrect {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Hint za fill vprašanja */
.fill-hint-wrapper {
    margin-top: 8px;
}

.fill-hint-btn {
    background: none;
    border: 1px solid rgba(255, 213, 79, 0.3);
    color: #ffd54f;
    padding: 4px 12px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.fill-hint-btn:hover {
    background: rgba(255, 213, 79, 0.1);
    border-color: rgba(255, 213, 79, 0.5);
}

.fill-hint-text {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(255, 213, 79, 0.08);
    border-left: 3px solid rgba(255, 213, 79, 0.4);
    border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0;
    font-size: 0.85rem;
    color: #ffd54f;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 480px) {
    .fill-char {
        width: 32px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .fill-word {
        gap: 3px;
    }
    
    .fill-answer {
        gap: 12px;
    }
}


/* ═══════════════════════════════════════════════════════════════════════════
   8. CTF INPUT
   ═══════════════════════════════════════════════════════════════════════════ */

.ctf-container {
    margin: 16px 0;
}

.ctf-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.ctf-input-group {
    display: flex;
    gap: 8px;
}

.ctf-input {
    flex: 1;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.ctf-input:focus {
    outline: none;
    border-color: var(--accent);
}

.ctf-input.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

.ctf-input.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

.ctf-submit {
    padding: 12px 24px;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Play', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ctf-submit:hover {
    background: var(--accent-dim);
}

/* Hint sistem */
.ctf-hints {
    margin-top: 16px;
}

.ctf-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ctf-hint-btn:hover {
    border-color: var(--warning);
    color: var(--warning);
}

.ctf-hint-text {
    display: none;
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    color: var(--warning);
    font-size: 0.9rem;
}

.ctf-hint-text.show {
    display: block;
}


/* ═══════════════════════════════════════════════════════════════════════════
   9. PROGRESS & XP
   ═══════════════════════════════════════════════════════════════════════════ */

/* XP earned animacija */
.xp-earned {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-weight: 600;
    margin-top: 16px;
    animation: xpPulse 0.5s ease;
}

.xp-earned.show {
    display: flex;
}

@keyframes xpPulse {
    0% { transform: scale(0.9); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Completion modal */
.room-complete-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.room-complete-overlay.show {
    display: flex;
}

.room-complete-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    animation: modalSlide 0.3s ease;
}

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

.room-complete-icon {
    font-size: 4rem;
    margin-bottom: 16px;
}

.room-complete-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.room-complete-xp {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 24px;
}

.room-complete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}


/* ═══════════════════════════════════════════════════════════════════════════
   10. RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .room-layout {
        grid-template-columns: 240px 1fr;
    }
    
    .room-header-inner {
        flex-wrap: wrap;
    }
    
    .room-meta {
        width: 100%;
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .room-layout {
        grid-template-columns: 1fr;
    }
    
    .room-sidebar {
        position: fixed;
        left: -280px;
        top: 64px;
        width: 280px;
        height: calc(100vh - 64px);
        z-index: 100;
        transition: left 0.3s ease;
        border-right: 1px solid var(--border);
    }
    
    .room-sidebar.open {
        left: 0;
    }
    
    /* Sidebar toggle button za mobile */
    .sidebar-toggle {
        display: flex;
        position: fixed;
        bottom: 24px;
        left: 24px;
        width: 56px;
        height: 56px;
        background: var(--accent);
        color: var(--bg-primary);
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 99;
        box-shadow: 0 4px 20px var(--accent-glow);
    }
    
    .room-content {
        padding: 16px;
    }
    
    .room-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .room-type-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .room-title {
        font-size: 1.25rem;
    }
    
    .room-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* Desktop: skrij sidebar toggle */
@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ORDERING - Drag & Drop razvrščanje
   ═══════════════════════════════════════════════════════════════════════════ */

.ordering-container {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.ordering-instruction {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 500;
}

.ordering-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.ordering-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: grab;
    transition: all var(--transition-fast);
    user-select: none;
}

.ordering-item:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
}

.ordering-item:active,
.ordering-item.dragging {
    cursor: grabbing;
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.ordering-item.drag-over {
    border-color: var(--accent);
    border-style: dashed;
    background: rgba(34, 197, 94, 0.1);
}

.ordering-handle {
    color: var(--text-muted);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.ordering-text {
    flex: 1;
    font-size: 1rem;
    color: var(--text);
}

.ordering-item.correct {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.ordering-item.correct .ordering-text {
    color: #22c55e;
}

.ordering-item.correct .ordering-handle {
    color: #22c55e;
}

.ordering-item.incorrect {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.ordering-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ordering-actions .btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.ordering-actions .btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.ordering-actions .btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.ordering-actions .btn-primary {
    background: var(--accent);
    border: none;
    color: #000;
}

.ordering-actions .btn-primary:hover {
    background: var(--accent-hover);
}

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

.ordering-feedback {
    display: none;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
}

.ordering-feedback.show {
    display: block;
}

.ordering-feedback.correct {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.ordering-feedback.incorrect {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Mobile: večje touch targets */
@media (max-width: 768px) {
    .ordering-item {
        padding: 16px;
    }
    
    .ordering-handle {
        font-size: 1.4rem;
    }
    
    .ordering-actions {
        flex-direction: column;
    }
    
    .ordering-actions .btn {
        width: 100%;
        padding: 14px 20px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SLIKE V VSEBINI TASKOV - [img:N] placeholder sistem
   ═══════════════════════════════════════════════════════════════════════════ */

.content-image {
    margin: 20px 0;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.content-image img:hover {
    transform: scale(1.02);
}

.content-image figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-style: italic;
}

/* Manjša slika */
.content-image.small img {
    max-height: 200px;
}

/* Levo poravnana slika s tekstom ob strani */
.content-image.left {
    float: left;
    margin: 0 20px 16px 0;
    max-width: 45%;
}

/* Desno poravnana slika s tekstom ob strani */
.content-image.right {
    float: right;
    margin: 0 0 16px 20px;
    max-width: 45%;
}

/* Čiščenje float-ov */
.task-text::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive */
@media (max-width: 768px) {
    .content-image img {
        max-height: 250px;
    }
    
    .content-image.left,
    .content-image.right {
        float: none;
        max-width: 100%;
        margin: 20px 0;
    }
}

/* Klikljiva slika z linkom */
.content-image a {
    display: block;
}

.content-image a img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-image a:hover img {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.content-image a::after {
    content: "🔗";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.content-image {
    position: relative;
}

.content-image a:hover::after {
    opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMAGE SOURCE - Vir slike (etično navajanje)
   ═══════════════════════════════════════════════════════════════════════════ */

.image-source {
    font-size: 0.75rem;
    color: var(--text-muted, #6b7280);
    font-style: italic;
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO EMBED - YouTube in drugi videi [video:N] placeholder sistem
   ═══════════════════════════════════════════════════════════════════════════ */

/* Video figura - enako kot content-image */
.content-video {
    margin: 24px 0;
    text-align: center;
    position: relative;
}

/* Responsive video wrapper - 16:9 aspect ratio */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-tertiary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Video caption */
.content-video figcaption {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
}

.video-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIDEO RESPONSIVE PRILAGODITVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .content-video {
        margin: 16px -16px; /* Raztegni do robov na mobilnih */
    }
    
    .video-wrapper {
        border-radius: 0;
        max-width: none;
    }
    
    .video-wrapper iframe {
        border-radius: 0;
    }
    
    .content-video figcaption {
        padding: 0 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ESTIMATION - Fermi ocene z logaritemskim sliderjem
   ═══════════════════════════════════════════════════════════════════════════ */

.estimation-container {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.estimation-container.answered {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.05);
}

.estimation-challenge {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 24px;
    font-weight: 500;
    text-align: center;
}

/* Slider container */
.estimation-slider-container {
    margin: 20px 0 30px 0;
    padding: 0 10px;
}

/* Custom slider styling */
.estimation-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.estimation-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.estimation-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.5);
}

.estimation-slider::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.15);
}

.estimation-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 50%;
    cursor: grab;
    border: none;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

.estimation-slider:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.estimation-slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
    background: var(--accent);
}

/* Labels pod sliderjem */
.estimation-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0 4px;
}

.estimation-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    transition: all 0.2s ease;
    padding: 4px 6px;
    border-radius: 4px;
    min-width: 36px;
}

.estimation-label.active {
    color: var(--accent);
    font-weight: 600;
    background: rgba(34, 197, 94, 0.15);
}

.estimation-label.correct-range {
    color: var(--accent);
    background: rgba(34, 197, 94, 0.2);
    font-weight: 600;
}

/* Prikaz trenutne vrednosti */
.estimation-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.estimation-prefix {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.estimation-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono, monospace);
}

/* Confirm button */
.estimation-confirm {
    display: block;
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.estimation-confirm:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.estimation-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Feedback */
.estimation-feedback {
    display: none;
    margin-top: 20px;
    padding: 20px;
    border-radius: var(--radius-sm);
    text-align: center;
}

.estimation-feedback.show {
    display: block;
}

.estimation-feedback.correct {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.estimation-feedback.incorrect {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Result po uspešni rešitvi */
.estimation-result {
    text-align: left;
}

.estimation-correct-icon {
    font-size: 2rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 12px;
}

.estimation-exact {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-sm);
    text-align: center;
}

.estimation-explanation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.estimation-hint {
    color: #f59e0b;
    font-weight: 500;
}

/* Shake animacija za napačen odgovor */
.estimation-container.shake {
    animation: shake 0.5s ease-in-out;
}

/* Responsive */
@media (max-width: 768px) {
    .estimation-container {
        padding: 16px;
    }
    
    .estimation-labels {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .estimation-label {
        font-size: 0.65rem;
        min-width: 30px;
        padding: 3px 4px;
    }
    
    .estimation-value {
        font-size: 1.25rem;
    }
    
    .estimation-slider::-webkit-slider-thumb {
        width: 32px;
        height: 32px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   READ CONFIRMATION - "Sem prebral" gumb za text taske brez vprašanj
   ═══════════════════════════════════════════════════════════════════════════ */

.read-confirmation {
    margin-top: 24px;
    text-align: center;
}

.read-confirm-btn {
    padding: 12px 32px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.read-confirm-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(34, 197, 94, 0.1);
}

.read-confirm-btn:disabled {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(34, 197, 94, 0.15);
    cursor: default;
}

.read-confirmation.confirmed .read-confirm-btn {
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABELE IN FORMULE - za dimenzijsko analizo in podobno
   ═══════════════════════════════════════════════════════════════════════════ */

/* Styled tabela */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
}

.styled-table th,
.styled-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.styled-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text);
}

.styled-table tr:hover {
    background: rgba(34, 197, 94, 0.05);
}

.styled-table td:last-child {
    font-family: var(--font-mono, monospace);
    color: var(--accent);
}

/* Equation options za multiple choice */
.equation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.equation-option {
    padding: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.equation-option:hover {
    border-color: var(--accent);
    background: rgba(34, 197, 94, 0.05);
}

.equation-option strong {
    font-size: 1.1rem;
}

/* Formula box za izpostavljene formule */
.formula-box {
    text-align: center;
    padding: 24px;
    margin: 20px 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
}

.formula-box .formula {
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-mono, monospace);
    color: var(--text);
}

/* Flag box za CTF navodila */
.flag-box {
    margin-top: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.05));
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.flag-box code {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Text muted helper */
.text-muted {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Responsive */
@media (max-width: 768px) {
    .equation-options {
        grid-template-columns: 1fr;
    }
    
    .formula-box .formula {
        font-size: 1.2rem;
    }
    
    .styled-table {
        font-size: 0.85rem;
    }
    
    .styled-table th,
    .styled-table td {
        padding: 8px 10px;
    }
}
/**
 * ╔═══════════════════════════════════════════════════════════════════════════╗
 * ║           SciQuest — Interactive Components CSS (interactive.css)         ║
 * ╠═══════════════════════════════════════════════════════════════════════════╣
 * ║  Stili za vse interaktivne komponente:                                   ║
 * ║  molecule-builder, circuit-sim, cell-explorer, lemonade-stand            ║
 * ║  Prefiks: ix- (interactive experience)                                   ║
 * ╚═══════════════════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════════════════════════════════════════════════════
   SKUPNO — dokončano stanje, izzivi, kontrole
   ═══════════════════════════════════════════════════════════════════════════ */

.interactive-container { margin-top: 16px; }
.interactive-loading { text-align: center; padding: 40px; font-size: 1.5rem; }

.interactive-completed {
    text-align: center;
    padding: 32px;
    background: rgba(34, 197, 94, 0.05);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 12px;
}
.interactive-completed-icon { font-size: 2.5rem; margin-bottom: 8px; }
.interactive-completed-text { color: #22c55e; font-weight: 700; }

/* Izzivi — skupna kartica za vse komponente */
.ix-challenges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.ix-challenge-card {
    padding: 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
}
.ix-challenge-card.solved {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.05);
}
.ix-challenge-formula { font-size: 1.2rem; font-weight: 700; margin-bottom: 2px; }
.ix-challenge-formula sub { font-size: 0.65em; }
.ix-challenge-name { font-size: 0.8rem; color: var(--text-secondary, #94a3b8); }
.ix-challenge-check { font-size: 1rem; margin-top: 4px; }

/* Kontrole */
.ix-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   1. MOLECULE BUILDER
   ═══════════════════════════════════════════════════════════════════════════ */

.ix-atoms-palette {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.ix-atom-col { display: flex; flex-direction: column; align-items: center; }
.ix-atom-label { font-size: 0.7rem; color: var(--text-secondary, #94a3b8); margin-top: 4px; }

/* Atomi — izvor in workspace */
.ix-atom-source, .ix-atom {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700; color: #fff;
    cursor: grab; user-select: none;
    transition: transform 0.15s;
}
.ix-atom-source:hover, .ix-atom:hover { transform: scale(1.1); }
.ix-atom-source:active { cursor: grabbing; }

/* Barve atomov - CPK konvencija (Corey-Pauling-Koltun) */
/* H = bel in manjši (realistično razmerje velikosti) */
.ix-atom-H { 
    background: radial-gradient(circle at 35% 35%, #ffffff, #d1d5db); 
    box-shadow: 0 0 15px rgba(255,255,255,0.3); 
    color: #1f2937;  /* Temna barva teksta za kontrast */
    width: 40px; height: 40px; font-size: 0.85rem;
}
.ix-atom-O { background: radial-gradient(circle at 35% 35%, #f87171, #dc2626); box-shadow: 0 0 15px rgba(220,38,38,0.4); }
.ix-atom-C { background: radial-gradient(circle at 35% 35%, #a1a1aa, #52525b); box-shadow: 0 0 15px rgba(82,82,91,0.4); }
.ix-atom-N { background: radial-gradient(circle at 35% 35%, #a78bfa, #7c3aed); box-shadow: 0 0 15px rgba(124,58,237,0.4); }

/* Workspace */
.ix-workspace {
    position: relative;
    height: 240px;
    background: rgba(15, 23, 42, 0.5);
    border: 2px dashed rgba(255,255,255,0.08);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    transition: border-color 0.3s;
}
.ix-workspace.drag-over {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.03);
}
.ix-workspace-hint { color: var(--text-muted, #475569); font-size: 0.9rem; pointer-events: none; }
.ix-workspace .ix-atom { position: absolute; z-index: 10; }
.ix-workspace .ix-atom.dragging { opacity: 0.8; transform: scale(1.1); }
.ix-workspace .ix-atom.snapped { animation: snap-pulse 0.2s ease-out; }
.ix-workspace .ix-atom.disconnected { animation: disconnect-shake 0.3s ease-in-out 2; box-shadow: 0 0 20px rgba(239, 68, 68, 0.8) !important; }
@keyframes snap-pulse {
    0% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
@keyframes disconnect-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Formula prikaz */
.ix-formula-display { text-align: center; margin-top: 16px; min-height: 60px; }
.ix-formula-text { font-size: 2rem; font-weight: 700; letter-spacing: 2px; }
.ix-formula-text sub { font-size: 0.6em; }
.ix-formula-name { font-size: 1rem; color: #22c55e; margin-top: 4px; }
.ix-formula-error { color: #f87171; font-size: 0.85rem; margin-top: 4px; }


/* ═══════════════════════════════════════════════════════════════════════════
   2. CIRCUIT SIM
   ═══════════════════════════════════════════════════════════════════════════ */

.ix-circuit-board {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
}
.ix-circuit-svg { width: 100%; height: auto; display: block; }

/* Žice */
.ix-wire { stroke: #475569; stroke-width: 3; fill: none; transition: stroke 0.5s, filter 0.5s; }
.ix-wire.active { stroke: #facc15; filter: drop-shadow(0 0 4px rgba(250,204,21,0.6)); }
.ix-wire-main { stroke: #64748b; stroke-width: 3; fill: none; } /* Glavne žice — vedno vidne */
.ix-wire-branch { stroke: #475569; stroke-width: 3; fill: none; transition: stroke 0.5s, filter 0.5s; }
.ix-wire-branch.active { stroke: #facc15; filter: drop-shadow(0 0 4px rgba(250,204,21,0.6)); }

/* Baterija */
.ix-battery { fill: #334155; stroke: #64748b; stroke-width: 2; }
.ix-battery-pole { stroke: none; }
.ix-pole-plus { fill: #ef4444; } /* Rdeč + pol */
.ix-pole-minus { fill: #3b82f6; } /* Moder - pol */
.ix-pole-label { font-family: 'Play', sans-serif; font-size: 14px; font-weight: 700; text-anchor: middle; }
.ix-component-label { fill: var(--text-secondary, #94a3b8); font-family: 'Play', sans-serif; font-size: 12px; text-anchor: middle; }

/* Vozlišča (connection nodes) */
.ix-node { fill: #64748b; stroke: #94a3b8; stroke-width: 1; }

/* Upor */
.ix-resistor { fill: #78716c; stroke: #a8a29e; stroke-width: 2; }

/* Kondenzator */
.ix-capacitor-plate { stroke: #64748b; stroke-width: 4; stroke-linecap: round; }

/* LED */
.ix-led { fill: rgba(34, 197, 94, 0.1); stroke: #22c55e; stroke-width: 2; transition: fill 0.3s, filter 0.3s; }
.ix-led.on { fill: rgba(34, 197, 94, 0.5); filter: drop-shadow(0 0 10px currentColor); }
.ix-led-base { stroke: #64748b; stroke-width: 3; }

/* Terminal (potencial +/-) */
.ix-terminal { stroke-width: 2; filter: drop-shadow(0 0 4px currentColor); }
.ix-terminal-label { font-family: 'Play', sans-serif; }

/* Nalaganje/napaka */
.interactive-loading { text-align: center; padding: 40px; color: var(--text-secondary); }
.interactive-error { text-align: center; padding: 40px; color: #f87171; }

/* Stikala */
.ix-contact { fill: #64748b; stroke: #94a3b8; stroke-width: 1.5; }
.ix-lever { stroke: #94a3b8; stroke-width: 3; stroke-linecap: round; transition: all 0.3s; }
.ix-lever.closed { stroke: #22c55e; }

/* Žarnica (simbol: krog s križem) */
.ix-bulb-glass { fill: rgba(250,204,21,0.05); stroke: #94a3b8; stroke-width: 2.5; transition: fill 0.5s, filter 0.5s, stroke 0.5s; }
.ix-bulb-glass.on { fill: rgba(250,204,21,0.4); filter: drop-shadow(0 0 15px rgba(250,204,21,0.9)); stroke: #facc15; }
.ix-bulb-cross { stroke: #94a3b8; stroke-width: 2.5; transition: stroke 0.5s, filter 0.5s; }
.ix-bulb-cross.on { stroke: #facc15; filter: drop-shadow(0 0 8px rgba(251,191,36,0.8)); }

/* Status bar */
.ix-status-bar { display: flex; justify-content: center; gap: 24px; margin: 16px 0; flex-wrap: wrap; }
.ix-status-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 0.85rem;
}
.ix-status-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #475569; transition: all 0.5s;
}
.ix-status-dot.on { background: #facc15; box-shadow: 0 0 8px rgba(250,204,21,0.6); }
.ix-status-label { color: var(--text-secondary, #94a3b8); }
.ix-status-value { font-weight: 700; }


/* ═══════════════════════════════════════════════════════════════════════════
   3. CELL EXPLORER
   ═══════════════════════════════════════════════════════════════════════════ */

.ix-cell-area { max-width: 500px; margin: 0 auto 16px; }
.ix-cell-svg { width: 100%; height: auto; display: block; }

/* Verzija s sliko in hotspoti */
.ix-cell-image-area {
    position: relative;
    max-width: 500px;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
}
.ix-cell-image {
    width: 100%;
    height: auto;
    display: block;
}
.ix-hotspots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}
.ix-hotspot {
    position: absolute;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ix-hotspot:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}
.ix-hotspot.found {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.2);
}
.ix-hotspot-pulse {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: hotspot-pulse 2s infinite;
}
.ix-hotspot.found .ix-hotspot-pulse {
    background: #22c55e;
    animation: none;
}
@keyframes hotspot-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 0.3; }
}

.ix-organelle { cursor: pointer; transition: filter 0.2s; }
.ix-organelle:hover { filter: brightness(1.3); }
.ix-organelle.found { filter: brightness(1.4) drop-shadow(0 0 6px rgba(34,197,94,0.6)); }

/* Progress bar */
.ix-progress-bar {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
}
.ix-progress-label { font-size: 0.85rem; color: var(--text-secondary, #94a3b8); white-space: nowrap; }
.ix-progress-track { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.ix-progress-fill { height: 100%; background: #22c55e; border-radius: 3px; transition: width 0.5s; width: 0%; }
.ix-progress-count { font-size: 0.85rem; font-weight: 700; color: #22c55e; }

/* Organelle info panel */
.ix-organelle-info {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 16px;
    min-height: 80px;
}
.ix-organelle-placeholder { color: var(--text-muted, #475569); text-align: center; padding: 16px; }
.ix-organelle-info h4 { font-size: 1rem; margin-bottom: 6px; }
.ix-organelle-info p { font-size: 0.85rem; color: var(--text-secondary, #94a3b8); line-height: 1.5; }
.ix-fun-fact {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(34, 197, 94, 0.05);
    border-left: 3px solid #22c55e;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    color: #a1f0c4;
}

/* Legenda */
.ix-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 6px;
}
.ix-legend-item {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-muted, #64748b);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}
.ix-legend-item:hover { background: rgba(15, 23, 42, 0.6); color: var(--text-secondary, #94a3b8); }
.ix-legend-item.found { color: #22c55e; border-color: rgba(34,197,94,0.2); background: rgba(34,197,94,0.05); }
.ix-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }


/* ═══════════════════════════════════════════════════════════════════════════
   4. LEMONADE STAND
   ═══════════════════════════════════════════════════════════════════════════ */

.ix-stand-visual { text-align: center; font-size: 3rem; margin-bottom: 4px; }
.ix-day-label { text-align: center; font-size: 1rem; color: #f59e0b; font-weight: 700; margin-bottom: 16px; }

.ix-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.ix-setting-card {
    padding: 16px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
}
.ix-setting-label { font-size: 0.8rem; color: var(--text-secondary, #94a3b8); margin-bottom: 6px; }
.ix-setting-value { font-size: 1.5rem; font-weight: 700; color: #f59e0b; text-align: center; margin-bottom: 6px; }
.ix-unit { font-size: 0.85rem; color: var(--text-secondary, #94a3b8); }
.ix-setting-hint { font-size: 0.7rem; color: var(--text-muted, #475569); margin-top: 4px; text-align: center; }

/* Slider */
.ix-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px; border-radius: 3px;
    background: rgba(255,255,255,0.08);
    outline: none;
}
.ix-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #f59e0b; cursor: pointer;
    box-shadow: 0 0 6px rgba(245,158,11,0.4);
}
.ix-slider::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #f59e0b; cursor: pointer; border: none;
}

/* Preview */
.ix-preview {
    padding: 16px 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 12px;
}
.ix-preview-title { font-size: 0.8rem; color: var(--text-secondary, #94a3b8); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 1px; }
.ix-preview-row { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; padding: 3px 0; }
.ix-total-row { font-weight: 700; font-size: 0.95rem; padding-top: 6px; }
.ix-divider { border: none; border-top: 1px solid rgba(255,255,255,0.06); margin: 4px 0; }

/* Barve vrednosti */
.positive { color: #22c55e !important; }
.negative { color: #ef4444 !important; }
.neutral { color: #f59e0b !important; }

/* Sell gumb */
.ix-sell-wrap { text-align: center; margin-bottom: 16px; }

/* Rezultati */
.ix-results {
    text-align: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 12px;
}
.ix-results-emoji { font-size: 2.5rem; margin-bottom: 4px; }
.ix-results-text { font-size: 0.9rem; color: var(--text-secondary, #94a3b8); margin-bottom: 8px; }
.ix-results-profit { font-size: 1.6rem; font-weight: 700; }

/* Zgodovina */
.ix-history { margin-bottom: 12px; }
.ix-history-title { font-size: 0.8rem; color: var(--text-secondary, #94a3b8); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px; }
.ix-history-days { display: flex; gap: 6px; flex-wrap: wrap; }
.ix-history-day {
    padding: 6px 12px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 0.75rem;
    text-align: center;
    min-width: 70px;
}
.ix-history-num { color: var(--text-secondary, #94a3b8); }
.ix-history-profit { font-weight: 700; font-size: 0.85rem; margin-top: 2px; }


/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .ix-workspace { height: 200px; }
    .ix-atom-source, .ix-atom { width: 48px; height: 48px; font-size: 0.9rem; }
    .ix-atom-source.ix-atom-H, .ix-atom.ix-atom-H { width: 34px; height: 34px; font-size: 0.75rem; }
    .ix-settings-grid { grid-template-columns: 1fr; }
    .ix-challenges { grid-template-columns: repeat(2, 1fr); }
    .ix-legend { grid-template-columns: repeat(2, 1fr); }
    .ix-circuit-board { padding: 10px; }
}
