.pa-git-vis-page {
    background-color: #f7f9fc;
    color: #172033;
}

.pa-git-vis-shell {
    max-width: 1400px;
    margin: 0 auto;
}

.pa-git-vis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.pa-git-vis-header h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 0.25rem;
}

/* LAYOUT */
.pa-git-vis-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 
        "terminal graph"
        "state explanation";
    gap: 1.5rem;
}

.pa-git-vis-terminal-panel { grid-area: terminal; }
.pa-git-vis-graph-panel { grid-area: graph; }
.pa-git-vis-state-panel { grid-area: state; }
.pa-git-vis-explanation-panel { grid-area: explanation; }

/* PANELS */
.pa-git-vis-layout > section {
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 28px rgba(15,23,42,.04);
}

.pa-git-vis-terminal-panel, .pa-git-vis-graph-panel {
    height: 450px;
}

.panel-header {
    background: #edf3fa;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #496079;
    border-bottom: 1px solid #dce5f0;
    flex-shrink: 0;
}

/* TERMINAL */
.terminal-window {
    background-color: #101827;
    color: #e5edf8;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    font-size: 0.95rem;
    cursor: text;
    overflow: hidden;
}

.terminal-output {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.terminal-line {
    word-break: break-all;
}

.terminal-line.error {
    color: #ff6b6b;
}

.terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-input-line .prompt {
    color: #4ade80;
    margin-right: 0.5rem;
    font-weight: bold;
}

#terminal-input {
    background: transparent;
    border: none;
    color: #e5edf8;
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
    outline: none;
    padding: 0;
}

/* GRAPH */
.graph-container {
    padding: 1rem;
    flex-grow: 1;
    background: #fff;
    overflow: auto;
}

/* STATE GRID */
.state-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.state-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #172033;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #edf3fa;
    padding-bottom: 0.4rem;
}

.state-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.state-list li, .state-value {
    font-size: 0.85rem;
    font-family: 'Consolas', 'Courier New', monospace;
}

.state-file {
    display: flex;
    justify-content: space-between;
}

.state-file .file-name {
    font-weight: bold;
}

.state-file .file-status {
    color: #69778c;
    font-size: 0.8rem;
}

.state-file .file-status.modified { color: #d97706; }
.state-file .file-status.staged { color: #16a34a; }
.state-file .file-status.untracked { color: #dc2626; }

/* EXPLANATION */
.explanation-content {
    padding: 1.5rem;
}

.explanation-content h5 {
    font-size: 1.15rem;
    font-weight: 750;
    margin-bottom: 0.5rem;
    color: #172033;
}

/* RESPONSIVE */
@media (max-width: 991.98px) {
    .pa-git-vis-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 
            "graph"
            "state"
            "terminal"
            "explanation";
    }
}

@media (max-width: 767.98px) {
    .state-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* CHEAT SHEET */
.pa-git-vis-cheatsheet {
    border-top: 2px dashed #dce5f0;
    padding-top: 3rem;
    margin-bottom: 3rem;
}

.cheat-card {
    background: #fff;
    border: 1px solid #dce5f0;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    box-shadow: 0 4px 12px rgba(15,23,42,.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cheat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(15,23,42,.06);
}

.cheat-card h5 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #172033;
    display: flex;
    align-items: center;
}

.cheat-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cheat-card li {
    font-size: 0.9rem;
    color: #496079;
    line-height: 1.4;
}

.cheat-card code {
    background-color: #edf3fa;
    color: #0f172a;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Consolas', 'Courier New', monospace;
    font-weight: 600;
    font-size: 0.85em;
    display: inline-block;
    margin-bottom: 0.25rem;
}
