:root {
  --bg-primary: #0a0e27;
  --bg-secondary: #1a1f3a;
  --bg-tertiary: #2a3050;
  --bg-overlay: rgba(10, 14, 39, 0.95);
  --accent-primary: #c084fc;
  --accent-secondary: #8b5cf6;
  --accent-tertiary: #a78bfa;
  --accent-glow: rgba(192, 132, 252, 0.3);
  --security-primary: #f97316;
  --security-secondary: #fb923c;
  --security-accent: #fed7aa;
  --security-glow: rgba(249, 115, 22, 0.3);
  --success-primary: #10b981;
  --success-secondary: #34d399;
  --success-glow: rgba(16, 185, 129, 0.3);
  --warning-primary: #f59e0b;
  --warning-secondary: #fbbf24;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --danger-primary: #ef4444;
  --danger-secondary: #f87171;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --text-primary: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #c084fc;
  --text-security: #f97316;
  --border-primary: #334155;
  --border-secondary: #475569;
  --border-accent: #6366f1;
  --border-dreamsnail: #c084fc;
  --border-security: #f97316;
  --gradient-primary: linear-gradient(135deg, #c084fc 0%, #8b5cf6 100%);
  --gradient-security: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  --gradient-success: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  --gradient-danger: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
  --gradient-bg: linear-gradient(180deg, #0a0e27 0%, #1a1f3a 50%, #2a3050 100%);
  --gradient-card: linear-gradient(145deg, #1a1f3a 0%, #2a3050 100%);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow-purple: 0 0 20px var(--accent-glow);
  --shadow-glow-orange: 0 0 20px var(--security-glow);
  --shadow-glow-success: 0 0 20px var(--success-glow);
  --backdrop-blur: blur(10px);
  --backdrop-blur-lg: blur(20px);
  --navbar-height: 60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-tertiary); }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { color: var(--text-primary); font-weight: 600; line-height: 1.3; margin-bottom: 0.5em; }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
p { color: var(--text-secondary); margin-bottom: 1rem; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; }
.container-lg { max-width: 1400px; }
.text-center { text-align: center; }
.text-gradient { background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-security-gradient { background: var(--gradient-security); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  background: var(--bg-overlay);
  backdrop-filter: var(--backdrop-blur-lg);
  border-bottom: 1px solid var(--border-primary);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  z-index: 1000;
}
.navbar-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); text-decoration: none;
}
.navbar-brand .brand-purple { color: var(--accent-primary); }
.navbar-brand .brand-orange { color: var(--security-primary); }
.navbar-nav { display: flex; align-items: center; gap: 0.25rem; list-style: none; margin-left: auto; }
.navbar-nav a {
  display: flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.75rem; color: var(--text-tertiary);
  font-size: 0.85rem; border-radius: 6px; transition: all 0.3s;
}
.navbar-nav a:hover, .navbar-nav a.active { color: var(--text-accent); background: var(--accent-glow); }
.navbar-actions { display: flex; gap: 0.5rem; align-items: center; margin-left: 1rem; }
.admin-mini-btn {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(249, 115, 22, 0.15); border: 1px solid rgba(249, 115, 22, 0.3);
  text-decoration: none; font-size: 0.9rem; transition: all 0.3s; flex-shrink: 0;
}
.admin-mini-btn:hover { background: rgba(249, 115, 22, 0.3); border-color: var(--security-primary); box-shadow: 0 0 12px rgba(249, 115, 22, 0.3); transform: scale(1.1); }
.navbar-toggle { display: none; background: none; border: 1px solid var(--border-primary); color: var(--text-primary); padding: 0.4rem 0.6rem; border-radius: 6px; cursor: pointer; font-size: 1.2rem; }

.hero {
  min-height: 60vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  padding: calc(var(--navbar-height) + 4rem) 1.5rem 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 50%, var(--accent-glow) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, var(--security-glow) 0%, transparent 50%);
  animation: pulse-glow 8s ease-in-out infinite;
}
@keyframes pulse-glow { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
.hero::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), var(--security-primary), transparent);
}
.hero-content { position: relative; z-index: 1; max-width: 800px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.hero p { font-size: 1.15rem; color: var(--text-tertiary); max-width: 600px; margin: 0 auto 2rem; }
.hero-badge {
  display: inline-block; padding: 0.5rem 1.5rem;
  background: var(--accent-glow); border: 1px solid var(--accent-primary);
  border-radius: 50px; color: var(--accent-primary);
  font-size: 0.85rem; font-weight: 600; margin-bottom: 1.5rem;
}
.hero-sm { min-height: 30vh; padding-top: calc(var(--navbar-height) + 2rem); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem; border: none; border-radius: 8px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all 0.3s ease; text-decoration: none; position: relative; overflow: hidden;
}
.btn::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}
.btn:hover::before { left: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--gradient-primary); color: white; box-shadow: var(--shadow-glow-purple); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow-purple); }
.btn-security { background: var(--gradient-security); color: white; box-shadow: var(--shadow-glow-orange); }
.btn-security:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow-orange); }
.btn-success { background: var(--gradient-success); color: white; }
.btn-success:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--shadow-glow-success); }
.btn-danger { background: var(--gradient-danger); color: white; }
.btn-warning { background: var(--gradient-warning); color: #000; }
.btn-outline { background: transparent; border: 2px solid var(--accent-primary); color: var(--accent-primary); }
.btn-outline:hover { background: var(--accent-primary); color: white; }
.btn-outline-security { background: transparent; border: 2px solid var(--security-primary); color: var(--security-primary); }
.btn-outline-security:hover { background: var(--security-primary); color: white; }
.btn-ghost { background: transparent; color: var(--text-tertiary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; }
.btn-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.card {
  background: var(--gradient-card); border: 1px solid var(--border-primary);
  border-radius: 12px; padding: 1.5rem;
  backdrop-filter: var(--backdrop-blur);
  box-shadow: var(--shadow-md); transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--border-accent); }
.card-dreamsnail { border-color: var(--border-dreamsnail); }
.card-dreamsnail:hover { box-shadow: var(--shadow-lg), var(--shadow-glow-purple); }
.card-security { border-color: var(--border-security); }
.card-security:hover { box-shadow: var(--shadow-lg), var(--shadow-glow-orange); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-primary); }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0; }
.card-body { flex: 1; }
.card-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-primary); display: flex; align-items: center; justify-content: space-between; }
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card-stat { text-align: center; padding: 1.5rem; }
.card-stat .stat-value { font-size: 2.5rem; font-weight: 700; color: var(--accent-primary); line-height: 1; margin-bottom: 0.25rem; }
.card-stat .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; color: var(--text-accent); font-weight: 600; font-size: 0.85rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 0.7rem 0.85rem;
  background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  border-radius: 8px; color: var(--text-primary); font-size: 0.95rem;
  transition: all 0.3s ease; outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--bg-secondary);
}
.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }
.form-help { margin-top: 0.25rem; font-size: 0.8rem; color: var(--text-muted); }
.form-error { margin-top: 0.25rem; font-size: 0.8rem; color: var(--danger-primary); }

.table-container { width: 100%; overflow-x: auto; border-radius: 12px; border: 1px solid var(--border-primary); }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; background: var(--bg-secondary); border-bottom: 2px solid var(--border-primary); }
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-primary); color: var(--text-secondary); }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(192, 132, 252, 0.05); }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8);
  backdrop-filter: var(--backdrop-blur-lg); display: flex; align-items: center; justify-content: center;
  z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s; padding: 1rem;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-secondary); border: 1px solid var(--border-primary);
  border-radius: 16px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(0.95); transition: transform 0.3s;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-primary); }
.modal-header h3 { margin-bottom: 0; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.25rem; cursor: pointer; padding: 0.25rem; border-radius: 4px; }
.modal-close:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.modal-body { padding: 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-primary); }

.modal-wide {
  max-width: 880px; display: flex; border-radius: 20px; overflow: hidden;
  background: var(--bg-primary); border: 1px solid var(--border-primary);
}
.modal-wide .modal-showcase {
  width: 380px; flex-shrink: 0; padding: 2.5rem 2rem;
  background: linear-gradient(160deg, rgba(192, 132, 252, 0.12) 0%, rgba(139, 92, 246, 0.06) 40%, rgba(249, 115, 22, 0.08) 100%);
  border-right: 1px solid var(--border-primary); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.modal-wide .modal-showcase::before {
  content: ''; position: absolute; top: -80px; right: -80px; width: 200px; height: 200px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: showcase-glow 4s ease-in-out infinite alternate;
}
.modal-wide .modal-showcase::after {
  content: ''; position: absolute; bottom: -60px; left: -60px; width: 160px; height: 160px;
  background: radial-gradient(circle, var(--security-glow) 0%, transparent 70%);
  animation: showcase-glow 5s ease-in-out infinite alternate-reverse;
}
@keyframes showcase-glow { 0% { opacity: 0.4; transform: scale(0.9); } 100% { opacity: 0.8; transform: scale(1.1); } }
.modal-showcase-logo { font-size: 2rem; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.modal-showcase-title { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; position: relative; z-index: 1; }
.modal-showcase-sub { font-size: 0.85rem; color: var(--text-tertiary); margin-bottom: 2rem; position: relative; z-index: 1; }
.modal-features { list-style: none; padding: 0; margin: 0 0 2rem 0; position: relative; z-index: 1; }
.modal-features li {
  display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.6rem 0;
  font-size: 0.85rem; color: var(--text-secondary);
}
.modal-feature-icon {
  width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.modal-feature-icon.purple { background: rgba(192, 132, 252, 0.15); border: 1px solid rgba(192, 132, 252, 0.3); }
.modal-feature-icon.orange { background: rgba(249, 115, 22, 0.15); border: 1px solid rgba(249, 115, 22, 0.3); }
.modal-feature-icon.green { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.3); }
.modal-feature-icon.blue { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.modal-feature-text strong { display: block; color: var(--text-primary); font-size: 0.85rem; margin-bottom: 2px; }
.modal-feature-text span { font-size: 0.78rem; color: var(--text-muted); }
.modal-tier-preview {
  margin-top: auto; padding: 1rem; border-radius: 12px; position: relative; z-index: 1;
  background: rgba(10, 14, 39, 0.6); border: 1px solid var(--border-primary);
}
.modal-tier-preview h5 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.5rem; }
.tier-ladder { display: flex; gap: 0.25rem; align-items: flex-end; }
.tier-step {
  flex: 1; text-align: center; padding: 0.4rem 0.25rem; border-radius: 6px; font-size: 0.65rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; transition: all 0.3s;
  cursor: default; position: relative;
}
.tier-step.cadet { background: rgba(100, 116, 139, 0.2); color: #94a3b8; min-height: 36px; }
.tier-step.lieutenant { background: rgba(59, 130, 246, 0.2); color: #60a5fa; min-height: 44px; }
.tier-step.commander { background: rgba(147, 51, 234, 0.2); color: #a78bfa; min-height: 52px; }
.tier-step.captain { background: rgba(234, 179, 8, 0.2); color: #fbbf24; min-height: 60px; }
.tier-step.active-tier { animation: tier-pulse 2s infinite; }
@keyframes tier-pulse { 0%, 100% { box-shadow: none; } 50% { box-shadow: 0 0 12px currentColor; } }
.modal-wide .modal-form-side {
  flex: 1; padding: 2rem 2.5rem; display: flex; flex-direction: column; justify-content: center;
  background: var(--bg-secondary);
}
.modal-form-side .modal-close {
  position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; z-index: 10;
}
.modal-form-side h3 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.modal-form-side .form-subtitle { color: var(--text-tertiary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.modal-form-side .form-group { margin-bottom: 1rem; }
.modal-form-side .form-label { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.modal-form-side .form-input { padding: 0.85rem 1rem; font-size: 0.95rem; background: var(--bg-primary); }
.modal-form-side .form-input:focus { background: var(--bg-tertiary); }
.modal-form-side .form-divider {
  display: flex; align-items: center; gap: 1rem; margin: 1.25rem 0;
  color: var(--text-muted); font-size: 0.8rem;
}
.modal-form-side .form-divider::before, .modal-form-side .form-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border-primary);
}
.modal-form-side .switch-text { text-align: center; margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-muted); }
.modal-form-side .switch-text a, .modal-form-side .switch-text button {
  color: var(--accent-primary); font-weight: 600; background: none; border: none; cursor: pointer;
  font-size: 0.85rem; text-decoration: underline;
}
.password-strength { height: 3px; border-radius: 2px; background: var(--bg-primary); margin-top: 0.5rem; overflow: hidden; }
.password-strength-bar { height: 100%; border-radius: 2px; transition: width 0.3s, background 0.3s; width: 0; }
.strength-weak { width: 25%; background: var(--danger-primary); }
.strength-fair { width: 50%; background: var(--warning-primary); }
.strength-good { width: 75%; background: var(--accent-primary); }
.strength-strong { width: 100%; background: var(--success-primary); }
.password-label { display: flex; justify-content: space-between; align-items: center; }
.password-label .strength-text { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; }

.social-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.7rem 0.75rem; border-radius: 10px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s; border: 1px solid var(--border-primary);
  background: var(--bg-tertiary); color: var(--text-primary); text-decoration: none;
}
.btn-social:hover { transform: translateY(-1px); }
.btn-social svg, .btn-social img { width: 18px; height: 18px; flex-shrink: 0; }
.btn-social.btn-farcaster {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  border-color: #7C3AED; color: white;
}
.btn-social.btn-farcaster:hover { box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4); }
.btn-social.btn-x {
  background: #000000; border-color: #333; color: white;
}
.btn-social.btn-x:hover { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); background: #1a1a1a; }
.btn-social.btn-google {
  background: #ffffff; border-color: #dadce0; color: #3c4043;
}
.btn-social.btn-google:hover { box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3); background: #f8f9fa; }
.btn-social.btn-email {
  background: var(--bg-tertiary); border-color: var(--accent-primary); color: var(--accent-primary);
}
.btn-social.btn-email:hover { box-shadow: 0 4px 15px var(--accent-glow); background: rgba(192, 132, 252, 0.1); }

@media (max-width: 768px) {
  .modal-wide { flex-direction: column; max-width: 95%; max-height: 95vh; }
  .modal-wide .modal-showcase { width: 100%; padding: 1.5rem; border-right: none; border-bottom: 1px solid var(--border-primary); }
  .modal-features { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .modal-tier-preview { display: none; }
  .modal-wide .modal-form-side { padding: 1.5rem; }
  .social-buttons { grid-template-columns: 1fr 1fr; }
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.2rem 0.6rem; font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; border-radius: 50px; border: 1px solid transparent;
}
.badge-cadet { background: rgba(100, 116, 139, 0.2); color: #94a3b8; border-color: rgba(100, 116, 139, 0.4); }
.badge-lieutenant { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); }
.badge-commander { background: rgba(147, 51, 234, 0.2); color: #a78bfa; border-color: rgba(147, 51, 234, 0.4); }
.badge-captain { background: rgba(234, 179, 8, 0.2); color: #fbbf24; border-color: rgba(234, 179, 8, 0.4); }
.badge-dreamsnail { background: var(--gradient-primary); color: white; }
.badge-security { background: var(--gradient-security); color: white; }
.badge-success { background: rgba(16, 185, 129, 0.2); color: var(--success-secondary); border-color: rgba(16, 185, 129, 0.4); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: var(--warning-secondary); border-color: rgba(245, 158, 11, 0.4); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: var(--danger-secondary); border-color: rgba(239, 68, 68, 0.4); }
.badge-pro { background: linear-gradient(135deg, #c084fc, #f97316); color: white; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot-online { background: var(--success-primary); box-shadow: 0 0 6px var(--success-primary); animation: pulse-dot 2s infinite; }
.status-dot-offline { background: var(--text-muted); }
.status-dot-warning { background: var(--warning-primary); box-shadow: 0 0 6px var(--warning-primary); }
.status-dot-danger { background: var(--danger-primary); box-shadow: 0 0 6px var(--danger-primary); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.progress-bar { width: 100%; height: 8px; background: var(--bg-primary); border-radius: 50px; overflow: hidden; border: 1px solid var(--border-primary); }
.progress-bar-fill { height: 100%; border-radius: 50px; transition: width 0.5s ease; }
.progress-bar-fill.purple { background: var(--gradient-primary); }
.progress-bar-fill.orange { background: var(--gradient-security); }
.progress-bar-fill.green { background: var(--gradient-success); }

.alert { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.alert-success { background: var(--success-glow); border: 1px solid var(--success-primary); }
.alert-warning { background: var(--warning-glow); border: 1px solid var(--warning-primary); }
.alert-danger { background: var(--danger-glow); border: 1px solid var(--danger-primary); }
.alert-info { background: var(--accent-glow); border: 1px solid var(--accent-primary); }
.alert-security { background: var(--security-glow); border: 1px solid var(--security-primary); }

.loading { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: var(--accent-primary); animation: spin 1s ease-in-out infinite; }
.loading-lg { width: 40px; height: 40px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-tertiary); max-width: 600px; margin: 0 auto; }

.pricing-card { text-align: center; position: relative; }
.pricing-card.featured { border-color: var(--accent-primary); }
.pricing-card.featured::before { content: 'RECOMMENDED'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gradient-primary); color: white; padding: 0.25rem 1rem; border-radius: 20px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.05em; }
.price { font-size: 3rem; font-weight: 700; color: var(--text-primary); }
.price span { font-size: 1rem; color: var(--text-tertiary); }
.price-features { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; }
.price-features li { padding: 0.5rem 0; color: var(--text-secondary); border-bottom: 1px solid var(--border-primary); display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.price-features li::before { content: '✓'; color: var(--success-primary); font-weight: 700; }

.page-header { padding: calc(var(--navbar-height) + 2rem) 0 2rem; border-bottom: 1px solid var(--border-primary); margin-bottom: 2rem; }
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { color: var(--text-tertiary); margin: 0; }

.two-column { display: grid; grid-template-columns: 250px 1fr; gap: 2rem; }
.sidebar { position: sticky; top: calc(var(--navbar-height) + 1rem); }
.sidebar-link { display: block; padding: 0.75rem 1rem; color: var(--text-secondary); border-radius: 8px; margin-bottom: 0.25rem; transition: all 0.3s; cursor: pointer; font-size: 0.9rem; }
.sidebar-link:hover, .sidebar-link.active { background: var(--accent-glow); color: var(--accent-primary); }

.tab-bar { display: flex; border-bottom: 1px solid var(--border-primary); margin-bottom: 1.5rem; }
.tab { padding: 0.75rem 1.25rem; color: var(--text-tertiary); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.3s; font-weight: 500; font-size: 0.9rem; }
.tab:hover { color: var(--text-primary); }
.tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

.activity-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border-primary); }
.activity-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.activity-icon.purple { background: var(--accent-glow); }
.activity-icon.orange { background: var(--security-glow); }
.activity-icon.green { background: var(--success-glow); }
.activity-details { flex: 1; }
.activity-details .label { font-size: 0.9rem; color: var(--text-primary); }
.activity-details .time { font-size: 0.8rem; color: var(--text-muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.footer { background: var(--bg-primary); border-top: 1px solid var(--border-primary); padding: 3rem 0 1.5rem; margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer h4 { color: var(--accent-primary); margin-bottom: 1rem; font-size: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--text-tertiary); font-size: 0.85rem; }
.footer-links a:hover { color: var(--accent-primary); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid var(--border-primary); color: var(--text-muted); font-size: 0.8rem; }

.danger-zone { border: 1px solid var(--danger-primary); border-radius: 12px; padding: 1.5rem; background: var(--danger-glow); }
.danger-zone h4 { color: var(--danger-primary); }

.toggle { position: relative; width: 44px; height: 24px; background: var(--border-secondary); border-radius: 12px; cursor: pointer; transition: background 0.3s; border: none; }
.toggle.active { background: var(--accent-primary); }
.toggle::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: white; top: 3px; left: 3px; transition: transform 0.3s; }
.toggle.active::after { transform: translateX(20px); }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }

.glow-purple { box-shadow: var(--shadow-glow-purple); }
.glow-orange { box-shadow: var(--shadow-glow-orange); }

.empty-state { text-align: center; padding: 3rem; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

.toast { position: fixed; bottom: 2rem; right: 2rem; padding: 1rem 1.5rem; border-radius: 8px; z-index: 3000; transform: translateY(100px); opacity: 0; transition: all 0.3s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--success-primary); color: white; }
.toast-danger { background: var(--danger-primary); color: white; }
.toast-info { background: var(--accent-secondary); color: white; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .two-column { grid-template-columns: 1fr; }
  .sidebar { position: static; display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 1rem; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero h1 { font-size: 2rem; }
  .hero { min-height: 50vh; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .navbar-nav { display: none; }
  .navbar-toggle { display: block; }
  .navbar-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-overlay); backdrop-filter: var(--backdrop-blur-lg); padding: 1rem; border-bottom: 1px solid var(--border-primary); }
  .modal { max-width: 95%; }
  .pricing-card.featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tab-bar { overflow-x: auto; }
  .tab { white-space: nowrap; font-size: 0.8rem; padding: 0.5rem 0.75rem; }
  .stat-value { font-size: 2rem !important; }
  .container { padding: 0 1rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
}

.ship-card { margin-bottom: 1.5rem; }
.ship-card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.ship-card-icon { font-size: 3rem; width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; background: rgba(192, 132, 252, 0.1); border-radius: 16px; border: 1px solid rgba(192, 132, 252, 0.2); flex-shrink: 0; }
.ship-card-name { font-size: 1.3rem; margin: 0 0 0.3rem; }
.ship-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.5rem; }
.ship-stat-item { padding: 0; }
.ship-stat-header { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.ship-stat-track { height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.ship-stat-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.ship-stat-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; font-size: 0.8rem; }
.ship-stat-label { width: 60px; color: var(--text-secondary); flex-shrink: 0; }
.ship-stat-val { width: 30px; text-align: right; color: var(--text-primary); font-weight: 600; flex-shrink: 0; }
.ship-stat-row .ship-stat-track { flex: 1; }
.ship-card-actions { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border-primary); padding-top: 1rem; }
.ship-class-card { text-align: center; }
.ship-class-card .ship-stat-bars { text-align: left; }
.badge-runabout { background: rgba(148,163,184,0.2); color: #94a3b8; }
.badge-shuttle { background: rgba(96,165,250,0.2); color: #60a5fa; }
.badge-cruiser { background: rgba(192,132,252,0.2); color: #c084fc; }
.badge-flagship { background: rgba(249,115,22,0.2); color: #f97316; }
@media (max-width: 768px) { .ship-stats-grid { grid-template-columns: 1fr; } .ship-card-header { flex-direction: column; text-align: center; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
@media (prefers-contrast: high) { :root { --text-primary: #ffffff; --text-secondary: #ffffff; --border-primary: #ffffff; --bg-primary: #000000; --bg-secondary: #1a1a1a; } }
.btn:focus, .form-input:focus, .form-select:focus { outline: 2px solid var(--accent-primary); outline-offset: 2px; }

#chatToggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--security-primary));
  border: none; cursor: pointer; font-size: 1.5rem; color: #fff;
  box-shadow: 0 4px 20px rgba(192,132,252,0.4);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; align-items: center; justify-content: center;
}
#chatToggle:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(192,132,252,0.6); }
#chatToggle.active { background: var(--bg-tertiary); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

#openclawChat {
  position: fixed; bottom: 90px; right: 24px; z-index: 999;
  width: 380px; max-height: 520px; border-radius: 16px;
  background: var(--bg-secondary); border: 1px solid var(--border-primary);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(0.95); opacity: 0; pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
#openclawChat.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.chat-header {
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-primary);
  background: linear-gradient(135deg, rgba(192,132,252,0.1), rgba(249,115,22,0.1));
  border-radius: 16px 16px 0 0;
}
.chat-header-icon { font-size: 1.4rem; }
.chat-header-info h4 { margin: 0; font-size: 0.9rem; color: var(--text-primary); }
.chat-header-info span { font-size: 0.75rem; color: var(--success-primary); }
.chat-clear { margin-left: auto; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; padding: 4px 8px; border-radius: 6px; }
.chat-clear:hover { background: var(--bg-tertiary); color: var(--text-secondary); }

#chatMessages {
  flex: 1; overflow-y: auto; padding: 12px; min-height: 300px; max-height: 360px;
  display: flex; flex-direction: column; gap: 10px;
}
#chatMessages::-webkit-scrollbar { width: 4px; }
#chatMessages::-webkit-scrollbar-thumb { background: var(--border-primary); border-radius: 4px; }

.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-user { flex-direction: row-reverse; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; background: var(--bg-tertiary); }
.chat-bubble {
  max-width: 80%; padding: 10px 14px; border-radius: 12px;
  font-size: 0.85rem; line-height: 1.5; color: var(--text-primary);
}
.chat-assistant .chat-bubble { background: var(--bg-tertiary); border-bottom-left-radius: 4px; }
.chat-user .chat-bubble { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); border-bottom-right-radius: 4px; }
.chat-bubble code { background: rgba(0,0,0,0.3); padding: 1px 5px; border-radius: 4px; font-size: 0.8rem; }

.chat-input-area {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border-primary);
  border-radius: 0 0 16px 16px; background: var(--bg-primary);
}
#chatInput {
  flex: 1; background: var(--bg-tertiary); border: 1px solid var(--border-primary);
  border-radius: 8px; padding: 8px 12px; color: var(--text-primary);
  font-size: 0.85rem; resize: none; font-family: inherit; outline: none;
}
#chatInput:focus { border-color: var(--accent-primary); }
#chatInput::placeholder { color: var(--text-muted); }
#chatSend {
  background: linear-gradient(135deg, var(--accent-primary), var(--security-primary));
  border: none; border-radius: 8px; padding: 8px 14px; color: #fff;
  cursor: pointer; font-size: 0.9rem; transition: opacity 0.2s;
}
#chatSend:hover { opacity: 0.85; }

.typing-dots span { animation: blink 1.4s infinite both; font-size: 1.2rem; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }

@media (max-width: 480px) {
  #openclawChat { width: calc(100vw - 24px); right: 12px; bottom: 80px; max-height: 70vh; }
  #chatToggle { bottom: 16px; right: 16px; }
}

.mission-card {
  background: var(--bg-tertiary); border-radius: 12px; padding: 16px;
  border: 1px solid var(--border-primary); transition: border-color 0.2s;
}
.mission-card:hover { border-color: var(--accent-primary); }
.mission-card.locked { opacity: 0.5; }
.mission-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mission-card-header h4 { margin: 0; font-size: 0.95rem; }
.mission-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.mission-meta .badge { font-size: 0.7rem; }
.mission-desc { color: var(--text-tertiary); font-size: 0.85rem; margin-bottom: 12px; }
.mission-rewards { display: flex; gap: 16px; margin-bottom: 12px; }
.mission-reward { text-align: center; }
.mission-reward .value { font-weight: 700; color: var(--accent-primary); font-size: 1.1rem; }
.mission-reward .label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; }
.mission-lock-msg { color: var(--warning-primary); font-size: 0.8rem; font-style: italic; }

.active-mission-banner {
  background: linear-gradient(135deg, rgba(192,132,252,0.15), rgba(249,115,22,0.15));
  border: 1px solid var(--accent-primary); border-radius: 12px;
  padding: 20px; margin-bottom: 24px; text-align: center;
}
.active-mission-banner h3 { margin: 0 0 8px; }
.mission-timer { font-size: 1.5rem; font-weight: 700; color: var(--accent-primary); margin: 8px 0; }
.mission-progress-bar { height: 6px; background: var(--bg-tertiary); border-radius: 3px; margin: 12px 0; overflow: hidden; }
.mission-progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--security-primary)); border-radius: 3px; transition: width 1s linear; }

.user-stats-bar {
  display: flex; gap: 20px; align-items: center; padding: 12px 16px;
  background: var(--bg-tertiary); border-radius: 10px; margin-bottom: 20px;
  flex-wrap: wrap;
}
.user-stat { display: flex; align-items: center; gap: 6px; }
.user-stat .icon { font-size: 1rem; }
.user-stat .val { font-weight: 700; color: var(--text-primary); }
.user-stat .lbl { font-size: 0.75rem; color: var(--text-muted); }

.shipyard-tabs {
  display: flex; gap: 0.5rem; padding: 0.25rem;
  background: var(--bg-secondary); border-radius: 12px; width: fit-content;
}
.shipyard-tab {
  padding: 0.6rem 1.5rem; border-radius: 10px; border: none;
  background: transparent; color: var(--text-secondary);
  cursor: pointer; font-size: 0.9rem; font-weight: 600;
  transition: all 0.2s ease;
}
.shipyard-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.shipyard-tab.active { background: var(--accent-primary); color: #fff; }

.crew-section {
  border-top: 1px solid var(--border-primary); padding-top: 1rem; margin-top: 1rem;
}
.crew-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem;
}
.crew-header h4 { margin: 0; font-size: 0.95rem; }
.crew-roster {
  display: grid; gap: 0.5rem;
}
.officer-card {
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--bg-tertiary); border-radius: 8px; padding: 0.6rem 0.75rem;
  transition: background 0.2s;
}
.officer-card:hover { background: var(--bg-secondary); }
.officer-portrait { font-size: 1.5rem; flex-shrink: 0; }
.officer-info { flex: 1; min-width: 0; }
.officer-name { font-weight: 600; font-size: 0.85rem; color: var(--text-primary); }
.officer-role { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.1rem; }
.officer-bonuses { margin-top: 0.15rem; }
.officer-unassign {
  flex-shrink: 0; padding: 0.2rem 0.5rem; font-size: 0.8rem;
  opacity: 0.5; transition: opacity 0.2s;
}
.officer-unassign:hover { opacity: 1; color: var(--danger-primary); }
.officer-assign-card:hover { border-color: var(--accent-primary); }
