/* ============================================================
   Houston Roleplay — Main Stylesheet
   Primary: #ff6f1a  |  Dark Grays: #111, #1a1a1a, #222, #2e2e2e
   ============================================================ */

:root {
  --primary: #ff6f1a;
  --primary-dark: #d95a0f;
  --primary-glow: rgba(255, 111, 26, 0.25);
  --bg-base: #0e0e0e;
  --bg-card: #1a1a1a;
  --bg-card2: #222222;
  --bg-card3: #2a2a2a;
  --border: #333333;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --text-dim: #666666;
  --success: #2ecc71;
  --danger: #e74c3c;
  --warning: #f39c12;
  --info: #3498db;
  --surface: #1e1e1e;
  --font: 'Inter', 'Segoe UI', sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { line-height: 1.7; color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-title {
  text-align: center;
  margin-bottom: 16px;
}
.section-title span { color: var(--primary); }
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(14, 14, 14, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
nav.scrolled { background: rgba(14, 14, 14, 0.97); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.03em;
}
.nav-logo img { height: 44px; object-fit: contain; }
.nav-logo span { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); background: rgba(255,111,26,0.08); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-size: 1.4rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--primary-glow);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0392b; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #27ae60; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: var(--transition);
}
.card:hover { border-color: rgba(255,111,26,0.35); transform: translateY(-3px); }

/* ── Hero ── */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 60% 50%, rgba(255,111,26,0.07) 0%, transparent 65%),
              linear-gradient(180deg, #0e0e0e 0%, #111 100%);
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,111,26,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,111,26,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,111,26,0.1);
  border: 1px solid rgba(255,111,26,0.3);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 24px;
  animation: fadeInDown 0.6s ease;
}
.hero-badge .dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 1.8s infinite;
}

.hero-content h1 {
  animation: fadeInUp 0.7s ease 0.1s both;
  margin-bottom: 20px;
}
.hero-content h1 .highlight {
  color: var(--primary);
  position: relative;
}

.hero-content p {
  font-size: 1.15rem;
  margin-bottom: 36px;
  animation: fadeInUp 0.7s ease 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  animation: fadeInUp 0.7s ease 0.3s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 60px;
  animation: fadeInUp 0.7s ease 0.4s both;
}
.hero-stat { text-align: center; }
.hero-stat .value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.hero-stat .label { font-size: 0.8rem; color: var(--text-muted); }

/* live indicator */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
}
.live-badge .dot {
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

/* ── About ── */
#about { background: var(--bg-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-features { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.about-feature:hover { border-color: var(--primary); }
.about-feature .icon {
  width: 44px; height: 44px;
  background: rgba(255,111,26,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.about-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.about-stat-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.about-stat-card:hover { border-color: var(--primary); transform: translateX(6px); }
.about-stat-card .icon { font-size: 2rem; }
.about-stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.about-stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ── Server Status ── */
#status .status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.status-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}
.status-card { position: relative; overflow: hidden; }
.status-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
}
.status-card .card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.status-card h3 { font-size: 1.1rem; margin-bottom: 4px; }
.status-card .big-number {
  font-size: 3rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
  margin: 12px 0 4px;
}
.status-card .sub { font-size: 0.82rem; color: var(--text-dim); }

.player-list-card { grid-column: 1 / -1; }
.player-table-wrap { overflow-x: auto; }
.player-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.player-table th {
  text-align: left;
  padding: 10px 16px;
  color: var(--text-dim);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.player-table td {
  padding: 10px 16px;
  border-bottom: 1px solid rgba(51,51,51,0.4);
  color: var(--text-muted);
}
.player-table tr:hover td { background: rgba(255,111,26,0.04); color: var(--text); }
.team-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.team-police { background: rgba(52,152,219,0.15); color: #3498db; }
.team-fire   { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.team-dot    { background: rgba(241,196,15,0.15); color: #f1c40f; }
.team-ems    { background: rgba(46,204,113,0.15); color: #2ecc71; }
.team-civ    { background: rgba(149,165,166,0.15); color: #95a5a6; }
.team-911    { background: rgba(155,89,182,0.15); color: #9b59b6; }

/* ── Rules ── */
#rules .rules-container { max-width: 860px; margin: 0 auto; }
.rule-category { margin-bottom: 40px; }
.rule-category h3 {
  color: var(--primary);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rule-category h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.rule-item {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
}
.rule-item:hover { border-color: rgba(255,111,26,0.3); }
.rule-num {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  min-width: 28px;
}
.rule-text { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

/* ── Applications ── */
#applications .dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.dept-card {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.dept-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}
.dept-card:hover::after { transform: scaleX(1); }
.dept-card .dept-icon { font-size: 2.5rem; margin-bottom: 16px; }
.dept-card h3 { margin-bottom: 8px; }
.dept-card .status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 12px;
}
.pill-open  { background: rgba(46,204,113,0.12); color: var(--success); border: 1px solid rgba(46,204,113,0.3); }
.pill-closed{ background: rgba(231,76,60,0.12);  color: var(--danger);  border: 1px solid rgba(231,76,60,0.3); }

/* Application Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.25s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; transition: var(--transition); }
.modal-close:hover { color: var(--danger); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 0.9rem;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select option { background: var(--bg-card2); }

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--radius);
  min-width: 280px;
  font-size: 0.88rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.fadeOut { animation: fadeOut 0.4s ease forwards; }

/* ── Footer ── */
footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo { font-size: 1.1rem; margin-bottom: 14px; }
.footer-brand p { font-size: 0.88rem; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { color: var(--text-muted); font-size: 0.88rem; }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Animations ── */
@keyframes fadeInDown { from { opacity:0; transform: translateY(-12px); } to { opacity:1; transform: none; } }
@keyframes fadeInUp   { from { opacity:0; transform: translateY(16px);  } to { opacity:1; transform: none; } }
@keyframes slideInRight { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: none; } }
@keyframes fadeOut { to { opacity:0; transform: translateX(20px); } }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,111,26,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(255,111,26,0); }
}

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .about-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}
@media (max-width: 700px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-base); border-bottom: 1px solid var(--border); padding: 12px 0; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-buttons { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── SVG icon helpers ── */
.about-feature .icon { color: var(--primary); }
.about-feature .icon svg { display: block; }
.status-card .card-icon { color: var(--primary); }
.status-card .card-icon svg { display: block; }
.dept-logo-sm { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.about-stat-card .dept-logo-sm { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4)); }
.dept-card .dept-icon img { width: 72px; height: 72px; object-fit: contain; display: block; }
