/* ===== NightAdvisor Website — Shared Styles ===== */

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

:root {
  --bg: #06080d;
  --surface: #0d1117;
  --surface2: #161b22;
  --border: #21262d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --accent: #a78bfa;
  --accent2: #818cf8;
  --green: #3fb950;
  --red: #f85149;
  --amber: #d29922;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Space Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

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

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 16px 0;
  background: rgba(6, 8, 13, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

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

.nav-logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 20px; font-weight: 700; color: var(--text);
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }
.nav-logo span:first-child { font-size: 24px; }

.nav-brand {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font);
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--accent); }

.btn-sm { padding: 7px 16px; font-size: 13px; }

.btn-danger {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover { background: rgba(248, 81, 73, 0.25); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== SECTION LABELS ===== */
.section-label {
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

h2 {
  font-size: 36px; font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px; color: var(--text-muted);
  max-width: 500px;
  margin-bottom: 48px;
}

/* ===== CARDS ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: rgba(167, 139, 250, 0.3);
}

/* ===== FORMS ===== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--accent);
  outline: none;
}

.form-input::placeholder { color: #4b5563; }

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.form-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ===== FOOTER ===== */
footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  margin-top: 80px;
}

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

.footer-copy {
  font-size: 13px; color: var(--text-muted);
}

.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-muted); }

/* ===== ALERTS ===== */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.25);
  color: var(--green);
}

.alert-error {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.25);
  color: var(--red);
}

.alert-info {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--accent);
}

/* ===== LOADING SPINNER ===== */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid rgba(167, 139, 250, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.badge-green { background: rgba(63, 185, 80, 0.15); color: var(--green); }
.badge-amber { background: rgba(210, 153, 34, 0.15); color: var(--amber); }
.badge-red { background: rgba(248, 81, 73, 0.15); color: var(--red); }
.badge-purple { background: rgba(167, 139, 250, 0.15); color: var(--accent); }

/* ===== ANIMATIONS ===== */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .nav-links a:not(.btn) { display: none; }
  .form-row { grid-template-columns: 1fr; }
  footer .container { flex-direction: column; gap: 16px; text-align: center; }
  h2 { font-size: 28px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
}
