/* === RESET & BASE === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --card-bg: #141414;
  --accent: #c4704b;
  --green: #4a6741;
  --text: #e8e8e8;
  --text-secondary: #888;
  --text-muted: #555;
  --border: #1e1e1e;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', 'Cascadia Code', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* === SCANLINE OVERLAY === */
.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* === HERO BANNER === */
.hero {
  width: 100%;
  padding: 3rem 2rem 2.5rem;
  background: linear-gradient(180deg, #111 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(196, 112, 75, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.hero-phase {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.05em;
  line-height: 1.1;
  transition: color 0.4s ease;
}

.hero-phase.building {
  color: var(--accent);
  animation: pulse-glow 2s ease-in-out infinite;
}

.hero-phase.active {
  color: var(--green);
}

.hero-project {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-family: var(--font-sans);
}

@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 20px rgba(196, 112, 75, 0); }
  50% { text-shadow: 0 0 30px rgba(196, 112, 75, 0.3); }
}

/* === DASHBOARD LAYOUT === */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  min-height: calc(100vh - 200px - 48px);
}

/* === PANELS === */
.panel {
  background: var(--bg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.panel-title {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 400;
}

/* === EVENT FEED === */
.feed-list {
  flex: 1;
  overflow-y: auto;
  max-height: calc(100vh - 300px);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.feed-list::-webkit-scrollbar {
  width: 4px;
}

.feed-list::-webkit-scrollbar-track {
  background: transparent;
}

.feed-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.feed-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  animation: fade-in 0.3s ease-out;
}

.feed-item:last-child {
  border-bottom: none;
}

.feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.feed-dot.deploy {
  background: var(--green);
  box-shadow: 0 0 6px rgba(74, 103, 65, 0.5);
}

.feed-dot.iteration {
  background: var(--accent);
}

.feed-content {
  flex: 1;
  min-width: 0;
}

.feed-action {
  color: var(--text);
  font-size: 0.85rem;
  word-break: break-word;
}

.feed-action .feed-project {
  color: var(--accent);
}

.feed-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.feed-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 2rem 0;
  text-align: center;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === PROJECT GALLERY === */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
  flex: 1;
  align-content: start;
}

.project-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: #2a2a2a;
}

.project-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.project-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.status-badge {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.active {
  background: var(--green);
  box-shadow: 0 0 6px rgba(74, 103, 65, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-badge.static {
  background: var(--text-muted);
}

.status-badge.inactive {
  background: #6b3030;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.project-domain {
  display: block;
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 0.6rem;
  word-break: break-all;
}

.project-domain:hover {
  text-decoration: underline;
}

.project-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.project-tag {
  background: rgba(196, 112, 75, 0.1);
  color: var(--text-secondary);
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
}

.project-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  line-height: 1.4;
}

/* === PULSE STRIP === */
.pulse-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--text-muted);
  position: sticky;
  bottom: 0;
}

.pulse-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

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

.pulse-item {
  white-space: nowrap;
}

.discord-cta {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.discord-cta:hover {
  color: var(--text);
}

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

  .hero {
    padding: 2rem 1.25rem 1.75rem;
  }

  .hero-phase {
    font-size: 2rem;
  }

  .panel {
    padding: 1.25rem;
  }

  .feed-list {
    max-height: 50vh;
  }

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

  .pulse-strip {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    text-align: center;
  }

  .pulse-stats {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-phase {
    font-size: 1.6rem;
  }

  .pulse-sep {
    display: none;
  }

  .pulse-stats {
    gap: 0.75rem;
  }
}
