:root {
  --bg-main: #0b0f19;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(23, 32, 51, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(66, 133, 244, 0.35);
  
  --primary-blue: #3b82f6;
  --primary-indigo: #6366f1;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-yellow: #f59e0b;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-code: #e2e8f0;
  --code-bg: #060911;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
}

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

/* Ambient Background Lights */
.glow-bg {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.glow-blue { top: -100px; left: -100px; background: var(--primary-blue); }
.glow-purple { top: 400px; right: -100px; background: var(--primary-indigo); }

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Nav */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-indigo));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.brand h1 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-indigo));
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}
.btn-outline {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

/* Hero Section */
.hero-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 30px;
  flex-wrap: wrap;
}
.hero-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.hero-text p {
  color: var(--text-muted);
  font-size: 1rem;
}
.stats-counter {
  display: flex;
  gap: 24px;
}
.stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 14px 22px;
  border-radius: var(--radius-md);
  text-align: center;
}
.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: #60a5fa;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Search & Filters */
.controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-box input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 12px 18px 12px 44px;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease;
}
.search-box input:focus {
  border-color: var(--primary-blue);
}
.filter-group {
  display: flex;
  gap: 12px;
}
.filter-group select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 16px;
  border-radius: 99px;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

/* Admin Banner */
.admin-banner {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 14px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.admin-banner-text {
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 4-Column Prompt Cards Grid */
.prompts-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 60px;
}

.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  padding: 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 0.8fr;
  gap: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.prompt-card:hover {
  border-color: var(--border-glow);
}

.prompt-card.pending {
  border-style: dashed;
  border-color: var(--accent-yellow);
}

/* Columns */
.col-header {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Col 1: Prompt Text */
.prompt-box {
  background: var(--code-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86rem;
  color: var(--text-code);
  max-height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
}
.card-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-gemini { background: rgba(66, 133, 244, 0.15); color: #60a5fa; }
.badge-claude { background: rgba(217, 119, 6, 0.15); color: #fbbf24; }
.badge-gpt { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-deepseek { background: rgba(147, 51, 234, 0.15); color: #c084fc; }

.btn-copy {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-copy:hover {
  background: var(--primary-blue);
}

/* Col 2: Citation */
.citation-box p {
  font-size: 0.92rem;
  color: #cbd5e1;
  margin-bottom: 8px;
}
.citation-link {
  color: #60a5fa;
  text-decoration: none;
  font-size: 0.85rem;
  word-break: break-all;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.citation-link:hover { text-decoration: underline; }

/* Col 3: Usage & Intended Results */
.usage-box p {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.45;
}

/* Col 4: WFM Voting Widget */
.wfm-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}
.wfm-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.vote-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.btn-vote {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}
.btn-vote:hover {
  transform: scale(1.08);
}
.btn-vote.up:hover, .btn-vote.up.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-green);
  color: #34d399;
}
.btn-vote.down:hover, .btn-vote.down.active {
  background: rgba(239, 68, 68, 0.2);
  border-color: var(--accent-red);
  color: #f87171;
}
.vote-count {
  font-size: 0.82rem;
  font-weight: 700;
}
.wfm-percent {
  font-size: 0.78rem;
  color: #34d399;
  font-weight: 600;
}

/* Admin Actions for Prompt Card */
.admin-card-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-card {
  background: #111827;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  cursor: pointer;
}
.form-group {
  margin-bottom: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: #090d16;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
}
.form-group textarea {
  height: 100px;
  resize: vertical;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary-blue);
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #1e293b;
  border: 1px solid var(--border-glow);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: #fff; }

/* Responsive */
@media (max-width: 1024px) {
  .prompt-card {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .prompt-card {
    grid-template-columns: 1fr;
  }
  .form-row { grid-template-columns: 1fr; }
  .hero-strip { flex-direction: column; align-items: flex-start; }
}
