/* =========================================================
   THE VICKY MACHINE™
   FUTURISTIC CONTROL CONSOLE
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');


/* =========================================================
   GLOBAL
   ========================================================= */

* {
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            #202020 0%,
            #0d0d0d 45%,
            #050505 100%
        );

    color: #e8e8e8;

    font-family: "Inter", sans-serif;

    overflow-x: hidden;
}


/* Subtle technical grid */

body::before {
    content: "";

    position: fixed;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255,255,255,0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,0.025) 1px,
            transparent 1px
        );

    background-size: 40px 40px;

    mask-image: linear-gradient(
        to bottom,
        black,
        transparent 90%
    );

    pointer-events: none;
    z-index: -1;
}


/* =========================================================
   MACHINE CONTAINER
   ========================================================= */

.machine {
    width: min(920px, calc(100% - 30px));

    margin: 0 auto;

    padding: 70px 0 50px;
}


/* =========================================================
   HEADER
   ========================================================= */

header {
    text-align: center;

    margin-bottom: 45px;
}

header h1 {
    margin: 0;

    font-family: "JetBrains Mono", monospace;

    font-size: clamp(30px, 6vw, 52px);

    font-weight: 700;

    letter-spacing: 4px;

    color: #f1f1f1;

    text-shadow:
        0 0 20px rgba(255,255,255,0.08);
}

header p {
    margin-top: 14px;

    color: #666;

    font-family: "JetBrains Mono", monospace;

    font-size: 12px;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* =========================================================
   STATS
   ========================================================= */

.stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 25px;
}

.stat {
    position: relative;

    display: flex;
    flex-direction: column;

    align-items: center;

    padding: 18px 10px;

    background:
        linear-gradient(
            145deg,
            #151515,
            #0d0d0d
        );

    border: 1px solid #252525;

    border-radius: 10px;

    box-shadow:
        inset 0 1px rgba(255,255,255,0.025);

    transition:
        border-color 0.25s ease,
        transform 0.25s ease;
}

.stat:hover {
    border-color: #444;

    transform: translateY(-2px);
}

.stat-label {
    margin-bottom: 7px;

    color: #666;

    font-family: "JetBrains Mono", monospace;

    font-size: 9px;

    font-weight: 600;

    letter-spacing: 2px;
}

.stat span:last-child {
    font-family: "JetBrains Mono", monospace;

    font-size: 24px;

    font-weight: 700;

    color: #ddd;
}


/* =========================================================
   MAIN DISPLAY
   ========================================================= */

.display {
    position: relative;

    min-height: 300px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    padding: 55px 40px;

    background:
        radial-gradient(
            circle at center,
            #181818,
            #0b0b0b 70%
        );

    border: 1px solid #303030;

    border-radius: 14px;

    box-shadow:
        0 20px 60px rgba(0,0,0,0.45),
        inset 0 0 50px rgba(255,255,255,0.015);

    overflow: hidden;
}


/* Decorative machine lines */

.display::before,
.display::after {
    content: "";

    position: absolute;

    height: 1px;

    width: 35%;

    background:
        linear-gradient(
            90deg,
            transparent,
            #555,
            transparent
        );

    opacity: 0.5;
}

.display::before {
    top: 0;
}

.display::after {
    bottom: 0;
}


/* =========================================================
   STATUS
   ========================================================= */

#status {
    margin-bottom: 25px;

    color: #777;

    font-family: "JetBrains Mono", monospace;

    font-size: 10px;

    font-weight: 600;

    letter-spacing: 3px;

    text-transform: uppercase;
}


/* =========================================================
   MISSION
   ========================================================= */

#mission {
    max-width: 720px;

    text-align: center;

    font-family: "Inter", sans-serif;

    font-size: clamp(20px, 4vw, 30px);

    line-height: 1.45;

    font-weight: 600;

    color: #f2f2f2;

    text-shadow:
        0 0 25px rgba(255,255,255,0.05);
}


/* =========================================================
   DETAILS
   ========================================================= */

#details {
    display: flex;

    justify-content: center;

    gap: 20px;

    margin-top: 30px;
}

#category,
#difficulty {
    padding: 7px 12px;

    border: 1px solid #292929;

    border-radius: 5px;

    background: #101010;

    color: #777;

    font-family: "JetBrains Mono", monospace;

    font-size: 9px;

    letter-spacing: 1.5px;
}


/* =========================================================
   COMMENT
   ========================================================= */

#comment {
    max-width: 650px;

    margin-top: 30px;

    padding-top: 20px;

    border-top: 1px solid #242424;

    text-align: center;

    color: #666;

    font-family: "JetBrains Mono", monospace;

    font-size: 11px;

    line-height: 1.6;

    font-style: italic;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.buttons {
    display: flex;

    justify-content: center;

    gap: 12px;

    margin: 25px 0 35px;
}

.buttons button {
    position: relative;

    padding: 16px 28px;

    border: 1px solid #444;

    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #252525,
            #161616
        );

    color: #eee;

    font-family: "JetBrains Mono", monospace;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.buttons button:hover:not(:disabled) {
    border-color: #777;

    background:
        linear-gradient(
            180deg,
            #303030,
            #1b1b1b
        );

    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(0,0,0,0.35);
}

.buttons button:active:not(:disabled) {
    transform: translateY(1px);

    box-shadow: none;
}

.buttons button:disabled {
    opacity: 0.25;

    cursor: not-allowed;
}


/* Main machine button */

#machineButton {
    min-width: 210px;
}


/* Complete button */

#completeButton {
    min-width: 150px;

    background:
        linear-gradient(
            180deg,
            #1e1e1e,
            #121212
        );
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    text-align: center;

    margin-bottom: 40px;
}

footer p {
    margin: 0;

    color: #444;

    font-family: "JetBrains Mono", monospace;

    font-size: 9px;

    letter-spacing: 2px;

    text-transform: uppercase;
}


/* =========================================================
   ARCHIVES
   ========================================================= */

.archives {
    margin-top: 25px;

    padding: 30px;

    background:
        linear-gradient(
            145deg,
            #111,
            #090909
        );

    border: 1px solid #252525;

    border-radius: 14px;

    box-shadow:
        0 15px 45px rgba(0,0,0,0.3);
}


/* =========================================================
   ARCHIVE STATS
   ========================================================= */

.archive-stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 10px;

    margin-bottom: 30px;

    padding-bottom: 25px;

    border-bottom: 1px solid #222;
}

.archive-stat {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 7px;

    padding: 10px;
}

.archive-stat-label {
    color: #555;

    font-family: "JetBrains Mono", monospace;

    font-size: 8px;

    letter-spacing: 2px;
}

.archive-stat span:last-child {
    color: #ccc;

    font-family: "JetBrains Mono", monospace;

    font-size: 19px;

    font-weight: 700;
}


/* =========================================================
   ACHIEVEMENTS
   ========================================================= */

.achievements {
    margin-bottom: 30px;

    padding-bottom: 25px;

    border-bottom: 1px solid #222;
}

.achievements-header {
    text-align: center;

    margin-bottom: 20px;
}

.achievements-header h2,
.archives-header h2 {
    margin: 0;

    color: #ddd;

    font-family: "JetBrains Mono", monospace;

    font-size: 15px;

    letter-spacing: 2px;
}

.achievements-header p,
.archives-header p {
    margin-top: 8px;

    color: #555;

    font-size: 11px;
}


/* Achievement cards */

.achievement {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 15px;

    margin-bottom: 8px;

    background: #0d0d0d;

    border: 1px solid #202020;

    border-radius: 7px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.achievement:hover {
    background: #121212;

    border-color: #333;

    transform: translateX(3px);
}

.achievement.locked {
    opacity: 0.3;
}

.achievement.unlocked {
    border-color: #3d3d3d;

    box-shadow:
        inset 3px 0 #777;
}

.achievement-icon {
    width: 35px;

    text-align: center;

    font-size: 22px;
}

.achievement-info {
    flex: 1;
}

.achievement-name {
    color: #ddd;

    font-family: "JetBrains Mono", monospace;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1px;
}

.achievement-description {
    margin-top: 5px;

    color: #555;

    font-size: 10px;

    line-height: 1.5;
}


/* Achievement progress */
.achievement-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
}

.achievement-progress-bar {
    flex: 1;
    height: 4px;
    overflow: hidden;
    background: #171717;
    border: 1px solid #252525;
    border-radius: 999px;
}

.achievement-progress-fill {
    height: 100%;
    background: #777;
    border-radius: inherit;
    transition: width 0.35s ease;
}

.achievement-progress-text {
    min-width: 62px;
    text-align: right;
    color: #555;
    font-family: "JetBrains Mono", monospace;
    font-size: 8px;
    letter-spacing: 0.5px;
}

.achievement.unlocked .achievement-progress-fill {
    background: #aaa;
}

.achievement.unlocked .achievement-progress-text {
    color: #888;
}


/* =========================================================
   ARCHIVE HEADER
   ========================================================= */

.archives-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;

    text-align: center;
}



/* =========================================================
   RESET
   ========================================================= */

.reset-section {
    margin-top: 30px;

    padding-top: 20px;

    border-top: 1px solid #202020;

    text-align: center;
}

#resetButton {
    padding: 9px 18px;

    border: 1px solid #292929;

    border-radius: 5px;

    background: transparent;

    color: #555;

    font-family: "JetBrains Mono", monospace;

    font-size: 8px;

    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

#resetButton:hover {
    border-color: #555;

    background: #161616;

    color: #aaa;
}


/* =========================================================
   ACHIEVEMENT POPUP
   ========================================================= */

.achievement-popup {
    position: fixed;

    top: 25px;
    right: 25px;

    z-index: 9999;

    display: flex;

    align-items: center;

    gap: 15px;

    width: min(350px, calc(100vw - 30px));

    padding: 18px;

    background:
        linear-gradient(
            145deg,
            #1a1a1a,
            #101010
        );

    border: 1px solid #444;

    border-radius: 9px;

    box-shadow:
        0 20px 50px rgba(0,0,0,0.6);

    transform: translateX(450px);

    opacity: 0;

    pointer-events: none;

    transition:
        transform 0.4s cubic-bezier(.2,.8,.2,1),
        opacity 0.4s ease;
}

.achievement-popup.show {
    transform: translateX(0);

    opacity: 1;
}

.popup-icon {
    font-size: 30px;
}

.popup-content {
    flex: 1;
}

.popup-title {
    margin-bottom: 5px;

    color: #666;

    font-family: "JetBrains Mono", monospace;

    font-size: 8px;

    letter-spacing: 2px;
}

.popup-name {
    color: #eee;

    font-family: "JetBrains Mono", monospace;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 1px;
}

.popup-description {
    margin-top: 5px;

    color: #666;

    font-size: 10px;

    line-height: 1.5;
}

/* ================================
   INCOMING CHALLENGE POPUP
================================ */

.challenge-popup {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;

    width: 360px;
    max-width: calc(100vw - 60px);

    display: flex;
    gap: 16px;

    padding: 20px;

    border: 1px solid #444;
    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            #161616,
            #0c0c0c
        );

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.6);

    opacity: 0;
    transform: translateX(120%);
    pointer-events: none;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;

}

.challenge-popup.visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.challenge-popup-icon {
    flex-shrink: 0;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #444;
    border-radius: 7px;

    color: #aaa;
    font-size: 18px;
}

.challenge-popup-content {
    flex: 1;
}

.challenge-popup-title {
    margin-bottom: 6px;

    color: #888;

    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.challenge-popup-from {
    margin-bottom: 10px;

    color: #eee;

    font-size: 13px;
    font-weight: 700;
}

.challenge-popup-mission {
    margin-bottom: 16px;

    color: #888;

    font-size: 12px;
    line-height: 1.5;
}

.challenge-popup button {
    padding: 10px 14px;

    border: 1px solid #444;
    border-radius: 6px;

    background: #181818;
    color: #eee;

    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.challenge-popup button:hover {
    background: #252525;
    border-color: #777;
}

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

@media (max-width: 650px) {

    .machine {
        width: calc(100% - 20px);

        padding-top: 40px;
    }

    header {
        margin-bottom: 30px;
    }

    header h1 {
        letter-spacing: 2px;
    }

    .stats {
        gap: 7px;
    }

    .stat {
        padding: 14px 5px;
    }

    .stat-label {
        font-size: 7px;

        letter-spacing: 1px;
    }

    .stat span:last-child {
        font-size: 19px;
    }

    .display {
        min-height: 280px;

        padding: 40px 20px;
    }

    #details {
        flex-direction: column;

        align-items: center;

        gap: 8px;
    }

    .buttons {
        flex-direction: column;

        align-items: stretch;
    }

    .buttons button {
        width: 100%;
    }

    .archives {
        padding: 20px 15px;
    }

    .archive-stats {
        gap: 5px;
    }

    .archive-stat span:last-child {
        font-size: 16px;
    }

    .achievement-popup {
        top: 15px;
        right: 10px;
        left: 10px;

        width: auto;
    }
}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

button:focus-visible {
    outline: 2px solid #888;
    outline-offset: 3px;
}

/* ========================================
   MULTIPLAYER PROTOCOL
======================================== */
.multiplayer {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid rgba(0, 220, 255, 0.25);
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(0, 220, 255, 0.035),
            rgba(120, 60, 255, 0.035)
        );
    box-shadow:
        0 0 30px rgba(0, 220, 255, 0.04),
        inset 0 0 30px rgba(120, 60, 255, 0.025);
}

/* Operator */

.operator-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    margin-bottom: 20px;

    border: 1px solid rgba(0, 220, 255, 0.18);
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.18);
}

.operator-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.operator-label {
    font-size: 11px;
    letter-spacing: 2px;
    opacity: 0.55;
}

#operatorName {
    font-family: "JetBrains Mono", monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
}

/* Challenge */

.challenge-panel {
    padding: 22px;
    margin-bottom: 20px;

    border: 1px solid rgba(120, 60, 255, 0.2);
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.2);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 20px;

    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: 2px;
}

#challengeStatus {
    font-size: 10px;
    opacity: 0.55;
}

#challengeDisplay {
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    border: 1px dashed rgba(0, 220, 255, 0.15);
    border-radius: 8px;

    background: rgba(0, 0, 0, 0.15);
}

.empty-challenge {
    margin: 0;
    opacity: 0.4;
    font-size: 13px;
    text-align: center;
}


/* Leaderboard */

.leaderboard-panel {
    padding: 22px;

    border: 1px solid rgba(0, 220, 255, 0.15);
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.18);
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 18px;

    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: 2px;
}

#leaderboardCount {
    opacity: 0.5;
    font-size: 10px;
}

#leaderboard {
    min-height: 60px;
}

.empty-leaderboard {
    margin: 0;
    padding: 20px;

    text-align: center;
    opacity: 0.4;
    font-size: 13px;

    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}


/* Multiplayer mobile layout */

@media (max-width: 600px) {

    .multiplayer {
        padding: 18px;
    }

    .operator-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .challenge-actions {
        flex-direction: column;
    }

    .challenge-actions button,
    .challenge-actions #challengeTarget,
    .incoming-actions {
        width: 100%;
    }

    .incoming-actions {
        flex-direction: column;
    }

    .challenge-header,
    .leaderboard-header {
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }

}

/* ========================================
   MULTIPLAYER BUTTONS
======================================== */

.multiplayer button {
    position: relative;

    padding: 14px 22px;

    border: 1px solid #444;
    border-radius: 7px;

    background:
        linear-gradient(
            180deg,
            #252525,
            #161616
        );

    color: #eee;

    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.multiplayer button:hover:not(:disabled) {
    border-color: #777;

    background:
        linear-gradient(
            180deg,
            #303030,
            #1b1b1b
        );

    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35);
}

.multiplayer button:active:not(:disabled) {
    transform: translateY(1px);

    box-shadow: none;
}

.multiplayer button:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

/* ========================================
   CHALLENGE CONTENT
======================================== */

.challenge-content {
    width: 100%;
    text-align: center;
}

.challenge-category {
    margin-bottom: 10px;

    color: #666;

    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.challenge-mission {
    color: #eee;

    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.challenge-details {
    margin-top: 12px;

    color: #555;

    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 1px;
}

/* ========================================
   OPERATOR AUTHENTICATION
======================================== */

.account-panel {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid #292929;
    border-radius: 10px;
    background: linear-gradient(
        180deg,
        #111,
        #0b0b0b
    );
}

.auth-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #222;
    border-radius: 7px;
    background: #0d0d0d;
}

#authStatus {
    color: #888;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #292929;
    border-radius: 7px;
    outline: none;
    background: #080808;
    color: #eee;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
}

.auth-form input:focus {
    border-color: #555;
}

.auth-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.auth-buttons button {
    position: relative;
    padding: 14px 22px;
    border: 1px solid #444;
    border-radius: 7px;
    background: linear-gradient(
        180deg,
        #252525,
        #161616
    );
    color: #eee;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.auth-buttons button:hover {
    border-color: #777;
    background: linear-gradient(
        180deg,
        #303030,
        #1b1b1b
    );
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.35);
}

.auth-buttons button:active {
    transform: translateY(1px);
    box-shadow: none;
}

#logoutButton {
    display: none;
}

/* ========================================
   CHALLENGE TARGET SELECTOR
======================================== */

#challengeTarget {
    width: 100%;
    min-height: 46px;
    padding: 12px 16px;

    border: 1px solid #444;
    border-radius: 7px;

    background: linear-gradient(
        180deg,
        #252525,
        #161616
    );

    color: #eee;

    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;

    cursor: pointer;
    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

#challengeTarget:hover {
    border-color: #777;

    background: linear-gradient(
        180deg,
        #303030,
        #1b1b1b
    );
}

#challengeTarget:focus {
    border-color: #777;

    box-shadow:
        0 0 0 1px #444;
}

#challengeTarget option {
    background: #111;
    color: #eee;
}

.challenge-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.challenge-actions #challengeTarget {
    flex: 1 1 100%;
}

.challenge-actions button {
    flex: 1 1 180px;
    min-height: 46px;
}

/* ========================================
   INCOMING CHALLENGES
======================================== */

.incoming-panel {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #292929;
    border-radius: 8px;
    background: #0d0d0d;
}

.incoming-challenge {
    margin-top: 12px;
    padding: 20px;
    border: 1px solid #252525;
    border-radius: 7px;
    background: #101010;
}

.incoming-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.incoming-actions button {
    flex: 1;
    min-height: 42px;

    padding: 10px 18px;

    border: 1px solid #444;
    border-radius: 6px;

    background: linear-gradient(
        180deg,
        #252525,
        #161616
    );

    color: #eee;

    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        border-color 0.2s ease,
        background 0.2s ease;
}

.incoming-actions button:hover {
    border-color: #777;

    background: linear-gradient(
        180deg,
        #303030,
        #1b1b1b
    );

    transform: translateY(-2px);
}

.incoming-actions button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.history-panel {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #292929;
    border-radius: 8px;
    background: #0d0d0d;
}

.history-entry {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid #252525;
    border-radius: 7px;
    background: #101010;
}

.history-status {
    margin-bottom: 10px;
    color: #888;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.history-mission {
    color: #eee;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
}

.history-details {
    margin-top: 10px;
    color: #555;
    font-family: "JetBrains Mono", monospace;
    font-size: 9px;
    letter-spacing: 1px;
}

.history-points {
    margin-top: 10px;
    color: #aaa;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ================================
   COLLAPSIBLE HISTORY
================================ */

.history-toggle {
    cursor: pointer;
    user-select: none;
}

.history-toggle .challenge-header {
    margin-bottom: 0;
}

#historyArrow {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-size: 9px;
    transition: transform 0.2s ease;
}

.history-content {
    max-height: 1000px;
    overflow: hidden;
    opacity: 1;
    transition:
        max-height 0.3s ease,
        opacity 0.2s ease,
        margin-top 0.3s ease;
}

.history-panel.collapsed .history-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.history-panel.collapsed #historyArrow {
    transform: rotate(-90deg);
}

/* ================================
   INCOMING CHALLENGES COLLAPSE
================================ */

.incoming-toggle {
    cursor: pointer;
    user-select: none;
}

.incoming-content {
    max-height: 1000px;
    overflow: hidden;
    opacity: 1;
    transition:
        max-height 0.3s ease,
        opacity 0.2s ease,
        margin-top 0.3s ease;
}

.incoming-panel.collapsed .incoming-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

#incomingArrow {
    display: inline-block;
    margin-left: 10px;
    color: #666;
    font-size: 9px;
    transition: transform 0.2s ease;
}

.incoming-panel.collapsed #incomingArrow {
    transform: rotate(-90deg);
}


/* ================================
   VICKY ARCHIVES COLLAPSE
================================ */

.archives-toggle {
    cursor: pointer;
    user-select: none;
}


#archivesArrow {
    color: #666;
    font-size: 10px;
    transition: transform 0.2s ease;
}

.archives-content {
    max-height: 5000px;
    overflow: hidden;
    opacity: 1;
    transition:
        max-height 0.3s ease,
        opacity 0.2s ease,
        margin-top 0.3s ease;
}

.archives.collapsed .archives-content {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.archives.collapsed #archivesArrow {
    transform: rotate(-90deg);
}

/* =========================================================
   ACTIVE CHALLENGE STATE
   ========================================================= */

#challengePanel {
    transition:
        border-color 0.25s ease,
        background 0.25s ease,
        box-shadow 0.25s ease;
}

#challengePanel.active {
    border-color: #666;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.035),
            rgba(120, 120, 120, 0.02)
        );

    box-shadow:
        0 0 0 1px #222,
        0 10px 35px rgba(0, 0, 0, 0.45);
}

#challengePanel.active #challengeStatus {
    color: #eee;
    opacity: 1;
}

#challengePanel.active #challengeDisplay {
    border-color: #444;
    background: rgba(255, 255, 255, 0.02);
}
