/* ============================================
   MAGEN DAVID BETA — Marketing Site Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark: #0a0a12;
  --bg-card: #12121e;
  --bg-card-hover: #1a1a2e;
  --bg-surface: #16162a;
  --text-primary: #f0f0f5;
  --text-secondary: #9595b0;
  --text-muted: #6565805;
  --accent-red: #e63946;
  --accent-orange: #ff9f1c;
  --accent-yellow: #ffd60a;
  --accent-green: #2ec4b6;
  --accent-blue: #4895ef;
  --gradient-primary: linear-gradient(135deg, #e63946, #ff6b35);
  --gradient-hero: linear-gradient(180deg, #0a0a12 0%, #12122a 100%);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
  --font: 'Segoe UI', 'Arial', 'Helvetica Neue', sans-serif;
  --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-sm { padding: 8px 20px; font-size: 0.9rem; }
.btn-lg { padding: 16px 36px; font-size: 1.15rem; }

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 20px rgba(230,57,70,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(230,57,70,0.5);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(255,255,255,0.2);
}
.btn-outline:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
  text-decoration: none;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10,10,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.logo-icon { font-size: 1.6rem; }
.logo-text { letter-spacing: -0.5px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
  background: var(--gradient-hero);
  overflow: hidden;
}

.hero-bg-animation {
  position: absolute;
  inset: 0;
  opacity: 0.15;
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 20px;
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Hero Map Preview --- */
.hero-preview {
  position: relative;
  z-index: 2;
  margin-top: 60px;
  width: 100%;
  max-width: 700px;
}

.preview-window {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.preview-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.preview-title {
  margin-right: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.preview-canvas {
  position: relative;
  padding: 24px;
  min-height: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #1a1a3a 0%, #0a0a12 100%);
}

.israel-map-svg {
  width: 100%;
  max-width: 320px;
  height: auto;
}

.map-region {
  fill: rgba(255,255,255,0.06);
  stroke: rgba(255,255,255,0.15);
  stroke-width: 1.5;
  transition: fill 0.6s ease, filter 0.6s ease;
}

.map-region.active-early_warning {
  fill: rgba(255,159,28,0.5);
  filter: drop-shadow(0 0 12px rgba(255,159,28,0.6));
}
.map-region.active-alert {
  fill: rgba(230,57,70,0.6);
  filter: drop-shadow(0 0 16px rgba(230,57,70,0.7));
  animation: pulse-alert 1s ease-in-out infinite;
}
.map-region.active-caution {
  fill: rgba(255,214,10,0.45);
  filter: drop-shadow(0 0 10px rgba(255,214,10,0.5));
}
.map-region.active-release {
  fill: rgba(46,196,182,0.4);
  filter: drop-shadow(0 0 10px rgba(46,196,182,0.5));
}

@keyframes pulse-alert {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.alert-popup {
  position: absolute;
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 0.85rem;
  border-right: 4px solid var(--accent-red);
  box-shadow: var(--shadow);
  animation: fadeIn 0.4s ease;
  direction: rtl;
  max-width: 200px;
  pointer-events: none;
  z-index: 5;
}

.alert-popup.type-early_warning { border-right-color: var(--accent-orange); }
.alert-popup.type-alert { border-right-color: var(--accent-red); }
.alert-popup.type-caution { border-right-color: var(--accent-yellow); }
.alert-popup.type-release { border-right-color: var(--accent-green); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Stats Bar --- */
.stats-bar {
  padding: 48px 0;
  background: var(--bg-surface);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  margin-top: 4px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --- Features --- */
.features {
  padding: 100px 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* --- How It Works / Timeline --- */
.how-it-works {
  padding: 100px 0;
  background: var(--bg-surface);
}

.timeline-demo {
  max-width: 700px;
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline-demo::before {
  content: '';
  position: absolute;
  right: 32px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 0;
  position: relative;
}

.step-badge {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  position: relative;
  z-index: 2;
}

.step-badge.early_warning { background: var(--accent-orange); box-shadow: 0 0 20px rgba(255,159,28,0.4); }
.step-badge.alert { background: var(--accent-red); box-shadow: 0 0 20px rgba(230,57,70,0.4); }
.step-badge.caution { background: var(--accent-yellow); color: #222; box-shadow: 0 0 20px rgba(255,214,10,0.4); }
.step-badge.release { background: var(--accent-green); box-shadow: 0 0 20px rgba(46,196,182,0.4); }

.step-content h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  margin-top: 4px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- CTA Section --- */
.cta-section {
  padding: 100px 0;
  text-align: center;
  background: var(--bg-dark);
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(230,57,70,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 36px;
  position: relative;
}

.cta-section .btn { position: relative; }

/* --- Footer --- */
.footer {
  padding: 32px 0;
  background: rgba(0,0,0,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.footer-note {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* =========================================
   REGISTER PAGE
   ========================================= */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 60px;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 48px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
}

.form-card h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.form-card .form-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-red);
  box-shadow: 0 0 0 3px rgba(230,57,70,0.15);
}

.form-group input::placeholder {
  color: var(--text-secondary);
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-red);
}

.form-success {
  display: none;
  text-align: center;
  padding: 24px;
}

.form-success .success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.form-success h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.form-success p {
  color: var(--text-secondary);
}

.form-error {
  display: none;
  background: rgba(230,57,70,0.1);
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--accent-red);
  font-size: 0.9rem;
}

/* =========================================
   DEMO PAGE
   ========================================= */
.demo-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 0;
  min-height: calc(100vh - 65px);
  margin-top: 65px;
}

.demo-map-area {
  position: relative;
  background: radial-gradient(ellipse at center, #1a1a3a 0%, #0a0a12 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.demo-map-svg {
  width: 100%;
  max-width: 450px;
  height: auto;
}

.demo-sidebar {
  background: var(--bg-card);
  border-right: 1px solid rgba(255,255,255,0.06);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-header h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.sidebar-header p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.demo-controls {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
}

.demo-controls .btn {
  flex: 1;
  padding: 10px;
  font-size: 0.85rem;
}

.alert-feed {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.alert-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition);
  animation: slideIn 0.4s ease;
}

.alert-item:hover {
  background: rgba(255,255,255,0.03);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.alert-item-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.alert-type-badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}

.alert-type-badge.early_warning { background: rgba(255,159,28,0.2); color: var(--accent-orange); }
.alert-type-badge.alert { background: rgba(230,57,70,0.2); color: var(--accent-red); }
.alert-type-badge.caution { background: rgba(255,214,10,0.2); color: var(--accent-yellow); }
.alert-type-badge.release { background: rgba(46,196,182,0.2); color: var(--accent-green); }

.alert-item-time {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-right: auto;
}

.alert-item-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.alert-item-regions {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Demo Timeline Bar */
.demo-timeline-bar {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--shadow);
}

.timeline-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.timeline-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
}

.timeline-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* =========================================
   ADMIN PAGE
   ========================================= */
.admin-container {
  max-width: 900px;
  margin: 100px auto 60px;
  padding: 0 24px;
}

.admin-container h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.admin-subtitle {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.admin-stat-card .stat-value {
  font-size: 2rem;
}

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 18px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.admin-table th {
  background: rgba(0,0,0,0.2);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  font-size: 0.95rem;
}

.admin-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.admin-auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 24px;
}

.admin-auth input {
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  width: 300px;
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .demo-layout { grid-template-columns: 1fr; }
  .demo-sidebar { max-height: 50vh; }
  .demo-map-area { min-height: 50vh; }
  .footer-inner { flex-direction: column; text-align: center; }
  .form-card { padding: 32px 20px; }
  .admin-stats-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .timeline-demo::before { right: 30px; }
  .nav-links a:not(.btn) { display: none; }
}
