:root {
    --main-color: #0fcd00;
}


body {
    background: #000000;
    margin: 0;
    width: 100%;
    color: var(--main-color);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    box-sizing: border-box;
}

body * {
    box-sizing: border-box;
}

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.progress-bar {
    width: 300px;
    background: #111;
    border: 1px solid var(--main-color);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    height: 20px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--main-color);
    width: 0%;
    transition: width 0.1s ease;
}

.progress-percentage {
    margin-top: 10px;
    font-size: 18px;
    color: var(--main-color);
}

.progress-bar_bottom {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 15px;
}

.hidden {
    display: none;
}

.main-title {
    padding-top: 30px;
    padding-bottom: 0;
    margin-bottom: 0;
    text-align: center;
    font-weight: 500;
}

.subtitle {
    text-align: center;
    font-size: 16px;
    margin-top: 8px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.subtitle strong {
    color: #fff;
    text-shadow: 0 0 10px var(--main-color);
}

.content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;

    @media (max-width: 1240px) {
        display: none;        
    }
}

.frame-wrapper {
    position: relative;
}

.frame {
    white-space: pre;
    font-feature-settings: normal;
    font-variation-settings: normal;
    font-size: 0.85em;
    margin: 0;
    line-height: 1.3;
}

button,
.link {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    background: #000000;
    border-radius: 10px;
    color: var(--main-color);
    border: 1px solid var(--main-color);
    transition: all 0.3s ease-in;
    text-decoration: none;
    text-transform: uppercase;
}

button:hover,
.link:hover {
    background: var(--main-color);
    color: #000000;
}

.tagline {
    text-align: center;
    font-size: 14px;
    margin-top: 15px;
    opacity: 0.6;
}

/* Modal background */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    backdrop-filter: blur(5px);
    align-items: center;
}

/* Modal content */
.modal-content {
    position: relative;
    background-color: black;
    padding: 20px;
    border-radius: 8px;
    width: 800px;
    min-height: 500px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
    border: 1px solid var(--main-color);
}

.modalPerson .modal-content {
    width: 500px;
    min-height: 200px;
    line-height: 1.4;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: var(--main-color);
    cursor: pointer;
}

#modalText {
    text-align: left;
    font-size: 16px;
    line-height: 1.5;
}

/* ===== SYSTEM LOGS ADVANCED ===== */
.modal-logs {
    width: 900px;
    min-height: 560px;
    max-height: 90vh;
    overflow-y: auto;
}

.logs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.log-panel {
    border: 1px solid #1a3a1a;
    border-radius: 4px;
    background: #050a05;
    overflow: hidden;
}

.log-panel-wide {
    grid-column: 1 / -1;
}

.panel-header {
    background: #0a1a0a;
    padding: 6px 10px;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #0fcd00;
    border-bottom: 1px solid #1a3a1a;
}

.panel-body {
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.6;
    min-height: 100px;
    max-height: 160px;
    overflow-y: auto;
    color: #0baa00;
}

.log-stream {
    min-height: 120px;
    max-height: 140px;
}

.panel-body::-webkit-scrollbar {
    width: 4px;
}
.panel-body::-webkit-scrollbar-thumb {
    background: #1a3a1a;
    border-radius: 2px;
}

.log-line {
    margin: 0;
    padding: 1px 0;
    border-bottom: 1px solid #0a150a;
    animation: logFadeIn 0.3s ease;
}

.log-ts {
    color: #065f00;
    margin-right: 6px;
}

.log-ok { color: #0fcd00; }
.log-warn { color: #ccaa00; }
.log-err { color: #cc3333; }
.log-info { color: #0fcd00; }

@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.heartbeat-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
}

.hb-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.hb-online { background: #0fcd00; box-shadow: 0 0 4px #0fcd00; }
.hb-warning { background: #ccaa00; box-shadow: 0 0 4px #ccaa00; }
.hb-offline { background: #cc3333; box-shadow: 0 0 4px #cc3333; }

.traffic-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 3px 0;
}

.traffic-bar-fill {
    height: 8px;
    background: #0fcd00;
    border-radius: 2px;
    transition: width 1s ease;
}

.traffic-bar-bg {
    flex: 1;
    height: 8px;
    background: #0a1a0a;
    border-radius: 2px;
    overflow: hidden;
}

/* ===== DEPLOY AGENT MODAL ===== */
.modal-deploy {
    width: 680px;
    min-height: 480px;
}

.step-indicator {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    justify-content: center;
}

.step {
    padding: 4px 12px;
    font-size: 11px;
    letter-spacing: 1px;
    border: 1px solid #1a3a1a;
    border-radius: 3px;
    color: #1a5a1a;
    background: #050a05;
}

.step.active {
    border-color: #0fcd00;
    color: #0fcd00;
    background: #0a1a0a;
    box-shadow: 0 0 8px rgba(15, 205, 0, 0.2);
}

.step.done {
    border-color: #086600;
    color: #086600;
    background: #050a05;
}

.deploy-form {
    text-align: left;
    padding: 0 20px;
}

.deploy-form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 5px;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.deploy-form .hint {
    font-size: 11px;
    opacity: 0.5;
    text-transform: none;
    letter-spacing: 0;
}

.deploy-form input,
.deploy-form select,
.deploy-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    background: #050a05;
    border: 1px solid #1a3a1a;
    border-radius: 4px;
    color: var(--main-color);
    outline: none;
    transition: border-color 0.2s;
}

.deploy-form input:focus,
.deploy-form select:focus,
.deploy-form textarea:focus {
    border-color: var(--main-color);
    box-shadow: 0 0 6px rgba(15, 205, 0, 0.15);
}

.deploy-form textarea {
    resize: vertical;
    min-height: 80px;
}

.deploy-form select option {
    background: #000;
    color: var(--main-color);
}

.deploy-next,
.deploy-back {
    margin-top: 20px;
    padding: 10px 28px;
    font-size: 14px;
}

.deploy-launch {
    background: var(--main-color);
    color: #000;
}

.deploy-launch:hover {
    background: #0aff00;
    color: #000;
}

.btn-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.review-card {
    background: #050a05;
    border: 1px solid #1a3a1a;
    border-radius: 4px;
    padding: 16px;
    margin-top: 10px;
}

.review-card pre {
    margin: 0;
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.6;
    color: var(--main-color);
}

.deploy-terminal {
    background: #050a05;
    border: 1px solid #1a3a1a;
    border-radius: 4px;
    padding: 16px;
    margin-top: 10px;
    min-height: 300px;
    max-height: 380px;
    overflow-y: auto;
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
}

.deploy-terminal p {
    margin: 0;
    padding: 1px 0;
    animation: logFadeIn 0.3s ease;
}

.term-ok { color: #0fcd00; }
.term-info { color: #0baa00; }
.term-warn { color: #ccaa00; }
.term-highlight { color: #fff; text-shadow: 0 0 6px #0fcd00; }

.deploy-form .error-msg {
    color: #cc3333;
    font-size: 12px;
    margin-top: 4px;
}

.container {
    width: 1205px;
}

/* Agent dot indicator */
.agent-dot {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--main-color);
    cursor: pointer;
    box-shadow: 0 0 6px var(--main-color);
}

/* Deployer agent */
.agent-deployer {
    position: absolute;
    font-size: 12px;
    top: 40px;
    left: 120px;
    background: #000000;
    animation: deployerMove 28s linear infinite;
    cursor: pointer;
}

@keyframes deployerMove {
    0%   { top: 40px;  left: 120px; }
    20%  { top: 180px; left: 120px; }
    40%  { top: 180px; left: 350px; }
    60%  { top: 80px;  left: 350px; }
    80%  { top: 80px;  left: 120px; }
    100% { top: 40px;  left: 120px; }
}

/* Reviewer agent */
.agent-reviewer {
    position: absolute;
    font-size: 12px;
    top: 50px;
    left: 500px;
    background: #000000;
    animation: reviewerMove 24s linear infinite;
    cursor: pointer;
}

@keyframes reviewerMove {
    0%   { top: 50px;  left: 500px; }
    25%  { top: 150px; left: 500px; }
    50%  { top: 150px; left: 620px; }
    75%  { top: 50px;  left: 620px; }
    100% { top: 50px;  left: 500px; }
}

/* Optimizer agent */
.agent-optimizer {
    position: absolute;
    font-size: 12px;
    top: 60px;
    right: 180px;
    background: #000000;
    animation: optimizerMove 32s linear infinite;
    cursor: pointer;
}

@keyframes optimizerMove {
    0%   { top: 60px;  right: 180px; }
    15%  { top: 60px;  right: 80px; }
    35%  { top: 180px; right: 80px; }
    55%  { top: 180px; right: 280px; }
    75%  { top: 100px; right: 280px; }
    100% { top: 60px;  right: 180px; }
}

.error {
    display: none;
    text-align: center;

    @media (max-width: 1240px) {
        display: block;        
    }
}
