:root {
    --bg-main: #0f111a;
    --card-bg: #1a1c29;
    --border-color: #2e344e;
    --accent-blue: #00d2ff;
    --accent-green: #00e676;
    --accent-yellow: #ffd600;
    --accent-red: #ff1744;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --stack-bg: #141724;
    --term-bg: #090b10;
}

* {
    box-sizing: border-box;
    user-select: none;
}

body {
    margin: 0;
    padding: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    width: 100%;
    max-width: 1380px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(45deg, var(--accent-blue), #9d4edd);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
    cursor: pointer;
}

.nav-btn {
    background: #252a3e;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #323854;
    border-color: var(--accent-blue);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.badge-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    cursor: pointer;
}

.badge-title {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.badge-value {
    font-size: 15px;
    font-weight: 800;
    color: var(--accent-blue);
}

.badge-timer {
    color: #ff9100;
    font-family: monospace;
    font-size: 17px;
}

.badge-score {
    color: var(--accent-yellow);
}

.workspace {
    width: 100%;
    max-width: 1380px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.stage-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.bottom-grid {
    display: grid;
    grid-template-columns: 280px 1fr 380px;
    gap: 15px;
    height: 380px;
}

/* Baloncuklarda Ultra Akıcı Fiziksel Geçiş & Glassmorphism */
.ball {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.2s ease,
                background 0.2s ease;
    will-change: transform;
    backdrop-filter: blur(4px);
}

.ball:hover {
    transform: scale(1.12);
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.6);
}

.top-ball {
    border: 2px solid #00d2ff !important;
    box-shadow: 0 0 14px rgba(0, 210, 255, 0.5);
    animation: topBallPulse 1.8s infinite ease-in-out;
}

@keyframes topBallPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.06); }
}

/* Boru Hattına Eklenen Komut Vurgusu */
.pipeline-chip {
    animation: chipSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chipSlideIn {
    from { opacity: 0; transform: translateY(6px) scale(0.92); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Kilitli Durum Yumuşaklığı */
.command-card, .btn-run, .btn-clear {
    transition: opacity 0.2s ease, transform 0.15s ease;
}

/* Liderlik Tablosu İlk 3 Derece Pırıltısı */
.score-table tbody tr:nth-child(1) {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.12), transparent) !important;
    border-left: 3px solid #ffd700;
}
.score-table tbody tr:nth-child(2) {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.1), transparent) !important;
    border-left: 3px solid #c0c0c0;
}
.score-table tbody tr:nth-child(3) {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.1), transparent) !important;
    border-left: 3px solid #cd7f32;
}
