/* =========================================
   muhan.dev — Developer Command Center
   Dark Neon Dashboard Styles
   ========================================= */

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: #080810;
    color: #A0B0C0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(12px, 0.8vw, 14px);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Code Rain Canvas */
#code-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Dashboard Container */
.dashboard-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Logotype Area */
.logotype-area {
    display: flex;
    align-items: baseline;
    gap: 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.logotype {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 32px);
    color: #40E080;
    letter-spacing: -0.02em;
    display: inline;
    overflow: hidden;
    white-space: nowrap;
}

.logotype-cursor {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: clamp(20px, 2.5vw, 32px);
    color: #40E080;
    animation: blink 0.7s step-end infinite;
    margin-left: 2px;
}

.logotype-subtitle {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(11px, 0.7vw, 13px);
    color: #4080E0;
    margin-left: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.logotype-subtitle.visible {
    opacity: 1;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    grid-auto-rows: minmax(200px, auto);
    flex: 1;
}

/* Terminal Panels */
.terminal {
    background: #0E0E1A;
    border: 1px solid rgba(64, 224, 128, 0.2);
    border-radius: 6px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.terminal.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal:hover {
    border-color: rgba(64, 224, 128, 0.4);
    box-shadow: 0 0 20px rgba(64, 224, 128, 0.05);
}

.panel-wide {
    grid-column: span 2;
}

.panel-tall {
    grid-row: span 2;
}

/* Terminal Bar */
.terminal-bar {
    height: 28px;
    background: #141428;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(64, 224, 128, 0.1);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-red {
    background: #E04060;
}

.dot-yellow {
    background: #E08040;
}

.dot-green {
    background: #40E080;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: #A0B0C0;
    margin-left: 6px;
    opacity: 0.7;
}

/* Terminal Content */
.terminal-content {
    padding: 10px 12px;
    overflow-y: auto;
    flex: 1;
}

.terminal-content::-webkit-scrollbar {
    width: 4px;
}

.terminal-content::-webkit-scrollbar-track {
    background: #0E0E1A;
}

.terminal-content::-webkit-scrollbar-thumb {
    background: rgba(64, 224, 128, 0.3);
    border-radius: 2px;
}

.terminal-line {
    margin-bottom: 4px;
    line-height: 1.7;
}

.prompt {
    color: #40E080;
    font-weight: 600;
}

.prefix {
    color: #40E080;
    font-weight: 600;
}

/* Typewriter text spans */
.typewriter .text,
.typewriter-inline {
    color: #A0B0C0;
    position: relative;
}

.typewriter .text.typing::after,
.typewriter-inline.typing::after {
    content: '';
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #40E080;
    margin-left: 1px;
    vertical-align: text-bottom;
    animation: blink 0.7s step-end infinite;
}

/* Status indicators */
.status-line {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    flex-wrap: wrap;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.status-line.visible {
    opacity: 1;
}

.status-green {
    color: #40E080;
}

.status-blue {
    color: #4080E0;
}

.status-orange {
    color: #E08040;
}

.status-done {
    color: #A0B0C0;
    opacity: 0.6;
}

.status-text {
    color: #A0B0C0;
    opacity: 0.7;
}

/* Commit entries */
.commit-entry {
    margin-bottom: 3px;
    line-height: 1.7;
}

.commit-hash {
    color: #E08040;
    margin-right: 6px;
}

/* Tool rows */
.tool-row {
    margin-bottom: 2px;
    line-height: 1.7;
    font-family: 'IBM Plex Mono', monospace;
}

/* Monitor rows */
.monitor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.monitor-label {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
    color: #A0B0C0;
    width: 36px;
    flex-shrink: 0;
}

.bar-container {
    flex: 1;
    height: 12px;
    background: rgba(160, 176, 192, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.bar {
    height: 100%;
    border-radius: 2px;
    transition: width 1s ease;
}

.bar-green {
    background: #40E080;
    box-shadow: 0 0 8px rgba(64, 224, 128, 0.3);
}

.bar-blue {
    background: #4080E0;
    box-shadow: 0 0 8px rgba(64, 128, 224, 0.3);
}

.bar-orange {
    background: #E08040;
    box-shadow: 0 0 8px rgba(224, 128, 64, 0.3);
}

.monitor-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.uptime-line {
    margin-top: 12px;
    color: #4080E0;
    font-size: 11px;
    opacity: 0.8;
}

/* Code Display */
.code-display {
    padding: 0;
    position: relative;
}

.code-block {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    padding: 12px 12px 12px 48px;
    overflow-x: auto;
    tab-size: 2;
    counter-reset: line;
}

.code-block code {
    font-family: inherit;
}

.code-keyword {
    color: #4080E0;
}

.code-var {
    color: #A0B0C0;
}

.code-type {
    color: #40E080;
}

.code-string {
    color: #E08040;
}

.code-num {
    color: #E04060;
}

.code-fn {
    color: #E08040;
}

.code-line-numbers {
    position: absolute;
    top: 12px;
    left: 0;
    width: 36px;
    text-align: right;
    padding-right: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(160, 176, 192, 0.3);
    user-select: none;
    pointer-events: none;
}

/* Tree lines */
.tree-line {
    margin-bottom: 1px;
    line-height: 1.7;
    font-family: 'IBM Plex Mono', monospace;
    color: #A0B0C0;
}

/* Pipeline steps */
.pipeline-step {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    line-height: 1.7;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pipeline-step.visible {
    opacity: 1;
}

.step-status {
    font-size: 14px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.step-done {
    color: #40E080;
}

.step-running {
    color: #4080E0;
    animation: pulse-blue 1.5s ease-in-out infinite;
}

.step-pending {
    color: #A0B0C0;
    opacity: 0.4;
}

.step-name {
    color: #A0B0C0;
}

/* Network rows */
.network-row {
    margin-bottom: 3px;
    line-height: 1.7;
    color: #A0B0C0;
}

/* Activity Feed */
#activity-feed {
    font-size: 11px;
}

.activity-entry {
    margin-bottom: 3px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.activity-time {
    color: rgba(160, 176, 192, 0.5);
    margin-right: 8px;
}

.activity-type-commit {
    color: #40E080;
}

.activity-type-build {
    color: #4080E0;
}

.activity-type-deploy {
    color: #E08040;
}

.activity-type-alert {
    color: #E04060;
}

.activity-type-test {
    color: #40E080;
}

.activity-msg {
    color: #A0B0C0;
}

/* Footer */
.dashboard-footer {
    margin-top: 16px;
    padding: 10px 0;
    text-align: center;
    border-top: 1px solid rgba(64, 224, 128, 0.1);
}

.footer-text {
    color: rgba(160, 176, 192, 0.5);
    font-size: 11px;
}

.footer-clock {
    color: #40E080;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 11px;
}

/* Animations */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes pulse-blue {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

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

/* Scrollbar for body */
body::-webkit-scrollbar {
    width: 6px;
}

body::-webkit-scrollbar-track {
    background: #080810;
}

body::-webkit-scrollbar-thumb {
    background: rgba(64, 224, 128, 0.2);
    border-radius: 3px;
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(64, 224, 128, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .panel-wide {
        grid-column: span 2;
    }
}

@media (max-width: 640px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .panel-wide {
        grid-column: span 1;
    }
    .panel-tall {
        grid-row: span 1;
    }
    .logotype-subtitle {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    .logotype-area {
        flex-direction: column;
    }
}
