/* --- Yığın Alanı ve Toplar --- */
.stacks-container {
    display: flex;
    justify-content: space-around;
    min-height: 240px;
    background: var(--stack-bg);
    border-radius: 8px;
    border: 1px dashed #2a2f45;
    padding: 15px 30px;
    height: auto;
}

.stack-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.stack-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-blue);
    margin-bottom: 10px;
}

.stack-balls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 200px;
    height: auto;
}

.ball {
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    border: 2px solid var(--accent-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.25);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.ball.top-ball {
    border-color: var(--accent-green);
    box-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
}

.large-stack-view {
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #0d0f18;
    border: 1px solid #23283c;
    border-radius: 6px;
    padding: 8px;
    font-family: monospace;
    font-size: 11px;
    color: #38bdf8;
    word-break: break-all;
    line-height: 1.6;
}

/* --- Komutlar ve Pipeline --- */
.commands-panel {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
}

.command-card {
    background: #212638;
    border: 1px solid #303750;
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
}

.command-card:hover {
    border-color: var(--accent-blue);
    background: #282f46;
    transform: translateX(4px);
}

.cmd-tag {
    background: var(--accent-blue);
    color: #0b0f19;
    font-weight: 900;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-family: monospace;
}

.cmd-desc {
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    line-height: 1.2;
    max-width: 170px;
}

.builder-panel {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel-header-sub {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.pipeline-zone {
    flex: 1;
    background: var(--stack-bg);
    border: 2px dashed #2e354d;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    overflow-y: auto;
}

.summary-matrix {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 4px;
}

.summary-item {
    background: #1c2236;
    border: 1px solid #2e3857;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-cmd {
    font-family: monospace;
    font-weight: 900;
    font-size: 13px;
    color: var(--accent-blue);
}

.summary-count {
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
}

.pipeline-chip {
    background: linear-gradient(135deg, #2a3148, #1e2436);
    border: 1px solid var(--accent-blue);
    border-radius: 5px;
    padding: 4px 8px;
    font-family: monospace;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pipeline-chip .remove-cmd {
    color: var(--accent-red);
    cursor: pointer;
    font-weight: 900;
}

/* --- Kontrol Butonları & Terminal --- */
.control-bar {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.benchmark-info {
    font-size: 13px;
    color: var(--text-muted);
}

.benchmark-info span {
    font-weight: 700;
    color: var(--text-main);
}

.actions-group {
    display: flex;
    gap: 8px;
}

.btn {
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-clear { background: #2a2f44; color: var(--text-main); }
.btn-clear:hover { background: #39405d; }
.btn-pause { background: #4a3e21; color: var(--accent-yellow); }
.btn-restart { background: #46252d; color: var(--accent-red); }
.btn-run {
    background: linear-gradient(45deg, #00c853, var(--accent-green));
    color: #0b140d;
}
.btn-run:hover { transform: translateY(-1px); }

.terminal-panel {
    background: var(--term-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.terminal-tabs {
    display: flex;
    gap: 6px;
    border-bottom: 1px solid #1e2436;
    padding-bottom: 8px;
    margin-bottom: 8px;
    height: 36px;
    flex-shrink: 0;
}

.term-tab-btn {
    background: #141724;
    border: 1px solid #2e344e;
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.term-tab-btn.active {
    background: #252a3e;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.terminal-body {
    height: calc(100% - 44px);
    overflow-y: scroll;
    color: #38bdf8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    padding-right: 6px;
}

.terminal-body::-webkit-scrollbar { width: 6px; }
.terminal-body::-webkit-scrollbar-track { background: #090b10; }
.terminal-body::-webkit-scrollbar-thumb { background: #2e344e; border-radius: 3px; }
.terminal-body::-webkit-scrollbar-thumb:hover { background: var(--accent-blue); }

/* --- Modallar, Overlay ve Toast --- */
.overlay-screen, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay-screen {
    background: rgba(10, 12, 19, 0.95);
    flex-direction: column;
}

.modal-overlay {
    background: rgba(7, 9, 15, 0.88);
    backdrop-filter: blur(4px);
    z-index: 9999;
}

.login-card, .modal-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.login-card {
    padding: 35px 30px;
    width: 360px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-input {
    width: 100%;
    background: #141724;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    font-size: 14px;
    margin: 18px 0 20px 0;
    outline: none;
    text-align: center;
    font-family: inherit;
}

.login-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.mode-cards {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.mode-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 20px;
    width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
}

.mode-card:hover {
    border-color: var(--accent-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 210, 255, 0.2);
}

.mode-icon { font-size: 42px; margin-bottom: 10px; }
.mode-title { font-size: 18px; font-weight: 800; color: var(--accent-blue); margin-bottom: 8px; }
.mode-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.modal-card {
    width: 90%;
    max-width: 680px;
    padding: 24px;
    position: relative;
    border-width: 1px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: #252a3e;
    border: none;
    color: var(--text-muted);
    font-size: 17px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover { background: var(--accent-red); color: #fff; }
.modal-title { font-size: 20px; font-weight: 800; color: var(--accent-blue); margin-bottom: 12px; }
.modal-content { font-size: 13px; line-height: 1.6; color: var(--text-main); max-height: 65vh; overflow-y: auto; }
.modal-content h4 { color: var(--accent-yellow); margin: 14px 0 6px 0; }
.modal-content ul { padding-left: 20px; margin: 5px 0; }
.modal-content li { margin-bottom: 4px; }

.score-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.score-table th, .score-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-color); }
.score-table th { color: var(--accent-blue); font-weight: 800; background: #141724; }

.practice-config, .cerat-config {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #23283c;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 12px;
}

.cerat-btn {
    background: #141724;
    color: var(--accent-blue);
    border: 1px solid #3b4261;
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
}
.cerat-btn:hover { background: #2e344e; }

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    z-index: 11000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.toast-success { background: #00c853; color: #000; }
.toast-warn { background: #ffd600; color: #000; }
.toast-error { background: #ff1744; color: #fff; }

/* --- 4. Mod: Evo / Checker Seçenekleri --- */
.cerat-btn.active-os {
    background: var(--accent-blue) !important;
    color: #0b0f19 !important;
    border-color: #ffffff !important;
}

[contenteditable="true"]:focus {
    outline: 1px solid var(--accent-blue) !important;
    background: rgba(0, 210, 255, 0.04);
}
/* --- Evo Checker Stilleri --- */
.cerat-btn.active-os {
    background: var(--accent-blue) !important;
    color: #0b0f19 !important;
    border-color: #ffffff !important;
    font-weight: 800;
}

.test-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-top: 6px;
    font-family: 'Courier New', Courier, monospace;
}

.test-report-table th, .test-report-table td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #1e2436;
}

.test-report-table th {
    color: var(--accent-blue);
    background: #141724;
}

.status-passed { color: var(--accent-green); font-weight: bold; }
.status-failed { color: var(--accent-red); font-weight: bold; }

[contenteditable="true"]:focus {
    outline: 1px solid var(--accent-blue) !important;
    background: rgba(0, 210, 255, 0.03);
}