/* ============================
   QUIZ COMPACT STYLES
   Compact single-screen layout
   ============================ */

/* Navigation - Terminal Style (matching challenges page) */
.nav {
    background: var(--bg-surface);
    padding: 10px 0;
    border-bottom: 1px solid var(--accent-subtle);
}

.nav-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    background: var(--bg-card);
    padding: 8px 12px;
    border: 1px solid transparent;
    transition: all 0.3s;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
    font-family: monospace;
    max-width: fit-content;
}

.nav-brand-text {
    display: flex;
    align-items: center;
}

.nav-brand-name {
    color: var(--text-light);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    font-size: 11px;
    line-height: 1;
}

.nav-brand:hover {
    background: var(--card-red) !important;
    color: var(--text-dark) !important;
    border-color: var(--card-red) !important;
    transform: translateX(5px);
}

.nav-brand:hover .nav-brand-name {
    color: var(--text-dark) !important;
}

.nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid transparent;
    transition: all 0.3s;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 100%, 10px 100%);
    font-family: monospace;
}

.nav-link:hover {
    background: var(--accent-primary);
    color: var(--bg-very-dark);
    border-color: var(--accent-glow);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--accent-primary);
    color: var(--bg-very-dark);
    border-color: var(--accent-primary);
}

/* About hover - yellow */
.nav-link[href="about.html"]:hover,
.nav-link[href='about.html']:hover {
    background: var(--card-yellow) !important;
    color: var(--text-dark) !important;
    transform: translateX(5px);
}

/* Compact Header */
.header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 15px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: 10px;
    gap: 15px;
}

.brand-title-compact {
    font-family: 'Bebas Neue', cursive;
    font-size: 22px;
    margin: 0;
    color: var(--accent-primary);
    text-shadow: 0 0 3px rgba(142, 255, 119, 0.3);
    letter-spacing: 2px;
    white-space: nowrap;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(142, 255, 119, 0.4);
    border-bottom: 2px solid var(--accent-primary);
    color: var(--text-light);
    padding: 4px 8px;
    font-family: monospace;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 200px;
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px rgba(142, 255, 119, 0.2);
}

.username-input::placeholder {
    color: rgba(142, 255, 119, 0.6);
    font-size: 11px;
    text-transform: none;
}

.username-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(142, 255, 119, 0.5);
}

/* Streak Display */
.streak-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
}

.streak-label {
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 1px;
}

.streak-count {
    font-size: 20px;
    font-weight: bold;
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-glow);
    min-width: 30px;
    text-align: center;
}

.streak-best {
    font-size: 11px;
    color: var(--text-muted);
}

/* Mastered Counter */
.mastered-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
}

.mastered-label {
    color: var(--text-secondary);
    font-size: 12px;
    letter-spacing: 1px;
}

.mastered-count {
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    min-width: 30px;
    text-align: center;
}

.mastered-container {
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 2px 8px;
    border-radius: 4px;
}

.mastered-container:hover {
    background: rgba(76, 175, 80, 0.15);
}

/* Mastered Effects Panel */
.mastered-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    width: 280px;
    max-height: 350px;
    background: var(--bg-card);
    border: 1px solid #4CAF50;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 200;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mastered-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(76, 175, 80, 0.2);
    border-bottom: 1px solid rgba(76, 175, 80, 0.3);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #4CAF50;
}

.mastered-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.mastered-panel-close:hover {
    color: #ff6666;
}

.mastered-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
    max-height: 220px;
}

.mastered-panel-list::-webkit-scrollbar {
    width: 6px;
}

.mastered-panel-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.mastered-panel-list::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 3px;
}

.mastered-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 20px 10px;
    font-style: italic;
}

.mastered-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

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

.mastered-item-name {
    color: var(--text-light);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mastered-item-remove {
    background: none;
    border: none;
    color: rgba(255, 100, 100, 0.6);
    font-size: 1rem;
    cursor: pointer;
    padding: 2px 6px;
    margin-left: 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.mastered-item-remove:hover {
    background: rgba(255, 100, 100, 0.2);
    color: #ff6666;
}

.mastered-panel-footer {
    padding: 10px 12px;
    border-top: 1px solid rgba(76, 175, 80, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.unmaster-all-btn {
    font-size: 0.75rem;
    color: rgba(255, 100, 100, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.unmaster-all-btn:hover {
    color: #ff6666;
    text-decoration: underline;
}

.master-filtered-btn {
    font-size: 0.75rem;
    color: rgba(100, 200, 100, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.master-filtered-btn:hover {
    color: #66ff66;
    text-decoration: underline;
}

.header-user-info {
    position: relative;
}

/* Card Text Wrapper - for positioning hide button */
.card-text-wrapper {
    position: relative;
    order: 2;
}

/* Mastered Effect Button Container - top left of effect name box */
.btn-hide-effect {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.btn-hide-effect:hover {
    opacity: 1;
}

.btn-hide-effect .click-hint {
    font-family: 'Roboto', sans-serif;
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0;
    margin: 0;
    white-space: nowrap;
}

.btn-hide-effect .mastered-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: sans-serif;
    line-height: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(100, 255, 100, 0.3);
    color: rgba(100, 255, 100, 0.7);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-hide-effect .mastered-btn:hover {
    background: rgba(100, 255, 100, 0.3);
    border-color: rgba(100, 255, 100, 0.6);
    color: #ffffff;
    box-shadow: 0 0 8px rgba(100, 255, 100, 0.4);
}

/* New Record Notification - inline within feedback box */
.new-record-notification {
    display: none;
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    color: #ffd700;
    margin-left: 20px;
    padding: 4px 12px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 4px;
    white-space: nowrap;
}

/* Effect Description Display */
.effect-description-display {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--accent-primary);
    border-radius: 4px;
    margin: 10px 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    order: 3;
}


/* Compact Control Bar - Variation 4: Compact Grouped Pills */
.control-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.2);
    justify-content: flex-start;
    margin-bottom: 15px;
    border-radius: 4px;
    border: 1px solid rgba(142, 255, 119, 0.15);
}

.control-group {
    display: flex;
    gap: 2px;
    padding: 2px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(142, 255, 119, 0.15);
    align-items: center;
}

.control-label-mini {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1px;
    white-space: nowrap;
    padding: 0 4px;
    min-width: 52px;
    text-align: right;
}

.btn-group {
    display: flex;
    gap: 2px;
}

.btn-mini {
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 600;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

@media (hover: hover) {
    .btn-mini:hover {
        background: rgba(142, 255, 119, 0.1);
        color: var(--text-light);
    }
}

.btn-mini:focus,
.btn-mini:active {
    outline: none;
}

.btn-mini.active {
    background: rgba(142, 255, 119, 0.2);
    color: var(--accent-primary);
}

.btn-mini.active:focus,
.btn-mini.active:active {
    background: rgba(142, 255, 119, 0.2);
    color: var(--accent-primary);
}

/* All active buttons use the same monochromatic green style */
#star-1.active,
#star-2.active,
#star-3.active,
#star-4.active,
#cat-ranged.active,
#cat-melee.active,
#cat-armor.active,
#cat-pa.active,
#mode-description.active,
#mode-name.active,
#mode-stars.active,
#mode-types.active,
#ver-original.active,
#ver-2021.active,
#ver-2024.active,
#ver-2025.active,
#toggle-crafting.active {
    background: rgba(142, 255, 119, 0.2);
    color: var(--accent-primary);
    box-shadow: none;
}

/* Uniform width for star buttons */
#star-1, #star-2, #star-3, #star-4 {
    min-width: 42px;
    text-align: center;
    justify-content: center;
}

/* Uniform width for version/update buttons */
#ver-original, #ver-2021, #ver-2024, #ver-2025 {
    min-width: 50px;
    text-align: center;
    justify-content: center;
}

.btn-action {
    background: transparent;
    color: var(--text-muted);
    padding: 6px 10px;
}

@media (hover: hover) {
    .btn-action:hover {
        background: rgba(142, 255, 119, 0.1);
        color: var(--text-light);
    }
}

.btn-reset {
    font-size: 12px;
    padding: 3px 8px;
}

.control-divider {
    display: none;
}

.control-spacer {
    display: none;
}

/* Compact Quiz Card - fills available width */
.quiz-card-compact {
    background: var(--bg-card);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 20px 30px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Question prompt - smaller subtitle style */
.card-title-compact {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.3rem;
    color: var(--text-light);
    text-align: center;
    margin: 0 0 10px 0;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    order: 1;  /* After feedback */
    opacity: 0.9;
    min-height: 28px;
    max-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* When showing the answer, title becomes more prominent */
.card-title-compact.answer-mode {
    font-size: 1.5rem;
    color: var(--accent-primary);
    text-shadow: 0 0 3px rgba(142, 255, 119, 0.3);
}

/* Feedback styling in title area - same size as question prompt */
.card-title-compact.feedback-correct {
    font-size: 1.3rem;
    color: #4CAF50;
    text-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
}

.card-title-compact.feedback-incorrect {
    font-size: 1.3rem;
    color: #F44336;
    text-shadow: 0 0 4px rgba(244, 67, 54, 0.4);
}

/* Legendary effect displayed HUGE - fills full width */
.card-text-compact {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.6rem;
    line-height: 1.1;
    color: var(--accent-primary);
    text-align: center;
    margin-bottom: 15px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 5px rgba(142, 255, 119, 0.3);
    width: 100%;
    min-height: 220px;
    max-height: 220px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(142, 255, 119, 0.2);
    order: 2;  /* After title */
}

/* When showing description (longer text), use smaller size */
.card-text-compact.description-mode {
    font-family: 'Roboto', sans-serif;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0.5px;
    text-shadow: none;
    font-weight: 500;
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.3);
}

/* When showing name with star subtitle (now above) */
.card-text-compact.with-subtitle {
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding: 15px 20px;
    padding-top: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Only apply hover on devices that support it (not touch) */
@media (hover: hover) {
    .card-text-compact.with-subtitle:hover {
        background: rgba(142, 255, 119, 0.1);
    }
}

.star-subtitle {
    display: block;
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 2px;
    text-shadow: none;
    margin-bottom: 8px;
    order: 1;
}

.effect-name {
    display: block;
    order: 2;
}

.effect-subtitle {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
    text-shadow: none;
    text-transform: none;
    margin-top: 10px;
    line-height: 1.4;
    opacity: 0.9;
    order: 3;
}

/* Inline crafting info */
.crafting-inline {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    color: #ffcc33;
    letter-spacing: 0.5px;
    text-shadow: none;
    text-transform: none;
    margin-top: 12px;
    opacity: 0.8;
    min-height: 1.2em;
    order: 4;
}

.crafting-inline.crafting-hidden {
    visibility: hidden;
}

/* Hidden placeholders - invisible but take up space for layout consistency */
.placeholder-hidden {
    visibility: hidden;
}

/* Type Indicators Compact */
.type-indicators-compact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    order: 3;
    min-height: 32px;
    max-height: 32px;
}

.type-badge {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: bold;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    opacity: 0.4;
    transition: none;
    box-shadow: none;
}

.type-badge.active {
    opacity: 1;
    background: var(--accent-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 8px var(--accent-glow);
}

/* Answer Interface Compact - fills width */
.answer-interface-compact {
    margin-top: auto;
    width: 100%;
    order: 4;
}

.answer-buttons-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 5px;
    width: 100%;
}

.btn-choice-compact {
    padding: 12px 15px;
    font-size: 14px;
    text-align: left;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    min-height: 120px;
    max-height: 120px;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Only apply hover effects on devices that support hover (not touch) */
@media (hover: hover) {
    .btn-choice-compact:hover {
        background: var(--accent-primary);
        color: var(--bg-dark);
        border-color: var(--accent-primary);
        transform: translateX(4px);
    }

    /* Remove shift effect on tablet */
    @media (max-width: 1400px) {
        .btn-choice-compact:hover {
            transform: none;
        }
    }
}

.choice-letter {
    display: none;
    font-weight: bold;
    color: var(--accent-secondary);
    font-size: 18px;
    flex-shrink: 0;
}

/* Answer text content - larger for effect names */
[id^="choice-text-"] {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (hover: hover) {
    .btn-choice-compact:hover .choice-letter {
        color: var(--bg-dark);
    }
}

/* Star Choice Buttons */
.btn-star-choice {
    font-size: 1.5rem !important;
    min-width: 80px;
}

/* Type Choice Buttons */
.btn-type-choice {
    font-size: 1.1rem !important;
    padding: 10px 10px !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 70px !important;
    max-height: 70px !important;
}

.btn-type-choice.selected {
    background: var(--accent-primary) !important;
    color: var(--bg-dark) !important;
    border-color: var(--accent-secondary) !important;
}

/* Correct answers in Guess Gear mode */
.btn-type-choice.correct {
    background: rgba(0, 255, 100, 0.2) !important;
    border-color: #00ff64 !important;
    color: var(--text-light) !important;
}

/* Missed correct answers - lighter green with > < indicators */
.btn-type-choice.correct.missed {
    background: rgba(0, 255, 100, 0.08) !important;
    border-color: rgba(0, 255, 100, 0.5) !important;
    border-style: dashed !important;
    color: rgba(0, 255, 100, 0.7) !important;
}

.missed-indicator {
    color: #ff6b6b;
    font-weight: bold;
    margin: 0 4px;
    animation: blink-indicator 1s ease-in-out infinite;
}

@keyframes blink-indicator {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Incorrect answers in Guess Gear mode */
.btn-type-choice.incorrect {
    background: rgba(255, 50, 50, 0.2) !important;
    border-color: #ff3232 !important;
    color: var(--text-light) !important;
}

/* Submit button for type selection - full width row below choices */
.btn-submit-types {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: bold;
    background: rgba(0, 255, 100, 0.15);
    color: rgba(0, 255, 100, 0.8);
    border: 1px solid rgba(0, 255, 100, 0.4);
    border-radius: 6px;
    cursor: pointer;
}

@media (hover: hover) {
    .btn-submit-types:hover {
        background: rgba(0, 255, 100, 0.25);
        border-color: rgba(0, 255, 100, 0.6);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
}

.btn-choice-compact.correct {
    background: rgba(0, 255, 100, 0.2) !important;
    border-color: #00ff64 !important;
    color: var(--text-light) !important;
    cursor: pointer;
}

.btn-choice-compact.correct strong {
    color: #00ff64;
}

.btn-choice-compact.incorrect {
    background: rgba(255, 50, 50, 0.2) !important;
    border-color: #ff3232 !important;
    color: var(--text-light) !important;
    cursor: pointer;
}

.btn-choice-compact.incorrect strong {
    color: #ff3232;
}

/* Non-selected wrong answers after reveal */
.answer-revealed .btn-choice-compact:not(.correct):not(.incorrect) {
    opacity: 0.7;
    cursor: pointer;
}

.answer-revealed .btn-choice-compact:not(.correct):not(.incorrect) strong {
    color: var(--accent-secondary);
}

/* Disable hover effects in answer-revealed state */
@media (hover: hover) {
    .answer-revealed .btn-choice-compact:hover {
        background: var(--bg-secondary);
        color: var(--text-primary);
        border-color: var(--border-color);
        transform: none;
    }

    .answer-revealed .btn-choice-compact:hover .choice-letter {
        color: var(--accent-secondary);
    }

    .answer-revealed .btn-choice-compact.correct:hover {
        background: rgba(0, 255, 100, 0.2) !important;
        color: var(--text-light) !important;
        border-color: #00ff64 !important;
    }

    .answer-revealed .btn-choice-compact.incorrect:hover {
        background: rgba(255, 50, 50, 0.2) !important;
        color: var(--text-light) !important;
        border-color: #ff3232 !important;
    }

    .answer-revealed .btn-choice-compact:not(.correct):not(.incorrect):hover {
        opacity: 0.7;
    }
}

/* Feedback Compact - At top, tall and prominent */
.feedback-compact {
    order: 0;  /* First item - at top */
    margin-bottom: 15px;
    padding: 20px 25px;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.3s ease;
    letter-spacing: 3px;
    width: 100%;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-compact.correct {
    background: rgba(76, 175, 80, 0.3);
    border: 3px solid #4CAF50;
    color: #4CAF50;
    text-shadow: 0 0 4px rgba(76, 175, 80, 0.4);
}

.feedback-compact.incorrect {
    background: rgba(244, 67, 54, 0.3);
    border: 3px solid #F44336;
    color: #F44336;
    text-shadow: 0 0 4px rgba(244, 67, 54, 0.4);
}

/* User's answer display */
.user-answer-display {
    margin-top: 8px;
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    width: 100%;
    order: 5;
}

.user-answer-display strong {
    color: var(--accent-secondary);
}


/* Answer Details Compact - fills width */
.answer-details-compact {
    margin-top: 12px;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 4px solid var(--accent-primary);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    order: 6;
}

.answer-details-compact div {
    margin-bottom: 0;
}

.answer-details-compact strong {
    color: var(--accent-secondary);
    margin-right: 8px;
    font-size: 16px;
}

/* Tablet Responsive Adjustments (including landscape) */
@media (max-width: 1400px) {
    .star-subtitle {
        font-size: 1.1rem;
    }

    .effect-subtitle {
        font-size: 1.2rem;
    }

    /* Allow scrolling on tablet */
    .pipboy-screen-wrapper {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
        transform: none !important;
        left: 0 !important;
        width: 100% !important;
    }

    .pipboy-screen-content {
        height: auto !important;
        min-height: auto;
        overflow: visible !important;
    }

    .container-compact {
        flex: none;
        padding: 15px;
    }

    .quiz-card-compact {
        flex: none;
        min-height: auto;
    }

    body {
        overflow-y: auto !important;
        height: auto !important;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    /* Header wraps on mobile */
    .header-compact {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 10px;
        gap: 8px;
    }

    .brand-title-compact {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .header-user-info {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .username-input {
        width: 160px;
        font-size: 12px;
        padding: 3px 6px;
    }

    .streak-container,
    .mastered-container {
        font-size: 11px;
    }

    .streak-count,
    .mastered-count {
        font-size: 16px;
    }

    .mastered-container {
        padding-left: 10px;
    }

    /* Control bar */
    .control-bar {
        padding: 8px;
        gap: 5px;
    }

    .control-group {
        padding: 3px 4px;
    }

    .control-label-mini {
        font-size: 9px;
        padding: 0 4px;
        min-width: 48px;
    }

    .btn-mini {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* Quiz card - allow scrolling */
    .quiz-card-compact {
        padding: 15px;
        min-height: auto;
    }

    .card-title-compact {
        font-size: 0.9rem;
    }

    .card-text-compact {
        font-size: 1.8rem;
        letter-spacing: 1px;
        min-height: 180px;
        max-height: 180px;
        padding: 12px 30px;
        overflow: hidden;
    }

    .card-text-compact.description-mode {
        font-size: 1rem;
        padding: 12px;
    }

    .card-text-compact.with-subtitle {
        padding: 10px 15px;
        padding-top: 12px;
    }

    .star-subtitle {
        font-size: 0.9rem;
    }

    /* Hide click hint on mobile - just show checkmark */
    .btn-hide-effect .click-hint {
        display: none;
    }

    .btn-hide-effect {
        top: 5px;
        left: 5px;
    }

    .answer-buttons-compact {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .btn-choice-compact {
        padding: 12px 14px;
        font-size: 14px;
        min-height: 100px;
        max-height: 100px;
        overflow: hidden;
    }

    .choice-letter {
        font-size: 14px;
    }

    .type-indicators-compact {
        min-height: 24px;
        max-height: 24px;
    }

    .type-badge {
        font-size: 9px;
        padding: 2px 6px;
    }

    .btn-submit-types {
        padding: 14px 18px;
        font-size: 13px;
    }

    /* Type choice buttons on mobile - smaller height, larger text, centered */
    .btn-type-choice {
        min-height: 60px !important;
        max-height: 60px !important;
        font-size: 0.95rem !important;
    }

    /* Allow scrolling on mobile */
    .pipboy-screen-wrapper {
        position: relative !important;
        height: auto !important;
        min-height: 100vh;
        overflow: visible !important;
        transform: none !important;
        left: 0 !important;
        width: 100% !important;
    }

    .pipboy-screen-content {
        height: auto !important;
        min-height: auto;
        overflow: visible !important;
    }

    .container-compact {
        flex: none;
        padding: 10px;
    }

    .quiz-card-compact {
        flex: none;
        min-height: auto;
        padding-bottom: 40px;
    }

    body {
        overflow-y: auto !important;
        height: auto !important;
    }
}

/* Ultra-compact for very small screens */
@media (max-width: 480px) {
    .brand-title-compact {
        font-size: 14px;
    }

    .control-bar {
        padding: 6px;
        gap: 4px;
        flex-direction: column;
        align-items: stretch;
    }

    .control-group {
        padding: 2px 3px;
        gap: 2px;
        width: 100%;
    }

    .btn-mini {
        padding: 5px 8px;
        font-size: 10px;
    }

    .control-divider {
        display: none;
    }

    .control-label-mini {
        display: inline;
        font-size: 8px;
        min-width: 50px;
        text-align: left;
    }

    .card-text-compact {
        font-size: 1.5rem;
        padding: 10px 28px;
        min-height: 160px;
        max-height: 160px;
    }

    .card-text-compact.with-subtitle {
        padding: 8px 12px;
        padding-top: 10px;
    }

    .star-subtitle {
        font-size: 0.9rem;
    }

    .btn-choice-compact {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 90px;
        max-height: 90px;
    }

    .choice-letter {
        font-size: 14px;
    }

    /* Type choice buttons on small mobile */
    .btn-type-choice {
        min-height: 55px !important;
        max-height: 55px !important;
        font-size: 0.9rem !important;
    }

    .btn-submit-types {
        padding: 12px 18px;
        font-size: 12px;
    }
}

/* Centered pip-boy layout - content fills available space */
.pipboy-screen-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
}

.container-compact {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 15px;
    min-height: 0;
}

.quiz-card-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Correct/Incorrect answer highlights */
.btn-choice-compact.correct-answer {
    background: rgba(76, 175, 80, 0.3);
    border-color: #4CAF50;
    animation: pulse 0.5s ease;
}

.btn-choice-compact.incorrect-answer {
    background: rgba(244, 67, 54, 0.3);
    border-color: #F44336;
    animation: shake 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Disable transform animations on tablet and mobile */
@media (max-width: 1400px) {
    .btn-choice-compact.correct-answer,
    .btn-choice-compact.incorrect-answer {
        animation: none;
    }
}

/* ========================================
   ONBOARDING SYSTEM STYLES
   ======================================== */

/* Lock scrolling when onboarding is active */
body.onboarding-active {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
    height: 100%;
}

.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    display: none;
}

.onboarding-overlay.active {
    display: block;
}

/* Terminal Boot Sequence */
.terminal-boot-sequence {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
}

.terminal-screen {
    background: linear-gradient(135deg, #0a1a0a, #001100);
    border: 3px solid var(--accent-primary);
    border-radius: 10px;
    padding: 30px;
    box-shadow:
        0 0 40px rgba(142, 255, 119, 0.5),
        inset 0 0 80px rgba(142, 255, 119, 0.1);
    position: relative;
    overflow: hidden;
}

.terminal-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(142, 255, 119, 0.03) 2px,
        rgba(142, 255, 119, 0.03) 4px
    );
    pointer-events: none;
}

.terminal-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: var(--bg-very-dark);
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border-radius: 4px;
    font-weight: bold;
    padding: 0;
}

.terminal-close-button:hover {
    background: var(--accent-primary);
    color: var(--bg-very-dark);
    transform: scale(1.1);
}

.terminal-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.terminal-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-primary);
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(142, 255, 119, 0.8);
    animation: terminalFlicker 2s infinite;
}

@keyframes terminalFlicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 0.8; }
    94% { opacity: 1; }
}

.terminal-subtitle {
    font-family: 'Roboto', monospace;
    font-size: 0.8rem;
    color: rgba(142, 255, 119, 0.7);
    margin-top: 5px;
}

.terminal-body {
    position: relative;
    z-index: 1;
    min-height: 180px;
}

.boot-text {
    font-family: 'Roboto', monospace;
    font-size: 0.9rem;
    color: var(--accent-primary);
    margin: 10px 0 5px 0;
    opacity: 0;
    transform: translateX(-10px);
}

.boot-text.active {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.boot-text.success {
    color: #4CAF50;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Username section */
.terminal-username-section {
    margin: 20px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.terminal-prompt {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.terminal-input {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--accent-primary);
    border-radius: 5px;
    padding: 12px 20px;
    font-family: 'Roboto', monospace;
    font-size: 1.2rem;
    color: var(--accent-primary);
    text-align: center;
    width: 80%;
    max-width: 300px;
    outline: none;
    transition: all 0.3s ease;
}

.terminal-input:focus {
    box-shadow: 0 0 20px rgba(142, 255, 119, 0.5);
    border-color: var(--accent-glow);
}

.terminal-input::placeholder {
    color: rgba(142, 255, 119, 0.4);
}

.terminal-continue-btn {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-glow));
    color: var(--bg-very-dark);
    border: 2px solid var(--accent-primary);
    padding: 12px 30px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.3s ease;
    animation: terminalPulse 2s infinite;
    position: relative;
    z-index: 1;
}

@keyframes terminalPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.terminal-continue-btn:hover {
    background: linear-gradient(135deg, var(--accent-glow), var(--accent-primary));
    box-shadow: 0 0 30px rgba(142, 255, 119, 0.8);
}

.terminal-continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    animation: none;
}

/* Interactive Tutorial Mode */
.tutorial-mode {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
}

.tutorial-pip-boy {
    position: fixed;
    width: 380px;
    z-index: 10000;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.pip-boy-screen {
    background: linear-gradient(135deg, #1a2a1a, #0a1a0a);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    padding: 20px;
    box-shadow:
        0 0 30px rgba(142, 255, 119, 0.5),
        inset 0 0 40px rgba(142, 255, 119, 0.1);
}

.pip-boy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(142, 255, 119, 0.3);
}

.pip-boy-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-primary);
    letter-spacing: 2px;
}

.pip-boy-page {
    font-family: 'Roboto', monospace;
    font-size: 0.8rem;
    color: rgba(142, 255, 119, 0.7);
}

.pip-boy-content {
    min-height: 100px;
    margin: 10px 0;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: opacity 0.2s ease;
}

.pip-boy-content h3 {
    color: var(--accent-primary);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.pip-boy-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.pip-boy-btn {
    background: rgba(142, 255, 119, 0.1);
    border: 1px solid rgba(142, 255, 119, 0.3);
    color: var(--accent-primary);
    padding: 8px 15px;
    font-family: 'Roboto', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.pip-boy-btn:hover {
    background: rgba(142, 255, 119, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(142, 255, 119, 0.3);
}

#tutorial-next {
    margin-left: auto;
}

/* Tutorial Overlay */
.tutorial-dimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9996;
    pointer-events: none;
}

/* Tutorial Spotlight Frame */
.tutorial-spotlight {
    position: fixed;
    border: 3px solid var(--accent-primary);
    border-radius: 10px;
    box-shadow: 0 0 40px rgba(142, 255, 119, 0.8);
    z-index: 9997;
    pointer-events: none;
    background: transparent;
}

/* Floating helper tooltip */
.tutorial-helper {
    position: fixed;
    z-index: 10001;
    pointer-events: none;
}

.helper-text {
    background: linear-gradient(135deg, #1a2a1a, #0a1a0a);
    border: 2px solid var(--accent-primary);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--accent-primary);
    font-family: 'Roboto', monospace;
    font-size: 0.85rem;
    max-width: 250px;
    box-shadow: 0 0 20px rgba(142, 255, 119, 0.5);
}

.helper-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--accent-primary);
    position: absolute;
    top: -10px;
    left: 20px;
}

.helper-arrow.arrow-down {
    border-bottom: none;
    border-top: 10px solid var(--accent-primary);
    top: auto;
    bottom: -10px;
}

.helper-arrow.arrow-left {
    border-bottom: none;
    border-left: none;
    border-right: 10px solid var(--accent-primary);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
}

.helper-arrow.arrow-right {
    border-bottom: none;
    border-right: none;
    border-left: 10px solid var(--accent-primary);
    border-top: 10px solid transparent;
    left: auto;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Mobile adjustments for onboarding */
@media (max-width: 768px) {
    .terminal-boot-sequence {
        width: 95%;
    }

    .terminal-screen {
        padding: 20px;
    }

    .terminal-title {
        font-size: 1.4rem;
    }

    .terminal-body {
        min-height: 150px;
    }

    .boot-text {
        font-size: 0.8rem;
    }

    .terminal-input {
        width: 90%;
        font-size: 1rem;
    }

    .terminal-continue-btn {
        font-size: 1rem;
        padding: 10px 25px;
    }

    .tutorial-pip-boy {
        width: 90%;
        max-width: 350px;
        bottom: 10px;
    }

    .pip-boy-content {
        min-height: 80px;
        font-size: 0.85rem;
    }

    .pip-boy-btn {
        min-width: 80px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }
}