/* ============================================================
   IRON-7 GIT MISSION CONTROL — Styles
   ============================================================ */

:root {
  --bg: #0a0a1a;
  --surface: rgba(15, 25, 50, 0.85);
  --border: rgba(0, 240, 255, 0.15);
  --cyan: #00f0ff;
  --green: #00ff88;
  --red: #ff3b5c;
  --yellow: #ffd644;
  --orange: #ff8844;
  --text: #e0e8f0;
  --text-dim: #6a7a8a;
  --font: 'Courier New', 'Consolas', monospace;
  --radius: 10px;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Starfield */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 55% 15%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 70% 80%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 85% 35%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 20% 90%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 45% 50%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 95% 10%, rgba(0, 240, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 5% 55%, rgba(0, 240, 255, 0.3), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 40% 85%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 25% 30%, rgba(0, 255, 136, 0.3), transparent);
  z-index: -1;
  pointer-events: none;
}

/* ---- Layout ---- */
.git-dashboard {
  display: grid;
  grid-template-rows: auto auto 1fr 300px;
  grid-template-areas:
    'header'
    'briefing'
    'panels'
    'terminal';
  min-height: 100vh;
}

/* ---- Header ---- */
.header {
  grid-area: header;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

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

.header-logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--cyan);
  letter-spacing: 4px;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.header-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-dim);
}

.progress-tracker {
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-dots {
  display: flex;
  gap: 6px;
}

.progress-dot {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  flex-shrink: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-dim);
  transition: all 0.4s;
}

.progress-dot.done {
  background: rgba(0, 255, 136, 0.15);
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.progress-pct {
  font-size: 16px;
  font-weight: bold;
  color: var(--cyan);
  min-width: 30px;
}

/* ---- Mission Briefing ---- */
.briefing {
  grid-area: briefing;
  display: flex;
  align-items: stretch;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.briefing-content {
  flex: 1;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.briefing-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--cyan);
}

.briefing-content strong {
  font-size: 14px;
}

.briefing-content p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.briefing-hint {
  padding: 12px 24px;
  background: rgba(0, 0, 0, 0.3);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 280px;
}

.hint-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--yellow);
}

.briefing-hint code {
  font-size: 12px;
  color: var(--yellow);
  word-break: break-all;
}

/* ---- Visual Panels ---- */
.panels {
  grid-area: panels;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px;
  overflow-y: auto;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.panel-icon {
  font-size: 14px;
}

.panel-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--cyan);
  font-weight: bold;
}

.panel-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  flex: 1;
}

.empty-msg {
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  padding: 20px 0;
  font-style: italic;
}

/* ---- File Cards ---- */
.file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid var(--text-dim);
  animation: fadeInUp 0.3s ease;
  transition: all 0.3s;
}

.file-card.new,
.file-card.staged-add {
  border-left-color: var(--cyan);
}

.file-card.modified,
.file-card.staged-modify {
  border-left-color: var(--yellow);
}

.file-card.staged,
.file-card.unmodified {
  border-left-color: var(--green);
}

.file-card.staged-delete {
  border-left-color: var(--red);
  text-decoration: line-through;
  opacity: 0.6;
}

.file-icon {
  font-size: 9px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  color: var(--text-dim);
  font-weight: bold;
  min-width: 28px;
  text-align: center;
}

.file-name {
  font-size: 12px;
  flex: 1;
}

.file-badge {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.file-badge.new,
.file-badge.staged-add {
  background: rgba(0, 240, 255, 0.15);
  color: var(--cyan);
}

.file-badge.modified,
.file-badge.staged-modify {
  background: rgba(255, 214, 68, 0.15);
  color: var(--yellow);
}

.file-badge.staged {
  background: rgba(0, 255, 136, 0.15);
  color: var(--green);
}

.file-badge.staged-delete {
  background: rgba(255, 59, 92, 0.15);
  color: var(--red);
}

/* ---- Commit Blocks ---- */
.commit-block {
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border-left: 3px solid var(--green);
  animation: fadeInUp 0.3s ease;
}

.commit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.commit-hash {
  font-size: 12px;
  color: var(--cyan);
  font-weight: bold;
  letter-spacing: 1px;
}

.commit-badge {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: bold;
  letter-spacing: 1px;
}

.commit-badge.pushed {
  background: rgba(0, 255, 136, 0.15);
  color: var(--green);
}

.commit-badge.local {
  background: rgba(255, 214, 68, 0.15);
  color: var(--yellow);
}

.commit-msg {
  font-size: 11px;
  color: var(--text);
  margin-bottom: 6px;
}

.commit-files {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.commit-file-tag {
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.commit-file-tag.add {
  color: var(--green);
}

.commit-file-tag.modify {
  color: var(--yellow);
}

.commit-file-tag.delete {
  color: var(--red);
}

/* ---- Terminal ---- */
.terminal {
  grid-area: terminal;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.7);
  border-top: 1px solid var(--border);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.terminal-dot.red {
  background: var(--red);
}
.terminal-dot.yellow {
  background: var(--yellow);
}
.terminal-dot.green {
  background: var(--green);
}

.terminal-bar-title {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-left: 6px;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
}

.terminal-input-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-prompt {
  color: var(--green);
  font-size: 13px;
  white-space: nowrap;
  font-weight: bold;
}

.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  caret-color: var(--green);
}

/* Terminal output styles */
.term-cmd-line {
  color: var(--text);
  margin-bottom: 2px;
}

.term-output {
  color: var(--text-dim);
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
}

.term-system {
  color: var(--orange);
  padding: 6px 10px;
  margin: 6px 0;
  background: rgba(255, 136, 68, 0.08);
  border-left: 3px solid var(--orange);
  border-radius: 4px;
  font-size: 12px;
}

.term-success {
  color: var(--green);
  font-weight: bold;
}

/* Diff colors */
.diff-add {
  color: var(--green);
}

.diff-remove {
  color: var(--red);
}

/* Log colors */
.log-hash {
  color: var(--yellow);
  font-weight: bold;
}

.log-pushed {
  color: var(--green);
  font-size: 11px;
}

/* ---- Mission Complete Banner ---- */
body.mission-complete::after {
  content: 'MISION COMPLETA';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  font-weight: bold;
  color: var(--green);
  text-shadow: 0 0 40px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3);
  letter-spacing: 10px;
  animation: missionComplete 4s ease forwards;
  pointer-events: none;
  z-index: 999;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes missionComplete {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
  40% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .git-dashboard {
    grid-template-rows: auto auto auto 280px;
  }

  .panels {
    grid-template-columns: 1fr;
  }

  .briefing {
    flex-direction: column;
  }

  .briefing-hint {
    min-width: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .header {
    flex-direction: column;
    gap: 8px;
  }
}
