/* Universal Design System - Cybersecurity Playground */

:root {
  /* Colors - Dark Mode (Default) */
  --color-brand-green: #00ff88;
  --color-brand-neon: #00ff00;
  
  --bg-page: #0a0e14;
  --bg-surface: #141922;
  --bg-card: #1a1f2e;
  --bg-input: #1e2433;
  --bg-hover: #252b3a;
  
  --text-primary: #e8eef5;
  --text-secondary: #a0a8b5;
  --text-muted: #6b7280;
  
  --border-subtle: rgba(0, 255, 136, 0.12);
  --border-medium: rgba(0, 255, 136, 0.25);
  --border-strong: rgba(0, 255, 136, 0.4);
  
  --gradient-card: linear-gradient(135deg, rgba(0, 255, 136, 0.08) 0%, rgba(26, 31, 46, 1) 100%);
  
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 4px 24px rgba(0, 255, 136, 0.15);
  
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  
  --transition-fast: 150ms ease;
}

/* Light Mode - Matching xploremoreabout.me */
[data-theme="light"] {
  --color-brand-green: #00cc70;
  --color-brand-neon: #00aa00;
  
  /* Backgrounds - Gray/Beige like main site */
  --bg-page: #d4d8d8;              /* Light gray page background */
  --bg-surface: #e8ecec;           /* Slightly lighter surface */
  --bg-card: #3a4244;              /* Dark gray cards (like main site) */
  --bg-input: #ffffff;             /* White inputs */
  --bg-hover: #4a5254;             /* Hover state for cards */
  
  /* Text - Inverted for dark cards */
  --text-primary: #ffffff;         /* White text on dark cards */
  --text-secondary: #d0d4d4;       /* Light gray secondary text */
  --text-muted: #a0a8a8;           /* Muted text */
  
  /* Borders */
  --border-subtle: rgba(0, 150, 100, 0.2);
  --border-medium: rgba(0, 150, 100, 0.35);
  --border-strong: rgba(0, 150, 100, 0.5);
  
  /* Gradient for cards */
  --gradient-card: linear-gradient(135deg, rgba(58, 66, 68, 1) 0%, rgba(48, 54, 56, 1) 100%);
  
  /* Shadows */
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 4px 24px rgba(0, 200, 120, 0.2);
}

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

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  padding-bottom: 3rem;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.module-header {
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.heading {
  font-weight: 700;
  line-height: 1.2;
}

.heading--hero {
  font-size: 2.5rem;
  color: var(--color-brand-neon);
  margin-bottom: 0.5rem;
}

.heading--md {
  font-size: 1.25rem;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.tab {
  background: none;
  border: none;
  padding: 0.75rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--color-brand-green);
  border-bottom-color: var(--color-brand-green);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Cards */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
}

.card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-glow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn--primary {
  background: var(--color-brand-green);
  color: #000000;
}

.btn--primary:hover {
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
  transform: translateY(-1px);
}

.btn--secondary {
  background: rgba(0, 255, 136, 0.1);
  color: var(--color-brand-green);
  border: 1px solid var(--border-medium);
}

.btn--secondary:hover {
  background: rgba(0, 255, 136, 0.2);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn--ghost:hover {
  background: var(--bg-hover);
}

.btn--icon {
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Inputs */
.input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

/* Light mode input text color fix */
[data-theme="light"] .input {
  color: #2a2a2a;
}

[data-theme="light"] .input::placeholder {
  color: #888888;
}

.input:focus {
  outline: none;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.input--mono {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9rem;
}

.label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Output Group */
.output-card {
  position: relative;
}

.output-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.output-group .input {
  flex: 1;
}

.output-actions {
  display: flex;
  gap: 0.5rem;
}

/* Slider */
.slider {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--color-brand-green);
  border-radius: 50%;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--color-brand-green);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* Checkboxes & Radios */
.checkbox-grid,
.radio-group {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.checkbox-label,
.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.checkbox-label:hover,
.radio-label:hover {
  color: var(--text-primary);
}

.checkbox-label input,
.radio-label input {
  cursor: pointer;
}

/* Progress Bar */
.progress {
  width: 100%;
  height: 10px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

[data-theme="light"] .progress {
  background: rgba(0, 0, 0, 0.1);
}

.progress__bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease, background 0.3s ease;
}

/* Badges */
.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge--success {
  background: rgba(0, 255, 136, 0.15);
  color: var(--color-brand-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge--warning {
  background: rgba(255, 170, 0, 0.15);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.3);
}

.badge--danger {
  background: rgba(255, 68, 68, 0.15);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

/* Vault List */
.vault-list {
  max-height: 400px;
  overflow-y: auto;
}

.vault-item {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

[data-theme="light"] .vault-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 100, 80, 0.2);
}

.vault-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.vault-item-title {
  font-weight: 600;
  color: var(--text-primary);
}

[data-theme="light"] .vault-item-title {
  color: #2a2a2a;
}

.vault-item-password {
  font-family: 'Consolas', monospace;
  color: var(--text-secondary);
  margin: 0.5rem 0;
}

[data-theme="light"] .vault-item-password {
  color: #555555;
}

.vault-item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  color: var(--text-primary);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Utility */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: 1rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.text-secondary {
  color: var(--text-secondary);
}

.text-mono {
  font-family: 'Consolas', monospace;
}

.text-accent {
  color: var(--color-brand-green);
}

.form-group {
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .heading--hero {
    font-size: 2rem;
  }
  
  .output-group {
    flex-direction: column;
  }
  
  .output-actions {
    width: 100%;
  }
  
  .output-actions .btn {
    flex: 1;
  }
}


/* ========================================
   LIGHT MODE IMPROVEMENTS - Better Contrast
   ======================================== */

[data-theme="light"] {
  /* Page background - lighter */
  --bg-page: #e8ecec;
  
  /* Surface - for tab backgrounds */
  --bg-surface: #f5f5f5;
  
  /* Cards - much lighter, not dark gray */
  --bg-card: #ffffff;
  --bg-input: #f8f8f8;
  --bg-hover: #e0e0e0;
  
  /* Text - dark on light cards */
  --text-primary: #2a2a2a;
  --text-secondary: #555555;
  --text-muted: #888888;
  
  /* Borders - subtle gray */
  --border-subtle: rgba(0, 0, 0, 0.1);
  --border-medium: rgba(0, 150, 100, 0.3);
  --border-strong: rgba(0, 150, 100, 0.5);
  
  /* Card gradient - light with subtle green tint */
  --gradient-card: linear-gradient(135deg, rgba(0, 255, 136, 0.03) 0%, #ffffff 100%);
  
  /* Shadows - softer */
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 4px 16px rgba(0, 200, 120, 0.15);
  
  /* Green adjustments for light mode */
  --color-brand-green: #00aa66;
  --color-brand-neon: #00cc77;
}

/* Light mode specific overrides */
[data-theme="light"] .card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card:hover {
  border-color: rgba(0, 150, 100, 0.3);
  box-shadow: 0 4px 16px rgba(0, 150, 100, 0.12);
}

[data-theme="light"] .input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: #2a2a2a;
}

[data-theme="light"] .input:focus {
  border-color: #00aa66;
  box-shadow: 0 0 0 3px rgba(0, 170, 102, 0.1);
}

[data-theme="light"] .input::placeholder {
  color: #999999;
}

[data-theme="light"] .btn--ghost {
  background: transparent;
  color: #555555;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .btn--ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .btn--secondary {
  background: rgba(0, 170, 102, 0.1);
  color: #00aa66;
  border: 1px solid rgba(0, 170, 102, 0.3);
}

[data-theme="light"] .btn--secondary:hover {
  background: rgba(0, 170, 102, 0.15);
}

/* Tab styling for light mode */
[data-theme="light"] .tab {
  color: #666666;
}

[data-theme="light"] .tab.active {
  color: #00aa66;
  border-bottom-color: #00aa66;
}

[data-theme="light"] .tab:hover {
  color: #2a2a2a;
}

[data-theme="light"] .tabs {
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Radio and checkbox labels */
[data-theme="light"] .checkbox-label,
[data-theme="light"] .radio-label {
  color: #555555;
}

[data-theme="light"] .checkbox-label:hover,
[data-theme="light"] .radio-label:hover {
  color: #2a2a2a;
}

/* Vault items */
[data-theme="light"] .vault-item {
  background: #f8f8f8;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .vault-item-title {
  color: #2a2a2a;
}

[data-theme="light"] .vault-item-password {
  color: #666666;
}

/* Progress bar */
[data-theme="light"] .progress {
  background: rgba(0, 0, 0, 0.08);
}

/* Slider */
[data-theme="light"] .slider {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .slider::-webkit-slider-thumb {
  background: #00aa66;
}

[data-theme="light"] .slider::-moz-range-thumb {
  background: #00aa66;
}

/* Headings */
[data-theme="light"] .heading--hero {
  color: #00cc77;
  text-shadow: none;
}

[data-theme="light"] .heading--md {
  color: #2a2a2a;
}

[data-theme="light"] .label {
  color: #555555;
}

[data-theme="light"] .text-accent {
  color: #00aa66;
}

/* Badge adjustments for light mode */
[data-theme="light"] .badge--success {
  background: rgba(0, 170, 102, 0.12);
  color: #008855;
  border-color: rgba(0, 170, 102, 0.3);
}

[data-theme="light"] .badge--warning {
  background: rgba(255, 170, 0, 0.12);
  color: #cc8800;
  border-color: rgba(255, 170, 0, 0.3);
}

[data-theme="light"] .badge--danger {
  background: rgba(220, 38, 38, 0.12);
  color: #cc0000;
  border-color: rgba(220, 38, 38, 0.3);
}

/* Toast in light mode */
[data-theme="light"] .toast {
  background: #ffffff;
  border: 1px solid rgba(0, 170, 102, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  color: #2a2a2a;
}


/* ========================================
   TOP NAVIGATION BAR
   ======================================== */

.top-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  font-weight: 500;
}

.nav-back:hover {
  color: var(--color-brand-green);
  background: rgba(0, 255, 136, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  margin-top: 4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.footer-text {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

.footer-link {
  color: var(--color-brand-green);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.footer-link:hover {
  color: var(--color-brand-neon);
  text-decoration: underline;
}

/* Light mode overrides */
[data-theme="light"] .top-nav {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav-back {
  color: #555555;
}

[data-theme="light"] .nav-back:hover {
  color: #00aa66;
  background: rgba(0, 170, 102, 0.1);
}

[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .footer-text {
  color: #666666;
}

[data-theme="light"] .footer-link {
  color: #00aa66;
}

[data-theme="light"] .footer-link:hover {
  color: #008855;
}

/* Adjust module header spacing since we have top nav now */
.module-header {
  padding: 1.5rem 0 2rem 0;
}
