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

:root {
  --bg: #1a1a1a;
  --bg-panel: #141414;
  --border: #4a4a4a;
  --border-light: #6b6b6b;
  --text: #d1d1d1;
  --text-dim: #8a8a8a;
  --tan: #c4a47c;
  --cream: #f3e5c2;
  --orange: #ff8c00;
  --orange-dim: #cc6f00;
  --mono: "IBM Plex Mono", "Consolas", "Courier New", monospace;
  --pixel: "Press Start 2P", monospace;
}

html {
  font-size: 14px;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.terminal {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}

/* Title bar */
.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  flex-wrap: wrap;
}

.title-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
}

.title-logo {
  image-rendering: pixelated;
}

.title-bar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.title-link {
  color: var(--orange);
  text-decoration: none;
}

.title-link:hover {
  color: var(--cream);
}

.title-sep {
  color: var(--border);
}

/* Dashboard grid */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  border-bottom: 1px solid var(--border);
  min-height: 0;
}

.panel {
  border-right: 1px solid var(--border);
  min-height: 320px;
}

.panel:last-child {
  border-right: none;
}

.panel-inner {
  padding: 1rem;
  height: 100%;
}

/* Commands panel */
.panel-commands .panel-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cmd-list {
  list-style: none;
}

.cmd-list li {
  margin-bottom: 0.35rem;
}

.cmd-btn {
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.cmd-btn:hover {
  color: var(--orange);
}

.panel-logo img {
  image-rendering: pixelated;
  opacity: 0.9;
}

/* Hero panel */
.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.welcome {
  font-size: 0.85rem;
  color: var(--text-dim);
  align-self: flex-start;
}

.hero-cat {
  margin: 0.25rem 0;
}

.hero-logo {
  width: 96px;
  height: 96px;
  image-rendering: pixelated;
}

.hero-title {
  font-family: var(--pixel);
  font-size: 1rem;
  color: var(--cream);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

.hero-sub {
  font-size: 0.8rem;
  color: var(--tan);
}

.ticker {
  color: var(--orange);
  font-weight: 600;
}

.hero-banner {
  width: 100%;
  max-width: 340px;
  height: auto;
  image-rendering: pixelated;
  border: 1px solid var(--border);
  margin: 0.5rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  text-decoration: none;
  border: 1px solid var(--border-light);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--orange);
  color: #1a1a1a;
  border-color: var(--orange);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--cream);
  border-color: var(--cream);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover {
  color: var(--orange);
  border-color: var(--orange);
}

/* Sidebar */
.sidebar-block {
  margin-bottom: 1.25rem;
}

.sidebar-block:last-child {
  margin-bottom: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-icon {
  image-rendering: pixelated;
  opacity: 0.85;
}

.activity-list {
  list-style: none;
  font-size: 0.78rem;
  color: var(--text);
}

.activity-list li {
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.activity-list .time {
  color: var(--text-dim);
  margin-right: 0.35rem;
}

.whats-new li {
  color: var(--tan);
}

/* Console area */
.console-area {
  flex: 1;
  padding: 1rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.output {
  flex: 1;
  margin-bottom: 0.75rem;
  overflow-y: auto;
  max-height: 280px;
}

.output-line {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  word-break: break-word;
}

.output-line.dim {
  color: var(--text-dim);
}

.output-line.success {
  color: var(--cream);
}

.output-line.warn {
  color: var(--orange);
}

.output-line.cmd-echo {
  color: var(--tan);
}

.prompt-form {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.prompt-label {
  color: var(--text-dim);
  font-size: 0.85rem;
  white-space: nowrap;
}

.prompt-user {
  color: var(--orange);
}

.prompt-path {
  color: var(--tan);
}

.prompt-input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  outline: none;
  caret-color: var(--orange);
}

.cursor-block {
  display: inline-block;
  width: 10px;
  height: 16px;
  background: var(--cream);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  flex-wrap: wrap;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-logo {
  image-rendering: pixelated;
}

.status-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.status-sub {
  color: var(--text-dim);
  font-size: 0.68rem;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.status-label {
  color: var(--text-dim);
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.progress-bar {
  color: var(--orange);
  font-weight: 500;
}

.progress-pct {
  color: var(--tan);
}

.paw {
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: 1fr;
  }

  .panel {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-height: auto;
  }

  .panel:last-child {
    border-bottom: none;
  }

  .panel-commands .panel-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
  }

  .cmd-list {
    flex: 1;
  }

  .welcome {
    align-self: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 13px;
  }

  .title-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-title {
    font-size: 0.85rem;
  }

  .status-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
