/* ═══ SCENE 5: AGENT DEPLOYMENT BAY ═══ */
.section-agent {
    background: #060a0e;
}

.agent-bg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 50px 60px 80px;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
    background:
        radial-gradient(ellipse at top, rgba(160,255,208,0.04) 0%, transparent 60%),
        linear-gradient(180deg, #060a0e 0%, #040608 100%);
}

/* Mobile-only expand CTA + close button hidden by default on desktop */
.agent-mobile-cta,
.agent-close {
    display: none;
}

/* Subtle grid floor lines */
.agent-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent 0, transparent 32px, rgba(160,255,208,0.02) 32px, rgba(160,255,208,0.02) 33px),
        repeating-linear-gradient(90deg, transparent 0, transparent 32px, rgba(160,255,208,0.02) 32px, rgba(160,255,208,0.02) 33px);
    pointer-events: none;
    z-index: 1;
}

.section-agent .section-title {
    margin-top: 20px;
    color: #fff;
    text-shadow: 2px 2px 0 #000, 0 0 20px rgba(160,255,208,0.2);
}

.agent-subtitle {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #88ccaa;
    letter-spacing: 4px;
    text-align: center;
    margin: 12px 0 40px;
    text-shadow: 1px 1px 0 #000;
    position: relative;
    z-index: 10;
}

/* ═══ MAIN LAYOUT ═══ */
.agent-layout {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 36px;
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 10;
}

.agent-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.agent-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ═══ SERVER RACK ═══ */
.server-rack {
    background: rgba(8, 14, 18, 0.85);
    border: 1px solid #1a3030;
    padding: 16px 18px;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.6);
}

.rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1a3030;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.rack-label,
.rack-stat {
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 2px;
    color: #88ccaa;
}

.rack-stat {
    color: #5a7a6a;
}

.rack-summary {
    display: none;
}

.rack-grid {
    display: grid;
    grid-template-columns: repeat(34, 1fr);
    gap: 2px;
    padding: 4px 0;
}

.rack-cell {
    aspect-ratio: 1 / 1;
    background: #0e1818;
    border: 0;
    transition: background 0.4s ease;
}

.rack-cell.dim { background: #0e1818; }
.rack-cell.active { background: #88ccaa; box-shadow: 0 0 4px rgba(136,204,170,0.4); }
.rack-cell.mine { background: #ffaa44; box-shadow: 0 0 6px rgba(255,170,68,0.6); animation: cell-mine-pulse 1.4s ease-in-out infinite; }
.rack-cell.revoked { background: #5a2020; }

@keyframes cell-mine-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(255,170,68,0.6); }
    50% { opacity: 0.7; box-shadow: 0 0 10px rgba(255,170,68,0.9); }
}

.rack-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #1a3030;
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 1px;
    color: #5a7a6a;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    display: inline-block;
}
.dot-dim { background: #0e1818; border: 1px solid #1a3030; }
.dot-active { background: #88ccaa; }
.dot-mine { background: #ffaa44; }
.dot-revoked { background: #5a2020; }

/* ═══ DUAL CRT MONITORS ═══ */
.agent-terminals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.agent-crt {
    background: #050a08;
    border: 1px solid #1a3030;
    padding: 12px 14px;
    position: relative;
    overflow: hidden;
}

/* CRT scanline overlay */
.agent-crt::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg,
        rgba(0,0,0,0) 0px,
        rgba(0,0,0,0.15) 1px,
        rgba(0,0,0,0) 2px);
    pointer-events: none;
    z-index: 2;
}

.crt-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #1a3030;
    padding-bottom: 6px;
    margin-bottom: 8px;
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 1px;
}

.crt-light {
    width: 6px;
    height: 6px;
    background: #88ccaa;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(136,204,170,0.8);
    animation: crt-light-pulse 1.6s ease-in-out infinite;
}

@keyframes crt-light-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.crt-name {
    color: #88ccaa;
    flex: 1;
}

.crt-role {
    color: #5a7a6a;
}

.crt-screen {
    height: 90px;
    overflow: hidden;
    font-family: var(--font-body);
    font-size: 14px;
    color: #88ccaa;
    line-height: 1.4;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.crt-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0;
    animation: crt-line-in 0.3s ease-out forwards;
}

@keyframes crt-line-in {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

.crt-line.dim { color: #5a7a6a; }
.crt-line.warn { color: #ffaa44; }
.crt-line.ok { color: #a0ffd0; }

/* ═══ CONTROL PANELS ═══ */
.ctrl-panel {
    background: rgba(8, 14, 18, 0.85);
    border: 1px solid #1a3030;
    padding: 14px 16px;
    transition: border-color 0.3s ease, opacity 0.3s ease;
}

.ctrl-panel.locked {
    opacity: 0.4;
    pointer-events: none;
}

.ctrl-panel.active {
    border-color: #88ccaa;
}

.panel-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    border-bottom: 1px solid #1a3030;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.panel-num {
    font-family: var(--font-pixel);
    font-size: 9px;
    color: #5a7a6a;
    letter-spacing: 1px;
}

.panel-title {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #88ccaa;
    letter-spacing: 3px;
}

.panel-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.panel-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 1px;
}

.panel-key {
    color: #5a7a6a;
    font-family: var(--font-pixel);
    font-size: 8px;
    letter-spacing: 2px;
}

.panel-val {
    color: #cfcfcf;
    font-size: 14px;
}

.panel-val.ok { color: #88ccaa; }
.panel-val.warn { color: #ff6b4a; }

.panel-btn {
    margin-top: 6px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid #88ccaa;
    color: #88ccaa;
    font-family: var(--font-pixel);
    font-size: 9px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.panel-btn:hover {
    background: #88ccaa;
    color: #050a08;
}

.panel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.panel-btn:disabled:hover {
    background: transparent;
    color: #88ccaa;
}

/* Wallet button loading state */
.panel-btn.loading {
    pointer-events: none;
    position: relative;
    color: transparent;
}
.panel-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin: -6px 0 0 -6px;
    border: 2px solid #88ccaa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.panel-input {
    width: 100%;
    padding: 10px 12px;
    background: #050a08;
    border: 1px solid #1a3030;
    color: #cfcfcf;
    font-family: var(--font-body);
    font-size: 14px;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.2s;
}

.panel-input:focus {
    border-color: #88ccaa;
}

.panel-input::placeholder {
    color: #3a5a4a;
}

.panel-note {
    font-family: var(--font-pixel);
    font-size: 8px;
    line-height: 1.8;
    color: #5a7a6a;
    letter-spacing: 1px;
    margin: 0;
}

.panel-note.ok { color: #88ccaa; }
.panel-note.warn { color: #ffaa44; }

.panel-hint {
    font-family: var(--font-pixel);
    font-size: 7px;
    line-height: 2;
    color: #3a5a4a;
    letter-spacing: 0.5px;
    margin: 8px 0 0;
}

/* ═══ TRACK CARDS ═══ */
.track-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.track-card {
    padding: 14px 12px;
    background: #050a08;
    border: 1px solid #1a3030;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.track-card:hover {
    border-color: #88ccaa;
    transform: translateY(-1px);
}

.track-card.selected {
    border-color: #88ccaa;
    background: rgba(136,204,170,0.06);
    box-shadow: 0 0 12px rgba(136,204,170,0.15);
}

.track-name {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #cfcfcf;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.track-card.selected .track-name {
    color: #88ccaa;
}

.track-chain {
    font-family: var(--font-body);
    font-size: 13px;
    color: #5a7a6a;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.track-stat {
    font-family: var(--font-pixel);
    font-size: 8px;
    color: #5a7a6a;
    letter-spacing: 1px;
}

.track-card.selected .track-stat {
    color: #ffaa44;
}

/* ═══ NFT TOKEN PICKER ═══ */
.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nft-grid::-webkit-scrollbar {
    display: none;
}

.nft-card {
    padding: 10px 6px;
    background: #050a08;
    border: 1px solid #1a3030;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.nft-card:hover {
    border-color: #88ccaa;
    transform: translateY(-1px);
}

.nft-card.selected {
    border-color: #88ccaa;
    background: rgba(136,204,170,0.08);
    box-shadow: 0 0 12px rgba(136,204,170,0.15);
}

.nft-card.assigned {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: #1a2020;
}

.nft-card.assigned:hover {
    border-color: #1a2020;
    transform: none;
}

.nft-id {
    font-family: var(--font-pixel);
    font-size: 10px;
    color: #cfcfcf;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.nft-card.selected .nft-id {
    color: #88ccaa;
}

.nft-tag {
    font-family: var(--font-pixel);
    font-size: 7px;
    color: #5a7a6a;
    letter-spacing: 1px;
}

.nft-card.assigned .nft-tag {
    color: #6a4a4a;
}

.nft-card.selected .nft-tag {
    color: #ffaa44;
}

/* ═══ DEPLOY BUTTON ═══ */
.deploy-btn {
    margin-top: 10px;
    padding: 18px 24px;
    background: transparent;
    border: 2px solid #1a3030;
    color: #5a7a6a;
    font-family: var(--font-pixel);
    font-size: 11px;
    letter-spacing: 4px;
    cursor: not-allowed;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.deploy-btn:not(:disabled) {
    border-color: #88ccaa;
    color: #88ccaa;
    cursor: pointer;
    animation: deploy-pulse 2s ease-in-out infinite;
}

.deploy-btn:not(:disabled):hover {
    background: #88ccaa;
    color: #050a08;
    box-shadow: 0 0 24px rgba(136,204,170,0.4);
}

.deploy-btn.deployed {
    border-color: #ffaa44;
    color: #ffaa44;
    animation: none;
}

.deploy-btn.deployed:hover {
    background: #ffaa44;
    color: #050a08;
}

.deploy-btn.loading {
    border-color: #88ccaa;
    color: #88ccaa;
    animation: none;
    cursor: wait;
}

.deploy-btn.loading .deploy-text::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #88ccaa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

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

@keyframes deploy-pulse {
    0%, 100% { box-shadow: 0 0 0 rgba(136,204,170,0); }
    50% { box-shadow: 0 0 16px rgba(136,204,170,0.3); }
}

/* ═══ EASTER EGG: SLOT 404 ═══ */
.easter-egg.marker-slot404 {
    position: absolute;
    width: 16px;
    height: 16px;
    bottom: 80px;
    right: 90px;
    cursor: pointer;
    z-index: 50;
    background: rgba(255,85,68,0.05);
    border: 1px dashed rgba(255,85,68,0.3);
    transition: border-color 0.3s, background 0.3s;
}

.easter-egg.marker-slot404::before {
    content: '404';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-pixel);
    font-size: 7px;
    color: rgba(255,85,68,0.6);
    letter-spacing: 1px;
}

.easter-egg.marker-slot404:hover {
    border-color: rgba(255,85,68,0.9);
    background: rgba(255,85,68,0.1);
}

.easter-egg.marker-slot404.found {
    border-color: rgba(255,85,68,0.4);
    background: rgba(255,85,68,0.03);
}

.easter-egg.marker-slot404.found::before {
    color: rgba(255,85,68,0.4);
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
    .agent-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .agent-bg {
        padding: 40px 30px 100px;
    }
}

@media (max-width: 768px) {
    .agent-bg {
        padding: 30px 16px 100px;
        justify-content: flex-start;
    }
    .section-agent .section-title {
        margin-top: 10px;
    }
    .agent-subtitle {
        font-size: 7px;
        letter-spacing: 2px;
        margin: 8px 0 24px;
    }
    .agent-layout {
        gap: 18px;
    }
    .server-rack {
        padding: 12px;
    }
    .rack-grid {
        grid-template-columns: repeat(34, 1fr);
        gap: 1px;
    }
    .agent-terminals {
        gap: 10px;
    }
    .agent-crt {
        padding: 10px;
    }
    .crt-screen {
        height: 70px;
        font-size: 11px;
    }
    .ctrl-panel {
        padding: 12px;
    }
    .panel-title {
        font-size: 8px;
        letter-spacing: 2px;
    }
    .track-card {
        padding: 10px 8px;
    }
    .track-name {
        font-size: 8px;
    }
    .deploy-btn {
        padding: 14px;
        font-size: 9px;
        letter-spacing: 2px;
    }
}

/* CRT idle typing cursor */
.crt-line.crt-typing::after {
    content: '_';
    display: inline-block;
    margin-left: 1px;
    animation: crt-cursor-blink 0.6s steps(2) infinite;
    color: #6affb3;
}
@keyframes crt-cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
