/* ⚡ GREENFIELD STUDIO — 80s Digital Workshop Theme ⚡ */

:root {
  /* Neon palette */
  --neon-pink: #ff2e97;
  --neon-cyan: #00f0ff;
  --neon-purple: #b537f2;
  --neon-lime: #c0ff00;
  --electric-blue: #0080ff;

  /* Dark base */
  --bg-dark: #0a0a14;
  --bg-darker: #050508;
  --bg-card: #14141f;
  --bg-elevated: #1c1c2e;

  /* Text */
  --fg: #f0f0ff;
  --fg-muted: #9090b0;
  --fg-bright: #ffffff;

  /* Accent */
  --accent: var(--neon-cyan);
  --accent-hover: var(--neon-pink);
  --accent-glow: rgba(0, 240, 255, 0.3);

  /* Grid */
  --grid-color: rgba(0, 240, 255, 0.15);
  --grid-size: 24px;

  /* Status */
  --success: #00ff88;
  --error: #ff3366;
  --warning: #ffaa00;
}

/* ======== RESET & BASE ======== */

html, body {
  height: 100%;
  margin: 0;
}

body {
  margin: 0;
  font-family: 'Courier New', 'Courier', monospace;
  background: var(--bg-dark);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Animated grid background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(var(--grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.6; }
}

/* Scanline effect */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.1) 0px,
    rgba(0, 0, 0, 0.1) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.3;
}

* {
  position: relative;
  z-index: 2;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px var(--accent-hover);
}

/* ======== TYPOGRAPHY ======== */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Courier New', monospace;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

h1 {
  font-size: 48px;
  color: var(--fg-bright);
  text-shadow:
    0 0 20px var(--neon-cyan),
    0 0 40px var(--neon-cyan),
    0 4px 0 rgba(0, 0, 0, 0.3);
  line-height: 1.1;
  margin-bottom: 16px;
}

h2 {
  font-size: 28px;
  color: var(--neon-pink);
  text-shadow: 0 0 10px var(--neon-pink);
  margin-bottom: 12px;
}

h3 {
  font-size: 18px;
  color: var(--neon-lime);
  text-shadow: 0 0 8px var(--neon-lime);
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
  color: var(--fg);
  font-size: 15px;
  line-height: 1.6;
}

.glow-text {
  animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ======== LAYOUT ======== */

.wrap {
  max-width: 680px;
  padding: 56px 20px;
  margin: 0 auto;
}

.wide-wrap {
  max-width: 1200px;
  padding: 48px 20px;
  margin: 0 auto;
}

/* ======== NAVIGATION ======== */

.site-nav {
  background: var(--bg-card);
  border-bottom: 3px solid var(--neon-cyan);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
}

.nav-logo {
  font-family: 'Courier New', monospace;
  font-size: 24px;
  font-weight: bold;
  color: var(--neon-cyan);
  text-decoration: none;
  margin-right: 24px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px var(--neon-cyan);
  transition: text-shadow 0.3s ease;
}

.nav-logo:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--neon-cyan), 0 0 40px var(--neon-cyan);
}

.nav-link {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: bold;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav-spacer { flex: 1; }

.nav-email {
  font-size: 12px;
  color: var(--fg-muted);
  padding: 0 8px;
}

.nav-logout {
  display: inline;
  margin: 0;
  padding: 0;
}

.nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* ======== HERO SECTION ======== */

.hero {
  text-align: center;
  padding: 80px 20px 60px;
  margin-bottom: 40px;
  background: linear-gradient(135deg, rgba(181, 55, 242, 0.1) 0%, rgba(0, 240, 255, 0.1) 100%);
  border: 2px solid var(--neon-purple);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
  animation: heroGlow 4s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(10%, 10%); opacity: 0.8; }
}

.hero h1 {
  font-size: 56px;
  margin-bottom: 20px;
  position: relative;
}

.hero p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 32px;
  color: var(--fg);
  position: relative;
}

.hero .tagline {
  font-size: 14px;
  color: var(--neon-lime);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 12px;
  text-shadow: 0 0 10px var(--neon-lime);
}

/* ======== CARDS ======== */

.card {
  background: var(--bg-card);
  border: 2px solid var(--neon-cyan);
  border-radius: 0;
  padding: 32px;
  box-shadow:
    0 0 20px rgba(0, 240, 255, 0.2),
    inset 0 0 20px rgba(0, 240, 255, 0.05);
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.card:hover::before {
  opacity: 0.2;
}

/* ======== TOOL GRID ======== */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.tool-card {
  background: var(--bg-card);
  border: 2px solid var(--electric-blue);
  border-radius: 0;
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  display: block;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.tool-card:hover::before {
  left: 100%;
}

.tool-card:hover {
  border-color: var(--neon-cyan);
  box-shadow:
    0 0 30px rgba(0, 240, 255, 0.4),
    inset 0 0 20px rgba(0, 240, 255, 0.1);
  transform: translateY(-4px);
  color: inherit;
}

.tool-card-title {
  font-family: 'Courier New', monospace;
  font-size: 20px;
  font-weight: bold;
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--neon-pink);
  text-shadow: 0 0 8px var(--neon-pink);
  letter-spacing: 0.05em;
}

.tool-card-tagline {
  font-size: 14px;
  color: var(--fg);
  margin: 0 0 16px;
  line-height: 1.5;
}

.tool-card-runs {
  font-size: 11px;
  color: var(--neon-lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: bold;
  text-shadow: 0 0 6px var(--neon-lime);
}

/* ======== BUTTONS ======== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  border: 2px solid var(--neon-cyan);
  background: var(--bg-card);
  color: var(--neon-cyan);
  cursor: pointer;
  text-decoration: none;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px var(--accent-glow);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--neon-cyan);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn:hover {
  color: var(--bg-dark);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px var(--neon-cyan), inset 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn:hover::before {
  left: 0;
}

.btn:active {
  transform: translateY(2px);
}

.btn-secondary {
  border-color: var(--neon-pink);
  color: var(--neon-pink);
}

.btn-secondary::before {
  background: var(--neon-pink);
}

.btn-secondary:hover {
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px var(--neon-pink);
}

/* ======== SEARCH BAR ======== */

.search-bar {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--electric-blue);
  background: var(--bg-card);
  color: var(--fg-bright);
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  transition: all 0.2s ease;
  position: relative;
}

.search-bar:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 20px var(--accent-glow);
  background: rgba(0, 240, 255, 0.05);
}

.search-bar::placeholder {
  color: var(--fg-muted);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* ======== INPUTS ======== */

input[type=email],
input[type=file],
input[type=text],
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--electric-blue);
  background: var(--bg-card);
  color: var(--fg-bright);
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  transition: all 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px var(--accent-glow);
  background: rgba(0, 240, 255, 0.05);
}

.input-label {
  color: var(--neon-lime);
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  display: block;
  text-shadow: 0 0 6px var(--neon-lime);
}

/* ======== STATUS BADGES ======== */

.status-badge {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Courier New', monospace;
}

.status-queued,
.status-running {
  background: rgba(255, 170, 0, 0.1);
  border-color: var(--warning);
  color: var(--warning);
  box-shadow: 0 0 10px rgba(255, 170, 0, 0.3);
}

.status-succeeded {
  background: rgba(0, 255, 136, 0.1);
  border-color: var(--success);
  color: var(--success);
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.status-failed {
  background: rgba(255, 51, 102, 0.1);
  border-color: var(--error);
  color: var(--error);
  box-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

/* ======== MARKETING SECTIONS ======== */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 60px 0;
}

.feature-card {
  background: var(--bg-card);
  border: 2px solid var(--neon-purple);
  padding: 28px 24px;
  position: relative;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--fg);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.cta-section {
  text-align: center;
  padding: 60px 20px;
  margin: 60px 0;
  background: linear-gradient(135deg, rgba(255, 46, 151, 0.1) 0%, rgba(181, 55, 242, 0.1) 100%);
  border: 2px solid var(--neon-pink);
}

.cta-section h2 {
  margin-bottom: 20px;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ======== FORM STACK ======== */

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

/* ======== EMPTY STATE ======== */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--fg-muted);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ======== RESPONSIVE ======== */

@media (max-width: 768px) {
  .nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 6px;
  }

  .nav-email { display: none; }

  .hero h1 { font-size: 36px; }
  .hero p { font-size: 16px; }

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

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

  h1 { font-size: 32px; }
  h2 { font-size: 24px; }
}

/* ======== LEGACY COMPATIBILITY ======== */

/* Keep some old classes for backwards compatibility with existing pages */
.fine { font-size: 11px; color: var(--fg-muted); margin-top: 12px; }
.upload-status { min-height: 18px; }
.downloads { margin: 18px 0; }
.downloads .btn + .btn { margin-left: 8px; }
.error-text { color: var(--error); }
.actions { margin-top: 18px; }
.sidebar { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--electric-blue); }
.sidebar h3 { margin: 0 0 10px; font-size: 14px; color: var(--neon-lime); font-weight: bold; }
.sidebar a { display: block; padding: 6px 0; font-size: 14px; color: var(--fg-muted); text-decoration: none; }
.sidebar a:hover { color: var(--accent); }

/* Request board */
.request-list { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.request-card { display: flex; gap: 16px; background: var(--bg-card); border: 2px solid var(--electric-blue); padding: 20px; }
.vote-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 40px; }
.vote-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 2px solid var(--electric-blue); background: transparent; color: var(--fg-muted); cursor: pointer; font-size: 16px; transition: all 0.2s ease; }
.vote-btn:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 10px var(--accent-glow); }
.vote-btn.voted { border-color: var(--neon-cyan); background: rgba(0, 240, 255, 0.1); color: var(--neon-cyan); }
.vote-count { font-size: 14px; font-weight: bold; color: var(--neon-lime); }
.request-body { flex: 1; min-width: 0; }
.request-title { font-size: 16px; font-weight: bold; color: var(--fg-bright); margin-bottom: 6px; text-transform: uppercase; }
.request-desc { font-size: 14px; color: var(--fg); margin-bottom: 8px; line-height: 1.5; }
.request-meta { font-size: 11px; color: var(--fg-muted); text-transform: uppercase; }
.request-input, .request-textarea { width: 100%; padding: 14px 16px; border: 2px solid var(--electric-blue); background: var(--bg-card); color: var(--fg-bright); box-sizing: border-box; font-family: 'Courier New', monospace; font-size: 14px; }
.request-textarea { resize: vertical; min-height: 80px; }
.section-header { margin-top: 40px; margin-bottom: 16px; font-size: 20px; font-weight: bold; color: var(--neon-pink); text-transform: uppercase; }

/* Status extensions */
.status-open { background: rgba(255, 170, 0, 0.1); border-color: var(--warning); color: var(--warning); }
.status-planned { background: rgba(0, 255, 136, 0.1); border-color: var(--success); color: var(--success); }
.status-shipped { background: rgba(0, 240, 255, 0.1); border-color: var(--accent); color: var(--accent); }

/* Outputs table */
.outputs-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.outputs-table th, .outputs-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--electric-blue); font-size: 13px; font-family: 'Courier New', monospace; }
.outputs-table th { font-size: 11px; color: var(--neon-lime); text-transform: uppercase; font-weight: bold; letter-spacing: 0.1em; }
.outputs-table a { text-decoration: none; }
.outputs-table a:hover { text-decoration: underline; }

.pagination { display: flex; gap: 12px; justify-content: center; margin-top: 32px; }
.pagination a { font-size: 13px; padding: 8px 16px; border: 2px solid var(--electric-blue); text-decoration: none; color: var(--fg); text-transform: uppercase; font-weight: bold; transition: all 0.2s ease; }
.pagination a:hover { border-color: var(--neon-cyan); color: var(--neon-cyan); box-shadow: 0 0 10px var(--accent-glow); }

/* Login page */
.login-wrap { max-width: 480px; margin: 0 auto; padding: 60px 20px; }

/* Dashboard */
.dashboard { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.dashboard h1 { margin-bottom: 0.5rem; }
.dashboard .subtitle { color: var(--fg-muted); margin-bottom: 2rem; }
.dashboard .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.dashboard .stat-card { background: var(--bg-card); border: 2px solid var(--electric-blue); padding: 1.5rem; }
.dashboard .stat-card .label { font-size: 0.8rem; color: var(--neon-lime); margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: bold; }
.dashboard .stat-card .value { font-size: 2rem; font-weight: bold; color: var(--neon-cyan); }
.dashboard table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.dashboard th, .dashboard td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--electric-blue); }
.dashboard th { font-size: 0.75rem; color: var(--neon-lime); text-transform: uppercase; font-weight: bold; }

/* Blog */
.blog-wrap { max-width: 800px; margin: 2rem auto; padding: 0 1rem; }
.blog-wrap h1 { margin-bottom: 1.5rem; }
.blog-wrap p { line-height: 1.8; margin-bottom: 1.2rem; }
.blog-card { margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 2px solid var(--electric-blue); }
.blog-card h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.blog-card h2 a { color: var(--neon-pink); text-decoration: none; }
.blog-card h2 a:hover { text-decoration: underline; }
.blog-card p { color: var(--fg); margin: 0; font-size: 1rem; }
.back-link { display: inline-block; margin-top: 2rem; color: var(--fg-muted); font-size: 0.9rem; }

/* Referral */
.referral { max-width: 700px; margin: 2rem auto; padding: 0 1rem; }
.ref-card { background: var(--bg-card); border: 2px solid var(--neon-purple); padding: 2rem; margin-bottom: 2rem; }
.ref-link { font-family: 'Courier New', monospace; background: var(--bg-darker); border: 1px solid var(--electric-blue); padding: 0.75rem; word-break: break-all; color: var(--neon-cyan); }
.referral .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin: 1.5rem 0; }
.referral .stat { text-align: center; }
.referral .stat .num { font-size: 2rem; font-weight: bold; color: var(--neon-cyan); }
.referral .stat .lbl { font-size: 0.8rem; color: var(--fg-muted); text-transform: uppercase; }
.copy-btn { padding: 0.6rem 1rem; background: var(--neon-cyan); color: var(--bg-dark); border: none; cursor: pointer; font-size: 0.85rem; font-weight: bold; text-transform: uppercase; }

/* Projects */
.project-create-form { display: flex; gap: 12px; margin-bottom: 24px; }
.project-create-form .request-input { flex: 1; }

/* Misc */
.btn-outline { background: transparent; border: 2px solid var(--electric-blue); color: var(--fg); }
.btn-outline:hover { background: rgba(0, 128, 255, 0.1); }
.link-btn { background: none; border: none; padding: 0; color: var(--accent); cursor: pointer; font-family: inherit; font-size: inherit; text-decoration: underline; }
.link-btn:hover { color: var(--accent-hover); }
.verify-banner { margin: 20px 0; padding: 18px; background: rgba(0, 240, 255, 0.1); border: 2px solid var(--neon-cyan); }
.verify-banner strong { display: block; margin-bottom: 10px; color: var(--neon-cyan); }
.verify-banner p { margin: 4px 0; font-size: 14px; }
.verify-banner a { color: var(--neon-cyan); text-decoration: underline; }
