/**
 * HCParty Modern Theme - 100% Match to Template
 * Exact replica of hcparty_modern_oldschool_template.html
 */

/* Import Google Fonts - EXACT from template */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Inter:wght@400;500;600;700;800&display=swap');

/* CSS Variables - EXACT from template */
:root {
  --bg: #090b10;
  --bg-soft: #10141d;
  --panel: rgba(16, 20, 29, 0.92);
  --panel-2: rgba(12, 16, 24, 0.96);
  --text: #e7edf7;
  --muted: #93a0b8;
  --line: rgba(0, 229, 255, 0.16);
  --green: #49ff9a;
  --cyan: #00e5ff;
  --purple: #9a6bff;
  --red: #ff5b7f;
  --yellow: #ffd84d;
  --shadow: 0 0 0 1px rgba(0, 229, 255, 0.15), 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

/* Body - EXACT from template */
body.beta-ui {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(73, 255, 154, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(154, 107, 255, 0.14), transparent 30%),
    linear-gradient(180deg, #080a0f 0%, #090b10 45%, #06070a 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Grid overlay - EXACT from template */
body.beta-ui::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,0.4), rgba(255,255,255,0.08));
  pointer-events: none;
  z-index: -2;
}

/* Scanline effect - EXACT from template */
body.beta-ui::after {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 2px,
    transparent 4px
  );
  opacity: 0.18;
  pointer-events: none;
  z-index: -1;
}

body.beta-ui a {
  color: inherit;
  text-decoration: none;
}

body.beta-ui img {
  max-width: 100%;
  display: block;
}

/* Container - EXACT from template */
body.beta-ui .container {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
}

/* Pixel fonts - EXACT from template */
.eyebrow,
.terminal-label,
.brand,
.button--ghost,
.micro-label {
  font-family: "Press Start 2P", monospace;
  letter-spacing: 0.08em;
}

/* Hide old header/nav/sidebar in beta mode but keep wrapper structure */
body.beta-ui .banner,
body.beta-ui .menu,
body.beta-ui .sidebar,
body.beta-ui .footer {
  display: none;
}

body.beta-ui .wrapper {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  max-width: 100%;
  width: 100%;
}

/* Hero section - EXACT from template */
body.beta-ui .home-modern {
  margin-top: 0;
  padding-top: 72px;
  width: 100%;
  display: block;
}

body.beta-ui .home-hero {
  padding: 72px 0 42px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

/* Cards & Panels - EXACT from template */
.hero-card,
.panel,
body.beta-ui .home-news-card,
.seat,
.poll-option,
.footer-card {
  background: linear-gradient(180deg, rgba(18, 22, 32, 0.92), rgba(12, 16, 24, 0.95));
  border: 1px solid rgba(0, 229, 255, 0.14);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.hero-card {
  padding: 36px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: auto -10% -35% auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.16), transparent 60%);
  pointer-events: none;
}

/* Eyebrow - EXACT from template */
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.68rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

body.beta-ui .home-kicker {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 0.68rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
  font-family: "Press Start 2P", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Typography - EXACT from template */
body.beta-ui h1 {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: var(--text);
  font-weight: 800;
}

body.beta-ui .hero-card p {
  max-width: 58ch;
  margin: 18px 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Buttons - EXACT from template */
body.beta-ui .home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

body.beta-ui .home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  text-decoration: none;
}

body.beta-ui .home-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

body.beta-ui .home-btn-primary {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  color: #03120d;
  box-shadow: 0 12px 34px rgba(0, 229, 255, 0.24);
}

body.beta-ui .home-btn-ghost {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03);
  font-size: 0.65rem;
  font-family: "Press Start 2P", monospace;
}

/* Hero meta chips */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
}

/* Terminal - EXACT from template */
body.beta-ui .home-hero-side,
.terminal {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
}

.terminal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: rgba(255,255,255,0.3);
}

.terminal-dots span:nth-child(1) { background: var(--red); }
.terminal-dots span:nth-child(2) { background: var(--yellow); }
.terminal-dots span:nth-child(3) { background: var(--green); }

.terminal-label {
  font-size: 0.62rem;
  color: var(--muted);
}

.terminal-screen {
  background: #06090e;
  border-radius: 14px;
  padding: 18px;
  border: 1px solid rgba(73, 255, 154, 0.18);
  min-height: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--green);
  box-shadow: inset 0 0 28px rgba(73, 255, 154, 0.05);
}

.terminal-line {
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stats - EXACT from template */
body.beta-ui .home-stats {
  padding: 14px 0 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

body.beta-ui .home-stat-card,
.panel {
  padding: 22px;
}

.micro-label {
  display: inline-block;
  font-size: 0.58rem;
  color: var(--cyan);
  margin-bottom: 12px;
  text-transform: uppercase;
}

body.beta-ui .home-stat-card strong,
.stat-number {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

body.beta-ui .home-stat-card p,
.stat-copy {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Sections - EXACT from template */
body.beta-ui section {
  padding: 28px 0;
}

body.beta-ui .home-news {
  background: transparent;
  border: none;
  padding: 28px 0;
}

body.beta-ui .home-section-head,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

body.beta-ui .home-section-head h2,
.section-head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text);
  font-weight: 800;
}

body.beta-ui .home-section-head p,
.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 58ch;
}

/* News grid - EXACT from template */
body.beta-ui .home-news-grid,
.news-grid,
.feature-grid,
.bottom-grid {
  display: grid;
  gap: 20px;
}

body.beta-ui .home-news-grid,
.news-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

body.beta-ui .home-news-card {
  padding: 24px;
}

body.beta-ui .home-news-card h3 {
  margin: 6px 0 10px;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
}

body.beta-ui .home-news-card p,
.feature-card p,
.footer-card p {
  color: var(--muted);
  margin: 0;
}

body.beta-ui .home-news-meta,
.news-meta {
  color: var(--cyan);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Feature cards */
.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-card {
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 24, 35, 0.86), rgba(12, 16, 24, 0.95));
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
}

.feature-card h3 {
  margin: 0 0 10px;
}

/* Seats */
.seat-panel {
  padding: 24px;
}

.seat-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.seat {
  padding: 14px 10px;
  text-align: center;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
}

.seat small {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.seat--free {
  border-color: rgba(73,255,154,0.24);
  box-shadow: 0 0 0 1px rgba(73,255,154,0.14), 0 10px 30px rgba(73,255,154,0.08);
}

.seat--taken {
  border-color: rgba(255,91,127,0.18);
  opacity: 0.88;
}

/* Poll */
.poll-card {
  padding: 24px;
}

.poll-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.poll-option {
  padding: 14px;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.poll-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--fill, 50%);
  background: linear-gradient(90deg, rgba(73,255,154,0.18), rgba(0,229,255,0.16));
  pointer-events: none;
}

.poll-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
}

/* Bottom grid */
.bottom-grid {
  grid-template-columns: 1.15fr 0.85fr;
  align-items: start;
}

/* Empty states */
body.beta-ui .home-news-empty {
  border: 1px dashed rgba(0, 229, 255, 0.14);
  background: rgba(18, 22, 32, 0.6);
  padding: 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Boardplan */
body.beta-ui .home-boardplan-wrap {
  overflow-x: auto;
  border: 1px solid rgba(0, 229, 255, 0.14);
  background: linear-gradient(180deg, rgba(18, 22, 32, 0.92), rgba(12, 16, 24, 0.95));
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

body.beta-ui .home-boardplan-wrap table {
  color: var(--text);
}

/* Beta toggle */
body.beta-ui .beta-preview-link {
  margin: 0 0 20px 0;
  padding: 12px 16px;
  background: rgba(18, 22, 32, 0.6);
  border: 1px solid rgba(0, 229, 255, 0.14);
  border-radius: 12px;
  font-size: 0.95rem;
}

body.beta-ui .beta-preview-link a {
  color: var(--cyan);
  font-weight: 600;
}

body.beta-ui .beta-preview-link a:hover {
  color: var(--green);
}

/* Responsive - EXACT from template */
@media (max-width: 1024px) {
  .hero-grid,
  .bottom-grid,
  body.beta-ui .home-news-grid,
  .news-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .seat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body.beta-ui .home-modern {
    padding-top: 42px;
  }

  .hero-card,
  .terminal,
  .panel,
  body.beta-ui .home-news-card,
  body.beta-ui .home-stat-card,
  .feature-card,
  .seat-panel,
  .poll-card,
  .footer-card,
  body.beta-ui .home-boardplan-wrap {
    padding: 20px;
  }

  body.beta-ui h1 {
    font-size: clamp(2rem, 14vw, 3.2rem);
  }

  .stats-grid,
  .seat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-screen {
    min-height: 200px;
    font-size: 0.85rem;
  }
}

/* Override old theme in beta mode */
body.beta-ui .wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

body.beta-ui .main {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: 100%;
  display: block;
}

body.beta-ui .content {
  max-width: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
