/* ============================================================
   CTF ARENA — Shared Engine Styles
   Boot sequence, desktop, windows, terminal, browser, modals
   ============================================================ */

:root {
    --arena-bg: #0a0a12;
    --arena-chrome: #1a1a26;
    --arena-chrome-light: #252535;
    --arena-border: rgba(255,255,255,0.08);
    --arena-text: #c0c0d0;
    --arena-text-dim: #6a6a7a;
    --arena-text-bright: #e0e0f0;
    --arena-accent: #3498db;
    --arena-success: #2ecc71;
    --arena-danger: #e74c3c;
    --arena-warning: #f39c12;
    --arena-font: 'Courier New', 'Consolas', monospace;
    --arena-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --box-accent: #3498db;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* WCAG AA focus indicators */
button:focus-visible, [role="button"]:focus-visible, a:focus-visible, input:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--box-accent, #3498db);
    outline-offset: 2px;
}

/* Screen reader only utility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

body {
    font-family: var(--arena-font);
    background: var(--arena-bg);
    color: var(--arena-text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ============================================================
   BOOT SEQUENCE
   ============================================================ */

.boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px;
    cursor: pointer;
    transition: opacity 0.8s ease;
}

.boot-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-text {
    font-family: var(--arena-font);
    font-size: 0.8rem;
    color: #00ff00;
    line-height: 1.6;
    white-space: pre-wrap;
}

.boot-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background: #00ff00;
    animation: bootBlink 0.6s step-end infinite;
    vertical-align: middle;
    margin-left: 2px;
}

@keyframes bootBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.boot-skip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 0.65rem;
    color: #444;
    z-index: 9001;
    letter-spacing: 0.1em;
}

/* GRUB menu */
.grub-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.grub-box {
    border: 1px solid #aaa;
    padding: 20px 40px;
    min-width: 400px;
}

.grub-title {
    text-align: center;
    color: #aaa;
    font-size: 0.7rem;
    margin-bottom: 12px;
    letter-spacing: 0.15em;
}

.grub-entry {
    padding: 4px 12px;
    font-size: 0.8rem;
    color: #fff;
}

.grub-entry.selected {
    background: #aaa;
    color: #000;
}

/* Login screen */
.login-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-text {
    font-family: var(--arena-font);
    font-size: 0.85rem;
    color: #ccc;
}

.login-text .typed {
    color: #00ff00;
}

.login-password {
    color: #000;
}

/* ============================================================
   DESKTOP
   ============================================================ */

.arena-desktop {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #0c1520 0%, #0a0a14 40%, #0f0a18 100%);
    display: none;
    flex-direction: column;
}

.arena-desktop.active {
    display: flex;
}

/* Subtle grid pattern overlay */
.arena-desktop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Desktop icons */
.desktop-icons {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 6px;
    align-content: flex-start;
    position: relative;
    z-index: 1;
    max-height: calc(100vh - 44px);
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 10px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
    user-select: none;
}

.desktop-icon:hover {
    background: rgba(255,255,255,0.06);
}

.desktop-icon:active {
    background: rgba(255,255,255,0.1);
}

.desktop-icon .icon-emoji {
    font-size: 2.2rem;
    margin-bottom: 4px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.desktop-icon .icon-label {
    font-size: 0.6rem;
    color: #ddd;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    line-height: 1.3;
}

/* ============================================================
   TASKBAR
   ============================================================ */

.arena-taskbar {
    height: 44px;
    background: linear-gradient(180deg, #1e1e2e 0%, #14141e 100%);
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    padding: 0 12px;
    z-index: 500;
    position: relative;
}

.taskbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.taskbar-box-name {
    font-size: 0.6rem;
    letter-spacing: 0.15em;
    color: var(--box-accent);
    text-transform: uppercase;
    white-space: nowrap;
}

.taskbar-center {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    overflow: hidden;
}

.taskbar-app-btn {
    padding: 4px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--arena-text-dim);
    font-family: var(--arena-font);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.taskbar-app-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--arena-text);
}

.taskbar-app-btn.active {
    background: rgba(255,255,255,0.1);
    border-color: var(--box-accent);
    color: var(--arena-text-bright);
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: flex-end;
}

.taskbar-clock {
    font-size: 0.6rem;
    color: var(--arena-text-dim);
    letter-spacing: 0.08em;
}

.taskbar-score {
    padding: 3px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    font-size: 0.6rem;
    color: var(--box-accent);
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.taskbar-score:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--box-accent);
}

.taskbar-reset-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: 3px;
    padding: 2px 6px;
    cursor: pointer;
    transition: border-color 0.2s, opacity 0.2s;
    opacity: 0.5;
    vertical-align: middle;
    margin-left: 6px;
}
.taskbar-reset-btn:hover {
    border-color: rgba(231,76,60,0.3);
    opacity: 1;
}
.taskbar-reset-btn img {
    display: block;
}

.taskbar-flag-btn {
    padding: 3px 10px;
    background: rgba(231,76,60,0.1);
    border: 1px solid rgba(231,76,60,0.25);
    border-radius: 3px;
    color: var(--arena-danger);
    font-family: var(--arena-font);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.08em;
}

.taskbar-flag-btn:hover {
    background: rgba(231,76,60,0.2);
    border-color: rgba(231,76,60,0.5);
}

/* ============================================================
   WINDOWS
   ============================================================ */

.arena-window {
    position: absolute;
    background: var(--arena-chrome);
    border: 1px solid var(--arena-border);
    border-radius: 8px 8px 4px 4px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    min-width: 400px;
    min-height: 300px;
    transition: box-shadow 0.15s;
    overflow: hidden;
}

.arena-window.focused {
    box-shadow: 0 12px 48px rgba(0,0,0,0.7);
    border-color: rgba(255,255,255,0.12);
}

.arena-window.minimized {
    display: none;
}

/* Title bar */
.window-titlebar {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background: linear-gradient(180deg, #2a2a3a 0%, #222232 100%);
    border-bottom: 1px solid var(--arena-border);
    cursor: grab;
    user-select: none;
    gap: 8px;
    flex-shrink: 0;
}

.window-titlebar:active {
    cursor: grabbing;
}

.window-titlebar .win-icon {
    font-size: 0.85rem;
}

.window-titlebar .win-title {
    flex: 1;
    font-size: 0.65rem;
    color: #aaa;
    letter-spacing: 0.05em;
}

.window-titlebar .win-buttons {
    display: flex;
    gap: 8px;
}

.window-titlebar .win-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: filter 0.15s;
}

.window-titlebar .win-btn:hover { filter: brightness(1.3); }
.win-btn-minimize { background: #f39c12; }
.win-btn-close { background: #e74c3c; }

/* Window content */
.window-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Resize handle */
.window-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
}

.window-resize::after {
    content: '';
    position: absolute;
    bottom: 3px;
    right: 3px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255,255,255,0.15);
    border-bottom: 2px solid rgba(255,255,255,0.15);
}

/* ============================================================
   TERMINAL
   ============================================================ */

.terminal-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #0c0c14;
    font-family: var(--arena-font);
    overflow: hidden;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 10px 12px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #00ff41;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-output .term-prompt {
    color: #00ff41;
}

.terminal-output .term-cmd {
    color: #fff;
}

.terminal-output .term-output {
    color: #aaa;
}

.terminal-output .term-error {
    color: #e74c3c;
}

.terminal-output .term-success {
    color: #2ecc71;
}

.terminal-output .term-info {
    color: #3498db;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    background: #080810;
    border-top: 1px solid rgba(0,255,65,0.1);
    flex-shrink: 0;
}

.terminal-input-line .prompt {
    color: #00ff41;
    font-size: 0.78rem;
    white-space: nowrap;
    margin-right: 4px;
}

.terminal-input-line input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--arena-font);
    font-size: 0.78rem;
    caret-color: #00ff41;
}

.terminal-input-line input:focus {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

/* ============================================================
   BROWSER SIMULATOR
   ============================================================ */

.browser-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
}

/* Browser chrome (dark) */
.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    flex-shrink: 0;
}

.browser-nav-btns {
    display: flex;
    gap: 4px;
}

.browser-nav-btn {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    color: #888;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

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

.browser-nav-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.browser-url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    background: #1a1a28;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 0 12px;
    height: 30px;
}

.browser-url-bar .url-icon {
    color: #808080;
    font-size: 0.7rem;
    margin-right: 6px;
}

.browser-url-bar input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #aaa;
    font-family: var(--arena-font);
    font-size: 0.7rem;
}

.browser-url-bar input:focus {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

.browser-go-btn {
    padding: 4px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #888;
    font-family: var(--arena-font);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
}

.browser-go-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ccc;
}

.browser-src-btn {
    font-family: monospace;
    font-size: 0.7rem;
    letter-spacing: -0.5px;
    padding: 4px 8px;
}

.browser-src-btn.active {
    background: rgba(46,204,113,0.15);
    border-color: rgba(46,204,113,0.4);
    color: #2ecc71;
}

.browser-source-view {
    margin: 0;
    padding: 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #c8e6c9;
    background: #1a1a2e;
    white-space: pre-wrap;
    word-wrap: break-word;
    min-height: 100%;
}

/* Browser page content (light area) */
.browser-page {
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
    color: #222;
    font-family: var(--arena-font-sans);
}

.browser-loading {
    display: none;
    padding: 40px;
    text-align: center;
    color: #888;
    font-size: 0.85rem;
}

.browser-loading.active {
    display: block;
}

/* Web app styles rendered inside browser */
.browser-page .webapp {
    padding: 30px;
    max-width: 800px;
    margin: 0 auto;
}

/* ============================================================
   NOTIFICATIONS
   ============================================================ */

.arena-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 8000;
    padding: 12px 18px;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.75rem;
    max-width: 360px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
    animation: notifSlideIn 0.3s ease-out;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    transition: opacity 0.3s, transform 0.3s;
}

.arena-notification.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

.arena-notification.info {
    background: rgba(10,20,50,0.95);
    border: 1px solid rgba(52,152,219,0.4);
    color: #a0c0e0;
}

.arena-notification.success {
    background: rgba(10,40,10,0.95);
    border: 1px solid rgba(46,204,113,0.4);
    color: #a0e0a0;
}

.arena-notification.warning {
    background: rgba(50,40,10,0.95);
    border: 1px solid rgba(243,156,18,0.4);
    color: #e0d0a0;
}

.arena-notification.danger {
    background: rgba(60,10,10,0.95);
    border: 1px solid rgba(231,76,60,0.4);
    color: #e0a0a0;
}

.notif-icon { font-size: 1.1rem; }
.notif-text { line-height: 1.5; }

@keyframes notifSlideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   HINT PANEL
   ============================================================ */

.hint-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 7000;
    display: none;
}

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

.hint-panel {
    position: fixed;
    top: 0;
    right: -360px;
    width: 350px;
    height: 100vh;
    background: #14141e;
    border-left: 1px solid var(--arena-border);
    z-index: 7001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.5);
}

.hint-panel.active { right: 0; }

.hint-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #1a1a26;
    border-bottom: 1px solid var(--arena-border);
}

.hint-panel-header h3 {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--arena-warning);
    text-transform: uppercase;
}

.hint-panel-close {
    background: none;
    border: none;
    color: #8a8a8a;
    font-size: 1.2rem;
    cursor: pointer;
}

.hint-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.hint-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
}

.hint-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.hint-item-label {
    font-size: 0.7rem;
    color: #aaa;
    letter-spacing: 0.05em;
}

.hint-item-cost {
    font-size: 0.6rem;
    color: var(--arena-danger);
}

.hint-reveal-btn {
    display: block;
    width: 100%;
    padding: 6px;
    background: rgba(243,156,18,0.08);
    border: 1px solid rgba(243,156,18,0.2);
    border-radius: 4px;
    color: var(--arena-warning);
    font-family: var(--arena-font);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.hint-reveal-btn:hover {
    background: rgba(243,156,18,0.15);
    border-color: rgba(243,156,18,0.4);
}

.hint-item-text {
    font-size: 0.75rem;
    color: #ccc;
    line-height: 1.6;
    margin-top: 8px;
}

.hint-item.locked .hint-item-text { display: none; }
.hint-item.revealed .hint-reveal-btn { display: none; }

/* ============================================================
   FLAG SUBMISSION MODAL
   ============================================================ */

.flag-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 6000;
    display: none;
    align-items: center;
    justify-content: center;
}

.flag-modal-overlay.active { display: flex; }

.flag-modal {
    background: #14141e;
    border: 1px solid var(--arena-border);
    border-radius: 10px;
    padding: 30px;
    width: 440px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.flag-modal h3 {
    color: var(--arena-danger);
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.flag-modal-input {
    width: 100%;
    padding: 10px 14px;
    background: #0a0a12;
    border: 1px solid #333;
    color: #ddd;
    font-family: var(--arena-font);
    font-size: 0.85rem;
    border-radius: 4px;
    margin-bottom: 10px;
}

.flag-modal-input:focus {
    outline: none;
    border-color: var(--arena-danger);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

.flag-modal-btns {
    display: flex;
    gap: 8px;
}

.flag-modal-submit {
    flex: 1;
    padding: 8px 20px;
    background: var(--arena-danger);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: var(--arena-font);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s;
}

.flag-modal-submit:hover { background: #c0392b; }

.flag-modal-cancel {
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    color: #888;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    font-family: var(--arena-font);
    font-size: 0.75rem;
    cursor: pointer;
}

.flag-modal-cancel:hover { color: #ccc; }

.flag-modal-msg {
    margin-top: 10px;
    font-size: 0.75rem;
}

.flag-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.flag-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    border: 1px solid #333;
    background: #1a1a22;
    color: #808080;
}

.flag-badge.found {
    border-color: var(--arena-success);
    color: var(--arena-success);
    background: rgba(46,204,113,0.1);
}

/* ============================================================
   COMPLETION MODAL
   ============================================================ */

.completion-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
}

.completion-overlay.active { display: flex; }

.completion-card {
    background: #12121a;
    border: 2px solid var(--arena-success);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 480px;
    box-shadow: 0 0 60px rgba(46,204,113,0.2);
    animation: completionPop 0.4s ease-out;
}

@keyframes completionPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.completion-card h2 {
    color: var(--arena-success);
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.completion-card .box-subtitle {
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.completion-card .final-score {
    font-size: 2.4rem;
    color: #fff;
    font-weight: 700;
    margin: 12px 0;
    text-shadow: 0 0 20px rgba(46,204,113,0.3);
}

.completion-card .score-breakdown {
    text-align: left;
    margin: 16px 0;
    font-size: 0.78rem;
    color: #888;
}

.completion-card .score-breakdown .row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

.completion-card .score-breakdown .row.total {
    border-top: 1px solid #333;
    padding-top: 8px;
    margin-top: 6px;
    color: #ccc;
}

.completion-card .lore-outro {
    color: #8a8a8a;
    font-size: 0.75rem;
    font-style: italic;
    margin: 16px 0;
    line-height: 1.6;
}

.completion-card button {
    margin-top: 16px;
    padding: 10px 30px;
    background: var(--arena-success);
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.completion-card button:hover { background: #27ae60; }

/* ============================================================
   GOD MODE
   ============================================================ */

.god-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: rgba(231,76,60,0.15);
    border-bottom: 1px solid rgba(231,76,60,0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: #e74c3c;
}

body.god-mode .god-banner { display: flex; }
body.god-mode .arena-desktop { top: 28px; }
body.god-mode .arena-taskbar { bottom: 0; }

/* ============================================================
   SCORE DETAIL PANEL
   ============================================================ */

.score-detail-panel {
    position: fixed;
    bottom: 50px;
    right: 12px;
    width: 280px;
    background: #14141e;
    border: 1px solid var(--arena-border);
    border-radius: 8px;
    padding: 16px;
    z-index: 600;
    display: none;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
}

.score-detail-panel.active { display: block; }

.score-detail-panel h4 {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: var(--box-accent);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.score-detail-panel .detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    padding: 3px 0;
    color: #888;
}

.score-detail-panel .detail-row .pos { color: var(--arena-success); }
.score-detail-panel .detail-row .neg { color: var(--arena-danger); }

/* ============================================================
   NOTES APP (simple in-window notepad)
   ============================================================ */

.notes-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1a1a26;
}

.notes-container textarea {
    flex: 1;
    background: #0e0e18;
    color: #ccc;
    border: none;
    padding: 14px;
    font-family: var(--arena-font);
    font-size: 0.78rem;
    line-height: 1.6;
    resize: none;
    outline: none;
}

.notes-container textarea:focus {
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ============================================================
   CO-OP LOBBY OVERLAY
   ============================================================ */

.coop-lobby-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.coop-lobby-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.coop-lobby-card {
    background: #12121a;
    border: 1px solid rgba(155,89,182,0.3);
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 0 80px rgba(155,89,182,0.15);
    animation: completionPop 0.4s ease-out;
}

.coop-lobby-title {
    font-size: 1.1rem;
    color: var(--box-accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.coop-lobby-subtitle {
    font-size: 0.7rem;
    color: #8a8a8a;
    margin-bottom: 28px;
    letter-spacing: 0.1em;
}

.coop-lobby-modes {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 20px;
}

.coop-mode-btn {
    flex: 1;
    max-width: 180px;
    padding: 24px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.coop-mode-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.coop-mode-btn.coop-mode-highlight {
    border-color: rgba(155,89,182,0.3);
    background: rgba(155,89,182,0.05);
}

.coop-mode-btn.coop-mode-highlight:hover {
    border-color: rgba(155,89,182,0.5);
    background: rgba(155,89,182,0.1);
    box-shadow: 0 0 20px rgba(155,89,182,0.15);
}

.coop-mode-icon {
    font-size: 2rem;
}

.coop-mode-label {
    font-family: var(--arena-font);
    font-size: 0.8rem;
    color: #ddd;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.coop-mode-desc {
    font-family: var(--arena-font);
    font-size: 0.6rem;
    color: #8a8a8a;
}

/* Co-Op options (Create / Join) */
.coop-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.coop-option-btn {
    padding: 14px 28px;
    background: rgba(155,89,182,0.08);
    border: 1px solid rgba(155,89,182,0.25);
    border-radius: 8px;
    color: #c0a0e0;
    font-family: var(--arena-font);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coop-option-btn:hover {
    background: rgba(155,89,182,0.15);
    border-color: rgba(155,89,182,0.4);
}

.coop-option-icon {
    font-size: 1rem;
}

/* Room code display */
.coop-room-created {
    margin-top: 16px;
}

.coop-room-label {
    font-size: 0.6rem;
    color: #8a8a8a;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.coop-room-code {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3em;
    text-shadow: 0 0 20px rgba(155,89,182,0.4);
    margin-bottom: 8px;
    user-select: all;
}

.coop-room-hint {
    font-size: 0.6rem;
    color: #808080;
    margin-bottom: 20px;
}

/* Player list in lobby */
.coop-players {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.coop-player {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    font-size: 0.72rem;
}

.coop-player.you {
    border-color: rgba(155,89,182,0.3);
    background: rgba(155,89,182,0.05);
}

.coop-player.waiting {
    opacity: 0.4;
    border-style: dashed;
}

.coop-player.offline {
    opacity: 0.5;
}

.coop-player-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #333;
    flex-shrink: 0;
}

.coop-player-dot.online {
    background: var(--arena-success);
    box-shadow: 0 0 6px rgba(46,204,113,0.5);
}

.coop-player-name {
    flex: 1;
    color: #aaa;
    text-align: left;
}

.coop-player-role {
    font-size: 0.55rem;
    padding: 2px 6px;
    background: rgba(243,156,18,0.1);
    border: 1px solid rgba(243,156,18,0.25);
    border-radius: 3px;
    color: var(--arena-warning);
    letter-spacing: 0.1em;
}

.coop-player-you {
    font-size: 0.55rem;
    padding: 2px 6px;
    background: rgba(155,89,182,0.1);
    border: 1px solid rgba(155,89,182,0.25);
    border-radius: 3px;
    color: #b088d0;
    letter-spacing: 0.1em;
}

/* Start button */
.coop-start-btn {
    margin-top: 16px;
    padding: 12px 40px;
    background: var(--arena-success);
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.08em;
}

.coop-start-btn:hover:not(.disabled) {
    background: #27ae60;
    transform: translateY(-1px);
}

.coop-start-btn.disabled {
    background: #333;
    color: #8a8a8a;
    cursor: not-allowed;
}

/* Join form */
.coop-join-form {
    margin-top: 16px;
}

.coop-join-label {
    font-size: 0.65rem;
    color: #888;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
    display: block;
}

.coop-join-input-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.coop-join-prefix {
    padding: 10px 0 10px 16px;
    background: #0a0a12;
    border: 1px solid #333;
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #888;
    font-family: var(--arena-font);
    font-size: 1rem;
    letter-spacing: 0.2em;
}

.coop-join-input {
    padding: 10px 16px 10px 4px;
    background: #0a0a12;
    border: 1px solid #333;
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: #fff;
    font-family: var(--arena-font);
    font-size: 1rem;
    letter-spacing: 0.2em;
    text-align: left;
    width: 80px;
    text-transform: uppercase;
}

.coop-join-input:focus {
    outline: none;
    border-color: rgba(155,89,182,0.5);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.5);
}

.coop-join-go {
    padding: 10px 20px;
    background: rgba(155,89,182,0.15);
    border: 1px solid rgba(155,89,182,0.3);
    border-radius: 6px;
    color: #c0a0e0;
    font-family: var(--arena-font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.coop-join-go:hover {
    background: rgba(155,89,182,0.25);
    border-color: rgba(155,89,182,0.5);
}

.coop-join-msg {
    margin-top: 10px;
    font-size: 0.72rem;
    min-height: 20px;
}

.coop-error-text { color: var(--arena-danger); }
.coop-loading-text { color: #888; }
.coop-loading { color: #888; font-size: 0.75rem; padding: 20px; }
.coop-error { color: var(--arena-danger); font-size: 0.75rem; padding: 20px; }
.coop-join-status { color: #888; font-size: 0.7rem; margin-top: 12px; }

/* Squad size selection */
.coop-squad-select {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 8px 0 16px;
}

.coop-squad-btn {
    width: 90px;
    padding: 18px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.coop-squad-btn:hover {
    background: rgba(155,89,182,0.08);
    border-color: rgba(155,89,182,0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(155,89,182,0.15);
}

.coop-squad-count {
    font-family: var(--arena-font);
    font-size: 1.6rem;
    font-weight: 700;
    color: #c0a0e0;
    line-height: 1;
}

.coop-squad-label {
    font-family: var(--arena-font);
    font-size: 0.6rem;
    color: #777;
    letter-spacing: 0.15em;
}

.coop-squad-badge {
    display: inline-block;
    font-size: 0.55rem;
    padding: 2px 8px;
    background: rgba(155,89,182,0.12);
    border: 1px solid rgba(155,89,182,0.3);
    border-radius: 3px;
    color: #b088d0;
    letter-spacing: 0.12em;
    vertical-align: middle;
    margin-left: 4px;
}

/* Rejoin prompt */
.coop-rejoin-prompt {
    margin-top: 8px;
}

.coop-rejoin-info {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

.coop-rejoin-status {
    font-size: 0.6rem;
    color: #8a8a8a;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.coop-rejoin-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.coop-rejoin-btn {
    padding: 12px 28px;
    border: 1px solid;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.coop-rejoin-btn.rejoin {
    background: rgba(46,204,113,0.1);
    border-color: rgba(46,204,113,0.3);
    color: var(--arena-success);
}

.coop-rejoin-btn.rejoin:hover {
    background: rgba(46,204,113,0.2);
    border-color: rgba(46,204,113,0.5);
}

.coop-rejoin-btn.decline {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.1);
    color: #888;
}

.coop-rejoin-btn.decline:hover {
    background: rgba(255,255,255,0.06);
    color: #aaa;
}

/* Disband button (lobby) */
.coop-disband-btn {
    margin-top: 12px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(231,76,60,0.2);
    border-radius: 4px;
    color: rgba(231,76,60,0.5);
    font-family: var(--arena-font);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.coop-disband-btn:hover {
    border-color: rgba(231,76,60,0.4);
    color: rgba(231,76,60,0.8);
}

.coop-disband-btn.confirm {
    background: rgba(231,76,60,0.12);
    border-color: var(--arena-danger);
    color: var(--arena-danger);
    animation: disbandPulse 0.6s ease-in-out infinite alternate;
}

@keyframes disbandPulse {
    from { box-shadow: 0 0 0 rgba(231,76,60,0); }
    to { box-shadow: 0 0 12px rgba(231,76,60,0.25); }
}

/* Disband button (in-game panel) */
.coop-panel-host-controls {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 8px;
}

.coop-panel-disband {
    width: 100%;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(231,76,60,0.2);
    border-radius: 4px;
    color: rgba(231,76,60,0.5);
    font-family: var(--arena-font);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.2s;
}

.coop-panel-disband:hover {
    border-color: rgba(231,76,60,0.4);
    color: rgba(231,76,60,0.8);
}

.coop-panel-disband.confirm {
    background: rgba(231,76,60,0.12);
    border-color: var(--arena-danger);
    color: var(--arena-danger);
}

/* Disbanded message */
.coop-disbanded-msg {
    text-align: center;
    padding: 30px 20px;
}

.coop-disbanded-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.coop-disbanded-text {
    font-size: 0.85rem;
    color: var(--arena-danger);
    letter-spacing: 0.05em;
}

/* ============================================================
   CO-OP IN-GAME PANEL (sidebar)
   ============================================================ */

.coop-panel {
    position: fixed;
    top: 0;
    left: -280px;
    width: 270px;
    height: 100vh;
    background: #10101a;
    border-right: 1px solid rgba(155,89,182,0.15);
    z-index: 600;
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

.coop-panel.open { left: 0; }

.coop-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #14141e;
    border-bottom: 1px solid rgba(155,89,182,0.15);
    flex-shrink: 0;
}

.coop-panel-title {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: #9b59b6;
    font-weight: 700;
}

.coop-panel-room {
    font-size: 0.55rem;
    color: #8a8a8a;
    letter-spacing: 0.1em;
    flex: 1;
}

.coop-panel-close {
    background: none;
    border: none;
    color: #808080;
    font-size: 1rem;
    cursor: pointer;
    padding: 0 4px;
}

.coop-panel-close:hover { color: #aaa; }

.coop-panel-section {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.coop-section-label {
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    color: #808080;
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Panel players */
.coop-panel-player {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.68rem;
}

.coop-panel-player.offline { opacity: 0.4; }

.coop-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #444;
    flex-shrink: 0;
}

.coop-dot.online {
    background: var(--arena-success);
    box-shadow: 0 0 4px rgba(46,204,113,0.5);
}

.coop-dot.partial {
    background: var(--arena-warning);
    box-shadow: 0 0 4px rgba(243,156,18,0.4);
}

.coop-panel-player-name {
    color: #aaa;
    flex: 1;
}

.coop-panel-player-badge {
    font-size: 0.45rem;
    padding: 1px 4px;
    background: rgba(243,156,18,0.1);
    border: 1px solid rgba(243,156,18,0.2);
    border-radius: 2px;
    color: var(--arena-warning);
    letter-spacing: 0.1em;
}

/* Activity feed */
.coop-panel-activity {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.coop-activity-empty {
    color: #444;
    font-size: 0.65rem;
    text-align: center;
    padding: 12px;
}

.coop-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 4px 0;
    font-size: 0.62rem;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.coop-activity-icon {
    width: 14px;
    text-align: center;
    flex-shrink: 0;
    color: #8a8a8a;
}

.coop-activity-item.flag_captured .coop-activity-icon { color: var(--arena-success); }
.coop-activity-item.wrong_flag .coop-activity-icon { color: var(--arena-danger); }
.coop-activity-item.hint_revealed .coop-activity-icon { color: var(--arena-warning); }

.coop-activity-content {
    flex: 1;
    min-width: 0;
}

.coop-activity-player {
    color: #888;
    margin-right: 4px;
}

.coop-activity-detail {
    color: #8a8a8a;
}

.coop-activity-time {
    color: #444;
    font-size: 0.55rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Toggle button (floating) */
.coop-toggle-btn {
    position: fixed;
    top: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
    background: rgba(155,89,182,0.1);
    border: 1px solid rgba(155,89,182,0.25);
    border-radius: 50%;
    color: #9b59b6;
    font-size: 1rem;
    cursor: pointer;
    z-index: 601;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coop-toggle-btn:hover {
    background: rgba(155,89,182,0.2);
    border-color: rgba(155,89,182,0.4);
}

.coop-toggle-btn.active {
    left: 280px;
    background: rgba(155,89,182,0.15);
}

/* Taskbar co-op indicator */
.coop-taskbar-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(155,89,182,0.08);
    border: 1px solid rgba(155,89,182,0.2);
    border-radius: 10px;
    font-size: 0.55rem;
    color: #9b59b6;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.15s;
}

.coop-taskbar-indicator:hover {
    background: rgba(155,89,182,0.15);
    border-color: rgba(155,89,182,0.35);
}

/* God mode adjustments for co-op panel */
body.god-mode .coop-panel { top: 28px; height: calc(100vh - 28px); }
body.god-mode .coop-toggle-btn { top: 38px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ============================================================
   PRE/POST CONFIDENCE SURVEY (Sprint AR-14)
   ============================================================ */

.survey-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9600;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.survey-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.survey-card {
    background: #12121a;
    border: 1px solid rgba(52,152,219,0.3);
    border-radius: 12px;
    padding: 32px 36px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 0 60px rgba(52,152,219,0.15);
    animation: completionPop 0.4s ease-out;
}

.survey-title {
    font-size: 0.9rem;
    color: var(--box-accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.survey-subtitle {
    font-size: 0.7rem;
    color: #8a8a8a;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.survey-questions {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 24px;
}

.survey-question-text {
    font-size: 0.75rem;
    color: #c0c0d0;
    margin-bottom: 8px;
    line-height: 1.4;
}

.survey-likert {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.survey-anchor-label {
    font-size: 0.55rem;
    color: #808080;
    min-width: 60px;
    text-align: center;
    letter-spacing: 0.05em;
}

.survey-likert-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #888;
    font-family: var(--arena-font);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
}

.survey-likert-btn:hover {
    background: rgba(52,152,219,0.1);
    border-color: rgba(52,152,219,0.3);
    color: #ccc;
}

.survey-likert-btn.selected {
    background: rgba(52,152,219,0.2);
    border-color: var(--box-accent);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(52,152,219,0.25);
}

.survey-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.survey-submit-btn {
    padding: 10px 28px;
    background: var(--box-accent);
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.survey-submit-btn:disabled {
    background: #333;
    color: #8a8a8a;
    cursor: not-allowed;
}

.survey-submit-btn:not(:disabled):hover {
    filter: brightness(1.2);
}

.survey-skip-btn {
    padding: 10px 20px;
    background: rgba(255,255,255,0.04);
    color: #8a8a8a;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.survey-skip-btn:hover {
    color: #aaa;
    border-color: rgba(255,255,255,0.2);
}

/* ============================================================
   TUTORIAL PANEL (Sprint AR-12)
   Difficulty tiers: easy (guided), normal (objectives), hard (off)
   ============================================================ */

.tutorial-panel {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    z-index: 500;
    font-size: 13px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Pulse animation when a new step unlocks */
.tutorial-panel.tutorial-panel-pulse {
    border-color: var(--box-accent, #3498db);
    box-shadow: 0 0 24px rgba(52,152,219,0.25), 0 4px 20px rgba(0,0,0,0.5);
}

.tutorial-panel.collapsed .tutorial-steps,
.tutorial-panel.collapsed .tutorial-tip,
.tutorial-panel.collapsed .tutorial-progress { display: none; }

.tutorial-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 600;
    color: #eee;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.tutorial-icon {
    font-size: 0.9rem;
}

.tutorial-title {
    flex: 1;
}

/* Difficulty badge in header */
.tutorial-difficulty-badge {
    font-size: 0.5rem;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.tutorial-diff-easy {
    background: rgba(46,204,113,0.12);
    border: 1px solid rgba(46,204,113,0.3);
    color: var(--arena-success);
}

.tutorial-diff-normal {
    background: rgba(52,152,219,0.12);
    border: 1px solid rgba(52,152,219,0.3);
    color: var(--arena-accent);
}

.tutorial-toggle {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}

.tutorial-toggle:hover { color: #ccc; }

/* Progress bar */
.tutorial-progress {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px 4px;
}

.tutorial-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.tutorial-progress-fill {
    height: 100%;
    background: var(--box-accent, #3498db);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.tutorial-progress-label {
    font-size: 0.55rem;
    color: #8a8a8a;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

/* Step list */
.tutorial-steps { padding: 8px 0; }

.tutorial-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    color: #888;
    font-size: 0.72rem;
    transition: all 0.2s ease, background 0.3s ease;
}

.tutorial-step.active {
    color: var(--box-accent, #3498db);
    font-weight: 600;
    background: rgba(52, 152, 219, 0.08);
}

.tutorial-step.completed {
    color: var(--arena-success);
}

.tutorial-step.locked {
    opacity: 0.4;
}

/* Glow animation on newly revealed step */
.tutorial-step.tutorial-step-reveal {
    animation: tutorialStepReveal 0.8s ease-out;
}

@keyframes tutorialStepReveal {
    0% { background: rgba(52,152,219,0.25); box-shadow: inset 0 0 12px rgba(52,152,219,0.3); }
    100% { background: rgba(52,152,219,0.08); box-shadow: inset 0 0 0 transparent; }
}

.step-check {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 0.7rem;
}

.step-text {
    line-height: 1.4;
}

/* Tip area */
.tutorial-tip {
    padding: 10px 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: #aaa;
    font-size: 0.68rem;
    line-height: 1.5;
}

.tutorial-tip strong {
    color: var(--box-accent, #3498db);
}

/* Flash animation for auto-revealed hint */
.tutorial-tip.tutorial-tip-flash {
    animation: tutorialTipFlash 1.5s ease-out;
}

@keyframes tutorialTipFlash {
    0% { background: rgba(52,152,219,0.2); }
    100% { background: transparent; }
}

@media (max-width: 768px) {
    .desktop-icons {
        padding: 12px;
        gap: 4px;
    }
    .desktop-icon { width: 64px; }
    .desktop-icon .icon-emoji { font-size: 1.8rem; }
    .arena-window { min-width: 100vw; min-height: 50vh; }
    .coop-lobby-card { padding: 24px; }
    .coop-lobby-modes { flex-direction: column; align-items: center; }
    .coop-mode-btn { max-width: 240px; }
    .coop-panel { width: 220px; left: -230px; }
    .coop-toggle-btn.active { left: 230px; }
    .survey-card { padding: 20px; }
    .survey-likert-btn { width: 30px; height: 30px; font-size: 0.7rem; }
    .survey-anchor-label { min-width: 40px; font-size: 0.5rem; }
    .tutorial-panel { width: 220px; right: 8px; font-size: 11px; }
    .tutorial-step { font-size: 0.65rem; padding: 5px 10px; }
    .tutorial-difficulty-badge { font-size: 0.45rem; }
}

/* ============================================================
   VS MODE — LOBBY & IN-GAME STYLES
   ============================================================ */

/* VS Mode button in lobby */
.coop-mode-btn.coop-mode-vs {
    border-color: rgba(231,76,60,0.3);
    background: rgba(231,76,60,0.05);
}

.coop-mode-btn.coop-mode-vs:hover {
    border-color: rgba(231,76,60,0.5);
    background: rgba(231,76,60,0.1);
    box-shadow: 0 0 20px rgba(231,76,60,0.15);
}

/* ============================================================
   DIFFICULTY SELECTOR — LOBBY
   ============================================================ */

.coop-difficulty-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem 0 0.5rem;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.coop-difficulty-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.coop-difficulty-options {
    display: flex;
    gap: 0.4rem;
}

.coop-diff-btn {
    padding: 0.35rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    background: transparent;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.coop-diff-btn:hover {
    border-color: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

.coop-diff-btn.coop-diff-active {
    border-color: rgba(46,204,113,0.5);
    background: rgba(46,204,113,0.1);
    color: #2ecc71;
}

.coop-diff-btn.coop-diff-easy.coop-diff-active {
    border-color: rgba(46,204,113,0.5);
    background: rgba(46,204,113,0.1);
    color: #2ecc71;
}

.coop-diff-btn.coop-diff-normal.coop-diff-active {
    border-color: rgba(52,152,219,0.5);
    background: rgba(52,152,219,0.1);
    color: #3498db;
}

.coop-diff-btn.coop-diff-hard.coop-diff-active {
    border-color: rgba(231,76,60,0.5);
    background: rgba(231,76,60,0.1);
    color: #e74c3c;
}

/* VS badge */
.coop-squad-badge.vs-badge {
    background: rgba(231,76,60,0.12);
    border-color: rgba(231,76,60,0.3);
    color: #e74c3c;
}

/* VS format select */
.vs-format-select {
    flex-wrap: wrap;
}

/* VS time limit selection */
.vs-time-select {
    margin-bottom: 20px;
}

.vs-time-label {
    font-size: 0.6rem;
    color: #8a8a8a;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.vs-time-options {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.vs-time-btn {
    padding: 6px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    color: #888;
    font-family: var(--arena-font);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
}

.vs-time-btn:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.15);
    color: #ccc;
}

.vs-time-btn.active {
    background: rgba(231,76,60,0.1);
    border-color: rgba(231,76,60,0.4);
    color: #e74c3c;
}

/* VS option buttons */
.coop-option-btn.vs-option-btn {
    background: rgba(231,76,60,0.08);
    border-color: rgba(231,76,60,0.25);
    color: #e0a0a0;
}

.coop-option-btn.vs-option-btn:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.4);
}

/* VS Start button */
.coop-start-btn.vs-start-btn:not(.disabled) {
    background: #e74c3c;
}

.coop-start-btn.vs-start-btn:hover:not(.disabled) {
    background: #c0392b;
}

/* VS Teams container (lobby) */
.vs-teams-container {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    align-items: flex-start;
}

.vs-team-col {
    flex: 1;
    min-width: 0;
}

.vs-team-header {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 0;
    margin-bottom: 6px;
    border-bottom: 2px solid;
    text-align: center;
}

.vs-team-header.alpha {
    color: #3498db;
    border-color: rgba(52,152,219,0.4);
}

.vs-team-header.bravo {
    color: #e74c3c;
    border-color: rgba(231,76,60,0.4);
}

.vs-divider {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #808080;
    padding: 20px 8px 0;
    letter-spacing: 0.1em;
}

.vs-team-players {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vs-team-assignment {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 12px;
}

.vs-team-assignment strong {
    color: #ccc;
}

/* VS Scoreboard (in-game panel) */
.vs-scoreboard-section {
    padding-bottom: 12px;
}

.vs-scoreboard {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vs-sb-team {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
}

.vs-sb-team.alpha {
    background: rgba(52,152,219,0.08);
    border-left: 3px solid rgba(52,152,219,0.5);
}

.vs-sb-team.bravo {
    background: rgba(231,76,60,0.08);
    border-left: 3px solid rgba(231,76,60,0.5);
}

.vs-sb-divider {
    text-align: center;
    font-size: 0.55rem;
    color: #444;
    letter-spacing: 0.2em;
    padding: 2px 0;
}

.vs-sb-name {
    flex: 1;
    color: #aaa;
}

.vs-sb-score {
    font-weight: 700;
    color: #ddd;
    min-width: 40px;
    text-align: right;
}

.vs-sb-score.completed {
    color: var(--arena-success);
}

.vs-sb-flags {
    font-size: 0.55rem;
    color: #8a8a8a;
    min-width: 45px;
    text-align: right;
}

.vs-my-team {
    font-size: 0.55rem;
    color: #8a8a8a;
    margin-top: 4px;
    text-align: center;
}

/* VS player group labels in panel */
.vs-player-group-label {
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    color: #808080;
    margin-top: 6px;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.vs-player-group-label:first-child {
    margin-top: 0;
}

/* VS activity team tags */
.coop-activity-team {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    font-size: 0.5rem;
    font-weight: 700;
    text-align: center;
    line-height: 14px;
    flex-shrink: 0;
}

.coop-activity-team.alpha {
    background: rgba(52,152,219,0.15);
    color: #3498db;
}

.coop-activity-team.bravo {
    background: rgba(231,76,60,0.15);
    color: #e74c3c;
}

/* VS panel header */
.coop-panel-header.vs-header {
    border-bottom-color: rgba(231,76,60,0.15);
}

.coop-panel.vs-panel {
    border-right-color: rgba(231,76,60,0.15);
}

/* VS taskbar indicator */
.coop-taskbar-indicator.vs-indicator {
    background: rgba(231,76,60,0.08);
    border-color: rgba(231,76,60,0.2);
    color: #e74c3c;
}

.coop-taskbar-indicator.vs-indicator:hover {
    background: rgba(231,76,60,0.15);
    border-color: rgba(231,76,60,0.35);
}

/* VS Result overlay */
.vs-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9500;
    display: none;
    align-items: center;
    justify-content: center;
}

.vs-result-overlay.active { display: flex; }

.vs-result-card {
    background: #12121a;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 480px;
    animation: completionPop 0.4s ease-out;
}

.vs-result-banner {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    margin-bottom: 8px;
}

.vs-result-banner.victory {
    color: var(--arena-success);
    text-shadow: 0 0 30px rgba(46,204,113,0.4);
}

.vs-result-banner.defeat {
    color: var(--arena-danger);
    text-shadow: 0 0 30px rgba(231,76,60,0.4);
}

.vs-result-card {
    border: 2px solid #333;
}

.vs-result-overlay.active .vs-result-card {
    border-color: var(--arena-success);
}

.vs-result-title {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 4px;
}

.vs-result-subtitle {
    font-size: 0.75rem;
    color: #8a8a8a;
    margin-bottom: 20px;
}

.vs-result-scores {
    margin: 16px 0;
}

.vs-score-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.vs-score-row.your-team {
    background: rgba(46,204,113,0.06);
    border: 1px solid rgba(46,204,113,0.15);
}

.vs-score-row.opponent-team {
    background: rgba(231,76,60,0.06);
    border: 1px solid rgba(231,76,60,0.15);
}

.vs-score-team {
    color: #aaa;
    flex: 1;
    text-align: left;
}

.vs-score-flags {
    color: #8a8a8a;
    font-size: 0.65rem;
    margin: 0 12px;
}

.vs-score-points {
    font-weight: 700;
    color: #ddd;
    min-width: 50px;
    text-align: right;
}

.vs-result-card button {
    margin-top: 16px;
    padding: 10px 30px;
    background: var(--arena-success);
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.vs-result-card button:hover { background: #27ae60; }

/* ============================================================
   PHASE/LAYER PROGRESSION (Sprint AR-15)
   ============================================================ */

/* Phase tracker widget in taskbar */
.phase-tracker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    background: rgba(155,89,182,0.06);
    border: 1px solid rgba(155,89,182,0.2);
    border-radius: 10px;
    font-size: 0.6rem;
    color: #b088d0;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.phase-tracker:hover {
    background: rgba(155,89,182,0.12);
    border-color: rgba(155,89,182,0.35);
}

.phase-tracker.all-complete {
    border-color: rgba(46,204,113,0.3);
    color: var(--arena-success);
    background: rgba(46,204,113,0.06);
}

.phase-tracker-icon {
    font-size: 0.7rem;
}

.phase-tracker-text {
    font-size: 0.58rem;
    letter-spacing: 0.03em;
}

/* Phase detail panel */
.phase-panel {
    position: fixed;
    bottom: 50px;
    right: 120px;
    width: 340px;
    max-height: 500px;
    background: #14141e;
    border: 1px solid rgba(155,89,182,0.2);
    border-radius: 10px;
    z-index: 600;
    display: none;
    flex-direction: column;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.6);
    overflow: hidden;
}

.phase-panel.active {
    display: flex;
}

.phase-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1a1a26;
    border-bottom: 1px solid rgba(155,89,182,0.15);
    flex-shrink: 0;
}

.phase-panel-header h4 {
    font-size: 0.65rem;
    letter-spacing: 0.15em;
    color: #b088d0;
    text-transform: uppercase;
    margin: 0;
}

.phase-panel-close {
    background: none;
    border: none;
    color: #8a8a8a;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 2px;
}

.phase-panel-close:hover { color: #aaa; }

.phase-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Individual phase items */
.phase-item {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    transition: all 0.2s;
}

.phase-item.active {
    border-color: rgba(155,89,182,0.3);
    background: rgba(155,89,182,0.04);
}

.phase-item.completed {
    border-color: rgba(46,204,113,0.2);
    background: rgba(46,204,113,0.03);
}

.phase-item.locked {
    opacity: 0.5;
    border-style: dashed;
}

.phase-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.phase-item-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.phase-item-name {
    flex: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ccc;
}

.phase-item.completed .phase-item-name { color: var(--arena-success); }
.phase-item.active .phase-item-name { color: #c0a0e0; }
.phase-item.locked .phase-item-name { color: #8a8a8a; }

.phase-item-status {
    font-size: 0.5rem;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.phase-item.active .phase-item-status {
    background: rgba(155,89,182,0.12);
    border: 1px solid rgba(155,89,182,0.3);
    color: #b088d0;
}

.phase-item.completed .phase-item-status {
    background: rgba(46,204,113,0.1);
    border: 1px solid rgba(46,204,113,0.25);
    color: var(--arena-success);
}

.phase-item.locked .phase-item-status {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #808080;
}

.phase-item-desc {
    font-size: 0.68rem;
    color: #888;
    line-height: 1.5;
    margin-bottom: 6px;
}

.phase-item-time {
    font-size: 0.6rem;
    color: #8a8a8a;
    margin-bottom: 6px;
}

.phase-item-mitre {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.mitre-tag {
    padding: 2px 6px;
    background: rgba(52,152,219,0.08);
    border: 1px solid rgba(52,152,219,0.2);
    border-radius: 3px;
    font-size: 0.55rem;
    color: #6ba8d4;
    letter-spacing: 0.05em;
}

.phase-item-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.phase-flag-badge {
    padding: 2px 6px;
    background: #1a1a22;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 0.55rem;
    color: #808080;
}

.phase-flag-badge.found {
    border-color: var(--arena-success);
    color: var(--arena-success);
    background: rgba(46,204,113,0.08);
}

/* ============================================================
   POST-COMPLETION REPORT (Sprint AR-15)
   ============================================================ */

.report-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9700;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 40px 20px;
}

.report-overlay.active { display: flex; }

.report-card {
    background: #12121a;
    border: 1px solid rgba(46,204,113,0.2);
    border-radius: 12px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 0 60px rgba(46,204,113,0.1);
    animation: completionPop 0.4s ease-out;
    overflow: hidden;
}

.report-header {
    padding: 32px 36px 24px;
    background: linear-gradient(135deg, rgba(46,204,113,0.08) 0%, rgba(52,152,219,0.05) 100%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    text-align: center;
}

.report-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--arena-success);
    letter-spacing: 0.15em;
    margin-bottom: 4px;
}

.report-box-name {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 16px;
    letter-spacing: 0.08em;
}

.report-summary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.report-summary-item {
    font-size: 0.75rem;
    color: #aaa;
}

.report-summary-item strong {
    color: #fff;
    font-size: 0.85rem;
}

.report-summary-divider {
    color: #333;
    font-size: 0.65rem;
}

.report-body {
    padding: 24px 36px;
}

.report-section {
    margin-bottom: 24px;
}

.report-section:last-child { margin-bottom: 0; }

.report-section-title {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--box-accent);
    text-transform: uppercase;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Attack chain */
.report-chain-step {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    font-size: 0.75rem;
    transition: background 0.15s;
}

.report-chain-step.completed {
    background: rgba(46,204,113,0.04);
    border-left: 3px solid rgba(46,204,113,0.4);
}

.report-chain-step.incomplete {
    background: rgba(255,255,255,0.02);
    border-left: 3px solid rgba(255,255,255,0.1);
    opacity: 0.6;
}

.report-chain-num {
    color: #8a8a8a;
    font-weight: 700;
    min-width: 20px;
}

.report-chain-icon {
    font-size: 0.9rem;
}

.report-chain-name {
    flex: 1;
    color: #ccc;
}

.report-chain-step.completed .report-chain-name { color: var(--arena-success); }

.report-chain-time {
    color: #8a8a8a;
    font-size: 0.65rem;
    font-family: var(--arena-font);
}

.report-chain-empty {
    color: #808080;
    font-size: 0.72rem;
    text-align: center;
    padding: 12px;
}

/* MITRE tags in report */
.report-mitre-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.report-mitre-tag {
    padding: 4px 10px;
    background: rgba(52,152,219,0.08);
    border: 1px solid rgba(52,152,219,0.2);
    border-radius: 4px;
    font-size: 0.65rem;
    color: #6ba8d4;
    letter-spacing: 0.05em;
}

/* Score breakdown in report */
.report-score-table {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-score-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 12px;
    font-size: 0.72rem;
    color: #888;
    border-radius: 3px;
}

.report-score-row:nth-child(odd) {
    background: rgba(255,255,255,0.02);
}

.report-score-row .pos { color: var(--arena-success); }
.report-score-row .neg { color: var(--arena-danger); }

.report-score-row.total {
    border-top: 1px solid #333;
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 700;
    color: #ddd;
    font-size: 0.8rem;
}

/* Performance metrics grid */
.report-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.report-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 6px;
}

.report-metric-label {
    font-size: 0.65rem;
    color: #888;
}

.report-metric-value {
    font-size: 0.72rem;
    color: #ccc;
    font-weight: 600;
}

/* Recommendations */
.report-recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
}

.report-rec-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.report-rec-text {
    font-size: 0.72rem;
    color: #aaa;
    line-height: 1.5;
}

/* Report action buttons */
.report-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 36px 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.report-export-btn {
    padding: 10px 24px;
    background: rgba(52,152,219,0.1);
    border: 1px solid rgba(52,152,219,0.3);
    border-radius: 6px;
    color: var(--box-accent);
    font-family: var(--arena-font);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.report-export-btn:hover {
    background: rgba(52,152,219,0.2);
    border-color: rgba(52,152,219,0.5);
}

.report-close-btn {
    padding: 10px 24px;
    background: var(--arena-success);
    color: #0a0a0f;
    border: none;
    border-radius: 6px;
    font-family: var(--arena-font);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
}

.report-close-btn:hover { background: #27ae60; }

/* ============================================================
   HINT COST PREVIEW (Sprint AR-15)
   ============================================================ */

.hint-cost-preview {
    font-size: 0.65rem;
    color: #777;
    margin-bottom: 8px;
    padding: 6px 10px;
    background: rgba(243,156,18,0.04);
    border-radius: 4px;
    line-height: 1.4;
}

.hint-cost-preview strong {
    color: var(--arena-warning);
}

.hint-item-cost.spent {
    color: #808080;
    font-style: italic;
}

.hint-confirm {
    margin-top: 8px;
    padding: 10px;
    background: rgba(231,76,60,0.05);
    border: 1px solid rgba(231,76,60,0.15);
    border-radius: 6px;
}

.hint-confirm-text {
    font-size: 0.68rem;
    color: #c0a0a0;
    display: block;
    margin-bottom: 8px;
    line-height: 1.4;
}

.hint-confirm-btns {
    display: flex;
    gap: 8px;
}

.hint-confirm-yes {
    flex: 1;
    padding: 6px 12px;
    background: rgba(243,156,18,0.12);
    border: 1px solid rgba(243,156,18,0.3);
    border-radius: 4px;
    color: var(--arena-warning);
    font-family: var(--arena-font);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.hint-confirm-yes:hover {
    background: rgba(243,156,18,0.2);
    border-color: rgba(243,156,18,0.5);
}

.hint-confirm-no {
    padding: 6px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #888;
    font-family: var(--arena-font);
    font-size: 0.68rem;
    cursor: pointer;
    transition: all 0.15s;
}

.hint-confirm-no:hover {
    background: rgba(255,255,255,0.08);
    color: #ccc;
}

/* ============================================================
   COMPLETION CARD ENHANCEMENTS (Sprint AR-15)
   ============================================================ */

.completion-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.completion-report-btn {
    padding: 10px 24px;
    background: rgba(52,152,219,0.1);
    border: 1px solid rgba(52,152,219,0.3);
    border-radius: 6px;
    color: var(--box-accent);
    font-family: var(--arena-font);
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}

.completion-report-btn:hover {
    background: rgba(52,152,219,0.2);
    border-color: rgba(52,152,219,0.5);
}

/* Override completion-card button to remove old single-button margin */
.completion-card .completion-btns button {
    margin-top: 0;
}

/* Rate-limited submit button */
.flag-modal-submit.rate-limited {
    background: #555;
    color: #999;
    cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE ADDITIONS (Sprint AR-15)
   ============================================================ */

@media (max-width: 768px) {
    .phase-tracker { font-size: 0.55rem; padding: 2px 6px; }
    .phase-panel { width: 280px; right: 10px; }
    .report-card { margin: 10px; }
    .report-body { padding: 16px 20px; }
    .report-header { padding: 20px; }
    .report-metrics-grid { grid-template-columns: 1fr; }
    .report-actions { flex-direction: column; align-items: center; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .boot-screen,
    .boot-cursor,
    .desktop-icon,
    .taskbar-app-btn,
    .taskbar-score,
    .taskbar-flag-btn,
    .arena-window,
    .window-titlebar .win-btn,
    .browser-nav-btn,
    .browser-go-btn,
    .arena-notification,
    .arena-notification.fade-out,
    .hint-panel,
    .hint-reveal-btn,
    .completion-card,
    .completion-card button,
    .coop-lobby-card,
    .coop-lobby-overlay,
    .coop-mode-btn,
    .coop-option-btn,
    .coop-start-btn,
    .coop-join-go,
    .coop-squad-btn,
    .coop-rejoin-btn,
    .coop-disband-btn,
    .coop-disband-btn.confirm,
    .coop-panel-disband,
    .coop-panel,
    .coop-toggle-btn,
    .coop-taskbar-indicator,
    .coop-diff-btn,
    .vs-time-btn,
    .vs-result-card,
    .report-card,
    .survey-overlay,
    .survey-card,
    .survey-likert-btn,
    .survey-submit-btn,
    .survey-skip-btn,
    .tutorial-panel,
    .tutorial-step,
    .tutorial-step.tutorial-step-reveal,
    .tutorial-tip.tutorial-tip-flash,
    .tutorial-progress-fill,
    .phase-tracker,
    .phase-item,
    .report-chain-step,
    .report-export-btn,
    .report-close-btn,
    .completion-report-btn,
    .hint-confirm-yes,
    .hint-confirm-no,
    .flag-modal-submit,
    .bt-phase-dot,
    .bt-phase-connector,
    .winre-bsod-bar-fill,
    .winre-spinner,
    .ev-row,
    .hw-component,
    .tp-node,
    .pd-tab-btn {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================================
   BLUE TEAM PHASE BAR
   Horizontal stepper rendered above desktop icons.
   Active only when config.blueTeamMode = true.
   ============================================================ */

.bt-phase-bar {
    flex-shrink: 0;
    background: rgba(10, 20, 30, 0.85);
    border-bottom: 1px solid rgba(46, 204, 113, 0.15);
    padding: 8px 24px;
    z-index: 10;
    position: relative;
}

.bt-phase-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

/* Individual phase step */
.bt-phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
    position: relative;
}

.bt-phase-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #808080;
    transition: all 0.3s ease;
}

.bt-phase-dot-inner {
    line-height: 1;
}

.bt-phase-step.done .bt-phase-dot {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.6);
    color: var(--arena-success);
}

.bt-phase-step.active .bt-phase-dot {
    background: rgba(52, 152, 219, 0.2);
    border-color: var(--box-accent);
    color: #fff;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.3);
}

.bt-phase-label {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #444;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.bt-phase-step.done .bt-phase-label {
    color: rgba(46, 204, 113, 0.7);
}

.bt-phase-step.active .bt-phase-label {
    color: var(--box-accent);
    font-weight: 600;
}

/* Connector line between steps */
.bt-phase-connector {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.06);
    min-width: 30px;
    margin-bottom: 14px; /* align with dot vertical center */
    transition: background 0.3s ease;
}

.bt-phase-connector.done {
    background: rgba(46, 204, 113, 0.4);
}

/* ============================================================
   GUI WINDOW FRAMEWORK — SHARED CONTAINER
   ============================================================ */

.gui-window-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ============================================================
   EVENT VIEWER WINDOW
   ============================================================ */

.ev-viewer {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--arena-chrome);
    overflow: hidden;
    font-family: var(--arena-font);
}

.ev-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    flex-shrink: 0;
}

.ev-filter-id,
.ev-filter-src {
    padding: 4px 8px;
    background: #0a0a12;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ccc;
    font-family: var(--arena-font);
    font-size: 0.68rem;
    outline: none;
    transition: border-color 0.15s;
}

.ev-filter-id:focus,
.ev-filter-src:focus {
    border-color: var(--box-accent);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.ev-filter-id { min-width: 130px; }
.ev-filter-src { flex: 1; max-width: 200px; }

.ev-count {
    font-size: 0.6rem;
    color: var(--arena-text-dim);
    letter-spacing: 0.05em;
    margin-left: auto;
}

.ev-table-wrap {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
}

.ev-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.68rem;
    color: var(--arena-text);
}

.ev-table thead th {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid var(--arena-border);
    color: var(--arena-text-dim);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ev-table tbody .ev-row {
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.1s;
}

.ev-table tbody .ev-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.ev-table tbody .ev-row.ev-row-expanded {
    background: rgba(52, 152, 219, 0.06);
}

.ev-table td {
    padding: 5px 10px;
    vertical-align: top;
    line-height: 1.4;
}

.ev-ts { color: var(--arena-text-dim); white-space: nowrap; font-size: 0.62rem; }
.ev-id { color: var(--arena-warning); font-weight: 600; white-space: nowrap; }
.ev-src { color: #a0c0e0; white-space: nowrap; }
.ev-cat { color: #888; white-space: nowrap; }
.ev-desc { color: #ccc; }

/* Category color coding */
.ev-table tbody .evcat-error .ev-cat,
.ev-table tbody .evcat-failure .ev-cat { color: var(--arena-danger); }
.ev-table tbody .evcat-warning .ev-cat { color: var(--arena-warning); }
.ev-table tbody .evcat-success .ev-cat,
.ev-table tbody .evcat-audit-success .ev-cat { color: var(--arena-success); }

/* Expanded detail row */
.ev-detail-row .ev-detail-cell {
    padding: 8px 16px 12px 28px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--arena-border);
    font-size: 0.65rem;
    color: #a0b0c0;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: var(--arena-font);
}

/* ============================================================
   TREE PANEL WINDOW
   ============================================================ */

.tp-panel {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: var(--arena-chrome);
    font-family: var(--arena-font);
}

.tp-left {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--arena-border);
    overflow: hidden;
}

.tp-tree-header {
    padding: 7px 12px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--arena-text-dim);
    text-transform: uppercase;
    flex-shrink: 0;
}

.tp-tree {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

/* Tree node */
.tp-node {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    color: var(--arena-text);
    cursor: pointer;
    user-select: none;
    border-radius: 3px;
    margin: 0 4px;
    transition: background 0.1s;
}

.tp-node:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tp-node.selected {
    background: rgba(52, 152, 219, 0.12);
    color: #a0c8f0;
}

.tp-toggle {
    font-size: 0.5rem;
    color: var(--arena-text-dim);
    width: 12px;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.tp-toggle-spacer {
    width: 12px;
    flex-shrink: 0;
}

.tp-node-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-children {
    /* children shown/hidden via JS */
}

.tp-divider {
    width: 4px;
    background: rgba(255, 255, 255, 0.03);
    cursor: col-resize;
    flex-shrink: 0;
}

.tp-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.tp-detail-header {
    padding: 7px 14px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--arena-text-dim);
    text-transform: uppercase;
    flex-shrink: 0;
}

.tp-detail-body {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    font-size: 0.7rem;
    color: #888;
    line-height: 1.6;
}

/* Node detail table */
.tp-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.tp-detail-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tp-detail-key {
    color: var(--arena-text-dim);
    padding: 4px 12px 4px 0;
    white-space: nowrap;
    vertical-align: top;
    min-width: 120px;
    font-size: 0.65rem;
    letter-spacing: 0.04em;
}

.tp-detail-val {
    color: #ccc;
    padding: 4px 0;
    word-break: break-all;
}

/* ============================================================
   PROPERTIES DIALOG WINDOW
   ============================================================ */

.pd-dialog {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--arena-chrome);
    font-family: var(--arena-font-sans);
    overflow: hidden;
}

.pd-tab-bar {
    display: flex;
    align-items: flex-end;
    padding: 0 10px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    gap: 2px;
    flex-shrink: 0;
    overflow-x: auto;
}

.pd-tab-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    color: var(--arena-text-dim);
    font-family: var(--arena-font);
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.pd-tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--arena-text);
}

.pd-tab-btn.active {
    background: var(--arena-chrome);
    border-color: var(--arena-border);
    border-bottom-color: var(--arena-chrome);
    color: var(--arena-text-bright);
}

.pd-tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.pd-tab-panel {
    display: none;
}

.pd-tab-panel.active {
    display: block;
}

.pd-field-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.pd-field-label {
    font-size: 0.68rem;
    color: var(--arena-text-dim);
    min-width: 140px;
    flex-shrink: 0;
    text-align: right;
}

.pd-field-value {
    font-size: 0.7rem;
    color: var(--arena-text);
    word-break: break-all;
}

.pd-field-input {
    flex: 1;
    padding: 4px 8px;
    background: #0a0a12;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    color: #ddd;
    font-family: var(--arena-font);
    font-size: 0.68rem;
    outline: none;
    transition: border-color 0.15s;
}

.pd-field-input:focus {
    border-color: var(--box-accent);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.pd-field-checkbox {
    width: 14px;
    height: 14px;
    accent-color: var(--box-accent);
    cursor: pointer;
}

.pd-empty {
    padding: 20px;
    color: var(--arena-text-dim);
    font-size: 0.72rem;
    text-align: center;
}

.pd-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--arena-border);
    background: var(--arena-chrome-light);
    flex-shrink: 0;
}

.pd-apply-btn,
.pd-ok-btn {
    padding: 5px 18px;
    border-radius: 3px;
    font-family: var(--arena-font);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s;
}

.pd-apply-btn {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    color: var(--box-accent);
}

.pd-apply-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    border-color: rgba(52, 152, 219, 0.5);
}

.pd-ok-btn {
    background: var(--box-accent);
    border: 1px solid var(--box-accent);
    color: #0a0a0f;
    font-weight: 700;
}

.pd-ok-btn:hover {
    filter: brightness(1.15);
}

/* ============================================================
   HARDWARE INSPECTOR WINDOW
   ============================================================ */

.hw-inspector {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #0a0a12;
    font-family: var(--arena-font);
}

.hw-svg-wrap {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-width: 0;
}

.hw-svg {
    width: 100%;
    height: 100%;
    max-height: 100%;
}

/* SVG component hover/selected state via JS class */
.hw-svg .hw-component rect {
    transition: filter 0.15s;
}

.hw-svg .hw-component:hover rect {
    filter: brightness(1.4);
}

.hw-svg .hw-component.selected rect {
    filter: brightness(1.6);
    stroke-width: 2.5;
}

.hw-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-left: 1px solid var(--arena-border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hw-sidebar-header {
    padding: 7px 12px;
    background: var(--arena-chrome-light);
    border-bottom: 1px solid var(--arena-border);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--arena-text-dim);
    text-transform: uppercase;
    flex-shrink: 0;
}

.hw-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    border-bottom: 1px solid var(--arena-border);
}

.hw-list-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 10px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: background 0.1s;
    border-radius: 3px;
    margin: 0 4px;
}

.hw-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hw-list-item.selected {
    background: rgba(52, 152, 219, 0.1);
}

.hw-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.hw-list-label {
    flex: 1;
    color: var(--arena-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hw-list-status {
    font-size: 0.55rem;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hw-detail-panel {
    padding: 12px;
    font-size: 0.65rem;
    color: #888;
    line-height: 1.6;
    min-height: 80px;
    flex-shrink: 0;
}

.hw-detail-panel strong {
    display: block;
    color: #ccc;
    font-size: 0.72rem;
    margin-bottom: 4px;
}

.hw-detail-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: 6px;
}

.hw-status-ok { background: rgba(46,204,113,0.1); color: var(--arena-success); border: 1px solid rgba(46,204,113,0.3); }
.hw-status-warn { background: rgba(243,156,18,0.1); color: var(--arena-warning); border: 1px solid rgba(243,156,18,0.3); }
.hw-status-fail { background: rgba(231,76,60,0.1); color: var(--arena-danger); border: 1px solid rgba(231,76,60,0.3); }
.hw-status-unknown { background: rgba(255,255,255,0.04); color: #808080; border: 1px solid rgba(255,255,255,0.08); }

.hw-detail-text {
    color: #a0b0b8;
    font-size: 0.65rem;
    line-height: 1.5;
    margin-top: 4px;
}

/* ============================================================
   WINRE BOOT SEQUENCE
   All WinRE screens share .winre-screen as the root.
   ============================================================ */

.winre-screen {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ── BSOD ── */
.winre-bsod {
    background: #0078d7;
}

.winre-bsod-inner {
    max-width: 600px;
    padding: 60px 40px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.winre-bsod-sad {
    font-size: 5rem;
    font-weight: 100;
    margin-bottom: 24px;
    line-height: 1;
}

.winre-bsod-title {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 16px;
    line-height: 1.4;
}

.winre-bsod-detail {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 32px;
    line-height: 1.5;
}

.winre-bsod-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.winre-bsod-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.winre-bsod-bar-fill {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.08s linear;
}

.winre-bsod-pct {
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.winre-bsod-code {
    font-size: 0.65rem;
    opacity: 0.5;
    letter-spacing: 0.05em;
    margin-top: 20px;
}

/* ── Restarting / Preparing ── */
.winre-restart,
.winre-preparing {
    background: #000;
    gap: 20px;
}

.winre-restart-label,
.winre-preparing-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.winre-win-logo {
    margin-bottom: 12px;
}

.winre-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: winreSpinAnim 0.8s linear infinite;
}

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

/* ── Choose an option / Troubleshoot / Advanced ── */
.winre-choose,
.winre-troubleshoot,
.winre-advanced,
.winre-shutdown {
    background: #1b1b1b;
}

.winre-choose-inner {
    width: 100%;
    max-width: 680px;
    padding: 40px 40px 30px;
}

.winre-advanced-inner {
    max-width: 780px;
}

.winre-choose-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    font-weight: 300;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
}

.winre-choose-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Standard option button (Choose an option, Troubleshoot) */
.winre-opt-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    min-width: 200px;
    text-align: left;
}

.winre-opt-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.winre-opt-icon {
    font-size: 1.8rem;
    line-height: 1;
    min-width: 36px;
    text-align: center;
}

.winre-opt-label {
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 2px;
}

.winre-opt-sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.4;
}

/* Advanced options grid (2-column) */
.winre-advanced-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.winre-adv-btn {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
}

.winre-adv-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.winre-adv-icon {
    font-size: 1.5rem;
    line-height: 1;
    min-width: 30px;
    text-align: center;
    margin-top: 2px;
}

.winre-adv-label {
    font-size: 0.8rem;
    font-weight: 400;
    margin-bottom: 4px;
}

.winre-adv-sub {
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.4;
}

/* Back button */
.winre-back-btn {
    margin-top: 20px;
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.5);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.winre-back-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
}

/* Shutdown screen */
.winre-shutdown-label {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    font-weight: 300;
    letter-spacing: 0.05em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bt-phase-bar { padding: 6px 12px; }
    .bt-phase-step { min-width: 60px; }
    .bt-phase-label { font-size: 0.48rem; }
    .bt-phase-connector { min-width: 16px; }
    .winre-advanced-grid { grid-template-columns: 1fr; }
    .winre-choose-options { flex-direction: column; }
    .winre-opt-btn { min-width: unset; }
    .tp-left { width: 160px; }
    .hw-sidebar { width: 160px; }
}
