:root {
    --primary: #F97316;
    /* Git Orange */
    --primary-hover: #ea580c;
    --accent: #22C55E;
    /* Good Green */
    --accent-hover: #16a34a;
    --danger: #EF4444;
    /* Bad Red */
    --danger-hover: #dc2626;
    --background: #1E1E2E;
    /* Dark BG */
    --surface: #2A2A3C;
    /* Cards */

    --glass-bg: rgba(42, 42, 60, 0.7);
    --glass-border: rgba(249, 115, 22, 0.2);

    --text-main: #f8fafc;
    --text-muted: #94a3b8;

    --skip: #94A3B8;
    /* Skip Grey */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 10%, rgba(249, 115, 22, 0.08), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(34, 197, 94, 0.05), transparent 40%);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.hidden {
    display: none !important;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

/* Forms */
textarea {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #e2e8f0;
    padding: 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s;
    margin-top: 1rem;
    white-space: nowrap;
    overflow-x: auto;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

/* Buttons */
.actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 8px;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.outline-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
}

.outline-btn:hover {
    border-color: var(--primary);
    background: rgba(249, 115, 22, 0.1);
}

/* Visualizer Controls */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.efficiency-badge {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

/* Commit Cards */
.commit-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s;
}

.hero-card {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

.commit-hash {
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.commit-msg {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Decision Actions */
.decision-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.action-btn {
    color: #fff;
}

.good-btn {
    background: var(--accent);
}

.good-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.bad-btn {
    background: var(--danger);
}

.bad-btn:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

.skip-btn {
    background: var(--skip);
}

.skip-btn:hover {
    background: #64748b;
    transform: translateY(-2px);
}

/* Timeline */
.timeline-container {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.timeline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: min-content;
    padding: 1rem 0;
}

.tl-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.tl-node:hover::after {
    content: attr(data-msg);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #fff;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 8px;
    pointer-events: none;
}

.tl-line {
    height: 2px;
    width: 24px;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: all 0.3s;
}

/* Node States */
.tl-node.active {
    border-color: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 16px rgba(249, 115, 22, 0.5);
    z-index: 2;
}

.tl-node.good {
    background: rgba(34, 197, 94, 0.2);
    border-color: var(--accent);
}

.tl-node.bad {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
}

.tl-node.eliminated {
    opacity: 0.3;
    filter: grayscale(1);
    transform: scale(0.8);
}

.tl-node.skip {
    background: rgba(148, 163, 184, 0.2);
    border-color: var(--skip);
}

.tl-line.good-path {
    background: var(--accent);
}

.tl-line.bad-path {
    background: var(--danger);
}

.tl-line.eliminated-path {
    opacity: 0.3;
}

/* CLI Output */
pre {
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--accent);
}

/* Result Screen */
.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.stats-text {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

@media (max-width: 600px) {
    .decision-actions {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .tl-node {
        width: 24px;
        height: 24px;
        font-size: 0.5rem;
    }

    .tl-line {
        width: 12px;
    }
}