/* Obsidian Neon Design System - 100% Vanilla CSS */

:root {
  color-scheme: dark;
  --bg-dark: #09090b;
  --bg-card: #18181b;
  --bg-input: #27272a;
  
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.15);
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.15);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.15);
  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.15);
  
  --border-color: #27272a;
  --border-hover: #3f3f46;
  --border-focus: #52525b;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
  --shadow-glow-purple: 0 0 20px rgba(168, 85, 247, 0.25);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  --font-sans: 'Geist Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ==========================================================================
   LIGHT MODE COMPREHENSIVE THEME OVERRIDES
   ========================================================================== */
html.light,
html.light-mode,
body.light-mode {
  color-scheme: light;
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.15);
  --accent-purple: #9333ea;
  --accent-purple-glow: rgba(147, 51, 234, 0.15);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.15);
  --accent-rose: #e11d48;
  --accent-rose-glow: rgba(225, 29, 72, 0.15);
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #94a3b8;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-glow-cyan: 0 0 20px rgba(2, 132, 199, 0.18);
  --shadow-glow-purple: 0 0 20px rgba(147, 51, 234, 0.18);
}

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

html, body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 15% 15%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 20%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.light, html.light body,
html.light-mode, html.light-mode body {
  background-color: #f8fafc !important;
  background-image: 
    radial-gradient(at 15% 15%, rgba(2, 132, 199, 0.08) 0px, transparent 50%),
    radial-gradient(at 85% 20%, rgba(147, 51, 234, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(5, 150, 105, 0.05) 0px, transparent 50%) !important;
  color: #0f172a !important;
}

html.light header,
html.light-mode header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

html.light footer,
html.light-mode footer {
  background: #f1f5f9 !important;
  border-top: 1px solid #e2e8f0 !important;
}

html.light .card,
html.light-mode .card,
html.light .glass-card,
html.light-mode .glass-card,
html.light .tool-card,
html.light-mode .tool-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

html.light .card:hover,
html.light-mode .card:hover,
html.light .tool-card:hover,
html.light-mode .tool-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

html.light .trust-item,
html.light-mode .trust-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light .search-input,
html.light-mode .search-input {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
}

html.light .filter-tab,
html.light-mode .filter-tab {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

html.light .filter-tab.active,
html.light-mode .filter-tab.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(147, 51, 234, 0.15)) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

html.light .hero h1,
html.light-mode .hero h1 {
  background: linear-gradient(135deg, #0f172a 0%, #0369a1 50%, #6b21a8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

html.light .hero-badge,
html.light-mode .hero-badge {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
}

html.light .nav-links a,
html.light-mode .nav-links a {
  color: #475569 !important;
}

html.light .nav-links a:hover,
html.light-mode .nav-links a:hover {
  color: #0f172a !important;
  background: #f1f5f9 !important;
}

html.light .btn-secondary,
html.light-mode .btn-secondary {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .btn-secondary:hover,
html.light-mode .btn-secondary:hover {
  background: #f1f5f9 !important;
}

html.light .theme-toggle-btn,
html.light-mode .theme-toggle-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

html.light .theme-toggle-btn:hover,
html.light-mode .theme-toggle-btn:hover {
  background: #e2e8f0 !important;
}

html.light .tool-share-btn,
html.light-mode .tool-share-btn {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

html.light .tool-share-btn:hover,
html.light-mode .tool-share-btn:hover {
  border-color: #0284c7 !important;
  color: #0284c7 !important;
}

html.light .share-modal-card,
html.light-mode .share-modal-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

html.light .share-social-item,
html.light-mode .share-social-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

html.light .share-link-box,
html.light-mode .share-link-box {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

html.light .share-link-input,
html.light-mode .share-link-input {
  color: #0f172a !important;
}

html.light-mode ::-webkit-scrollbar-track,
html.light ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

html.light-mode ::-webkit-scrollbar-thumb,
html.light ::-webkit-scrollbar-thumb {
  background: var(--border-hover);
}

/* Theme Toggle Button Base */
.theme-toggle-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: var(--bg-card);
}



/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Layout container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--accent-purple);
}

/* Base Card Style */
.card {
  background: rgba(24, 24, 27, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}

.glass-card {
  background: rgba(24, 24, 27, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   GRID LAYOUT SYSTEM
   ========================================================================== */
.grid-2,
.tool-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.grid-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
}

.grid-sidebar-left {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
}

.grid-sidebar-large {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

/* Tool Header */
.tool-header {
  margin-bottom: 28px;
}

.tool-header h1 {
  font-size: 28px;
  margin-bottom: 8px;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 800px;
}

/* Header & Nav */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon-badge {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(6, 182, 212, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
}

.logo-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-now {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Input Fields & Textareas */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-control, 
.textarea-control, 
.select-control,
.form-input,
.form-control,
.form-select,
select {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
}

.textarea-control,
textarea.form-input,
textarea.form-control {
  font-family: var(--font-mono);
  min-height: 120px;
  resize: vertical;
}

.input-control:focus, 
.textarea-control:focus, 
.select-control:focus,
.form-input:focus,
.form-control:focus,
.form-select:focus,
select:focus,
input:focus,
textarea:focus {
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 0 3px var(--accent-cyan-glow), 0 0 12px rgba(6, 182, 212, 0.25) !important;
  outline: none !important;
}

/* Premium Themed Dropdown / Select Styles */
select,
.select-control,
.form-select,
select.form-input,
select.form-control {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-color: var(--bg-input) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2306b6d4' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 14px 10px !important;
  padding-right: 40px !important;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

select:hover,
.select-control:hover,
.form-select:hover,
select.form-input:hover,
select.form-control:hover {
  border-color: var(--accent-cyan);
  background-color: rgba(39, 39, 42, 0.95) !important;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

/* Dropdown Menu Item / Option Styling */
select option,
.select-control option,
.form-select option,
select.form-input option {
  background-color: #18181b !important;
  color: #f4f4f5 !important;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
}

select option:checked,
.select-control option:checked,
.form-select option:checked,
select.form-input option:checked {
  background-color: #27272a !important;
  color: var(--accent-cyan) !important;
  font-weight: 700;
}

select option:hover,
select option:focus {
  background-color: rgba(6, 182, 212, 0.25) !important;
}

/* Light Mode Overrides for Dropdowns and Forms */
html.light-mode select,
html.light-mode .select-control,
html.light-mode .form-select,
html.light-mode select.form-input,
html.light-mode select.form-control {
  background-color: #f4f4f5 !important;
  border-color: #e4e4e7 !important;
  color: #09090b !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%230891b2' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
}

html.light-mode select option,
html.light-mode .select-control option,
html.light-mode .form-select option,
html.light-mode select.form-input option {
  background-color: #ffffff !important;
  color: #09090b !important;
}

html.light-mode select option:checked,
html.light-mode .select-control option:checked,
html.light-mode .form-select option:checked,
html.light-mode select.form-input option:checked {
  background-color: #e4e4e7 !important;
  color: #0891b2 !important;
}

/* Checkbox and Radio lists */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.checkbox-control {
  accent-color: var(--accent-cyan);
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.btn-primary {
  background: var(--accent-cyan);
  color: #000;
}
.btn-primary:hover {
  background: #22d3ee;
  box-shadow: var(--shadow-glow-cyan);
}
.btn-primary:active {
  transform: scale(0.98);
}

.btn-secondary {
  background: transparent;
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--accent-rose);
  color: white;
}
.btn-danger:hover {
  background: #f43f5e;
  box-shadow: var(--shadow-glow-purple);
}

.btn-success {
  background: var(--accent-emerald);
  color: #000;
}
.btn-success:hover {
  background: #34d399;
}

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Grids and Layout utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .glass-card { padding: 20px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
}

/* Code & Results display */
.code-container {
  position: relative;
  background: #0d0d0e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow: auto;
  max-height: 400px;
}

.code-output {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
  color: #38bdf8;
}

.code-error {
  color: var(--accent-rose);
  font-family: var(--font-mono);
  font-size: 14px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(244, 63, 94, 0.05);
  border-left: 4px solid var(--accent-rose);
  border-radius: var(--radius-sm);
}

/* Header & Footer Styling */
header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 50;
}

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

.logo {
  font-weight: 800;
  font-size: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-1px);
}

.logo-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(6, 182, 212, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
  transition: all var(--transition-normal);
}

.logo:hover .logo-icon-badge {
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.6);
  border-color: var(--accent-cyan);
}

.logo-zap-icon {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, 0.6));
}

.logo-brand {
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.logo-now {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 1px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .nav-wrapper {
    flex-direction: column;
    height: auto;
    padding: 16px 24px;
    gap: 12px;
  }
  .nav-links {
    gap: 12px;
  }
  .main-nav {
    gap: 16px !important;
  }
}

@media (max-width: 480px) {
  .nav-links span {
    display: none;
  }
  .nav-links a {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-input);
  }
}

footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 56px 0 32px;
  background: var(--bg-dark);
}

.footer-directory {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand-col p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-list a {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
  transition: color var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-links-list a:hover {
  color: var(--accent-cyan);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 1024px) {
  .footer-directory {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .footer-directory {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================
   HERO SECTION & TRUST HIGHLIGHTS
   ========================================= */
.hero {
  padding: 60px 0 32px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.15);
  backdrop-filter: blur(8px);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero h1 {
  font-size: 52px;
  line-height: 1.15;
  margin-bottom: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 40%, #e9d5ff 80%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.03em;
}

.hero p {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 34px; }
  .hero p { font-size: 15px; }
  .hero { padding: 40px 0 20px; }
}

/* Trust Badges Grid */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 32px 0 44px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(24, 24, 27, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  transition: all var(--transition-fast);
}

.trust-item:hover {
  background: rgba(24, 24, 27, 0.9);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.trust-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-icon-box.cyan {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.trust-icon-box.purple {
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.trust-icon-box.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.trust-icon-box.rose {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.trust-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}

.trust-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* Search bar on home page */
.search-container {
  max-width: 580px;
  margin: 28px auto 20px;
  position: relative;
}

.search-input {
  width: 100%;
  background: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  color: var(--text-primary);
  padding: 16px 48px 16px 48px;
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.25);
  background: rgba(24, 24, 27, 0.95);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-cyan);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

/* Filter Tab Pills */
.filter-tabs-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0 48px;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(24, 24, 27, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.16);
}

.filter-tab.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.2));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.2);
}

.filter-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.filter-tab.active .filter-tab-count {
  background: var(--accent-cyan);
  color: #000;
}

/* =========================================
   TOOL CARDS & CATEGORY SECTIONS
   ========================================= */
.category-section {
  margin-bottom: 64px;
}

.category-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.category-title {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.category-badge-count {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(24, 24, 27, 0.85) 0%, rgba(18, 18, 20, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.6);
}

.tool-card.developer:hover::before {
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  box-shadow: 0 0 12px var(--accent-cyan);
}

.tool-card.image:hover::before {
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  box-shadow: 0 0 12px var(--accent-emerald);
}

.tool-card.calculator:hover::before {
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-rose));
  box-shadow: 0 0 12px var(--accent-purple);
}

.tool-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tool-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.tool-card:hover .tool-icon-box {
  transform: scale(1.06);
}

.tool-icon-box.developer {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(6, 182, 212, 0.05));
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.tool-icon-box.image {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-icon-box.calculator {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.tool-tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.tool-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 18px;
  flex-grow: 1;
}

.tool-card-footer {
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.tool-card:hover .tool-card-footer svg {
  transform: translateX(4px);
}

.tool-card.developer .tool-card-footer { color: var(--accent-cyan); }
.tool-card.calculator .tool-card-footer { color: var(--accent-purple); }
.tool-card.image .tool-card-footer { color: var(--accent-emerald); }

.tool-card-footer svg {
  transition: transform 0.2s ease;
}

/* Individual Tool Page Layout */
.tool-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 32px;
  margin-bottom: 64px;
}

@media (max-width: 968px) {
  .tool-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.tool-header {
  margin-bottom: 32px;
}

.tool-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 16px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
  font-weight: 500;
}

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

/* Tool controls / grid layouts */
.tool-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) {
  .tool-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* SEO Content Area styling */
.seo-section {
  margin-top: 80px;
  border-top: 1px solid var(--border-color);
  padding-top: 60px;
}

.seo-content {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
}

@media (max-width: 968px) {
  .seo-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.seo-guide h2 {
  font-size: 24px;
  margin-bottom: 20px;
}

.seo-guide h3 {
  font-size: 18px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.seo-guide p {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.seo-guide ol, .seo-guide ul {
  color: var(--text-secondary);
  margin-left: 20px;
  margin-bottom: 16px;
  font-size: 15px;
}

.seo-guide li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  transition: background var(--transition-fast);
}

.faq-question:hover {
  background: rgba(255, 255, 255, 0.02);
}

.faq-answer {
  padding: 0 20px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

/* SVG Chart styles */
.chart-container {
  background: #0d0d0e;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 16px;
  align-self: flex-start;
}

.chart-legend {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-size: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

/* Financial Calculator Summary Stats */
.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
}

.stat-value.cyan { color: var(--accent-cyan); }
.stat-value.purple { color: var(--accent-purple); }
.stat-value.emerald { color: var(--accent-emerald); }

/* Table styling for amortization schedules */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-top: 24px;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.custom-table th {
  background: var(--bg-input);
  color: var(--text-secondary);
  font-weight: 600;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.custom-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #18181b;
  border: 1px solid var(--accent-cyan);
  box-shadow: var(--shadow-glow-cyan);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* =========================================
   LIGHT MODE COMPLETE THEME OVERRIDES
   ========================================= */
html.light {
  --bg-dark: #f8fafc;
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  
  --accent-cyan: #0284c7;
  --accent-cyan-glow: rgba(2, 132, 199, 0.12);
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.12);
  --accent-emerald: #059669;
  --accent-emerald-glow: rgba(5, 150, 105, 0.12);
  --accent-rose: #e11d48;
  --accent-rose-glow: rgba(225, 29, 72, 0.12);
  
  --border-color: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-focus: #94a3b8;
  
  --shadow-glow-cyan: 0 4px 20px rgba(2, 132, 199, 0.15);
  --shadow-glow-purple: 0 4px 20px rgba(124, 58, 237, 0.15);
}

html.light body {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 15% 15%, rgba(2, 132, 199, 0.05) 0px, transparent 50%),
    radial-gradient(at 85% 20%, rgba(124, 58, 237, 0.05) 0px, transparent 50%),
    radial-gradient(at 50% 80%, rgba(5, 150, 105, 0.04) 0px, transparent 50%);
  color: #0f172a;
}

html.light header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: #e2e8f0;
}

html.light .logo-brand {
  color: #0f172a;
}

html.light .logo-icon-badge {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(124, 58, 237, 0.12));
  border-color: rgba(2, 132, 199, 0.3);
}

html.light .nav-links a {
  color: #475569;
}

html.light .nav-links a:hover {
  color: #0f172a;
  background: #f1f5f9;
}

html.light footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

html.light .footer-content {
  color: #64748b;
}

/* Light Mode Cards & Glass */
html.light .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
}

html.light .card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.08) !important;
}

html.light .card h3 {
  color: #0f172a;
}

html.light .card p {
  color: #475569;
}

html.light .glass-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

/* Hero Section in Light Mode */
html.light .hero-badge {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.08), rgba(124, 58, 237, 0.08));
  border-color: rgba(2, 132, 199, 0.25);
  color: #0f172a;
}

html.light .hero h1 {
  background: linear-gradient(135deg, #0f172a 0%, #0369a1 50%, #6b21a8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.light .hero p {
  color: #475569;
}

/* Trust Badges in Light Mode */
html.light .trust-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .trust-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

html.light .trust-title {
  color: #0f172a;
}

html.light .trust-desc {
  color: #64748b;
}

/* Search Bar in Light Mode */
html.light .search-input {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

html.light .search-input:focus {
  background: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(2, 132, 199, 0.18);
}

/* Filter Tabs in Light Mode */
html.light .filter-tab {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
}

html.light .filter-tab:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5e1;
}

html.light .filter-tab.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(124, 58, 237, 0.1));
  border-color: #0284c7;
  color: #0f172a;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.12);
}

html.light .filter-tab-count {
  background: #f1f5f9;
  color: #0f172a;
}

html.light .filter-tab.active .filter-tab-count {
  background: #0284c7;
  color: #ffffff;
}

/* Tool Cards in Light Mode */
html.light .tool-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

html.light .tool-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.08);
}

html.light .tool-card h3 {
  color: #0f172a;
}

html.light .tool-card p {
  color: #475569;
}

html.light .tool-tag,
html.light .category-badge-count {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #475569;
}

html.light .category-title {
  color: #0f172a;
}

/* Form Controls in Light Mode */
html.light .form-label {
  color: #334155;
}

html.light .input-control,
html.light .textarea-control,
html.light .select-control {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

html.light .input-control:focus, 
html.light .textarea-control:focus, 
html.light .select-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--accent-cyan-glow);
}

html.light .btn-secondary {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

html.light .btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* SEO, FAQ & Chart Components in Light Mode */
html.light .faq-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

html.light .faq-question {
  color: #0f172a;
}

html.light .faq-question:hover {
  background: #f8fafc;
}

html.light .faq-answer {
  color: #475569;
}

html.light .seo-guide h2,
html.light .seo-guide h3 {
  color: #0f172a;
}

html.light .seo-guide p,
html.light .seo-guide ol,
html.light .seo-guide ul {
  color: #334155;
}

html.light .chart-container {
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

html.light .stat-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

html.light .stat-label {
  color: #64748b;
}

html.light .stat-value {
  color: #0f172a;
}

html.light .table-container {
  border-color: #e2e8f0;
}

html.light .custom-table th {
  background: #f1f5f9;
  color: #334155;
  border-color: #e2e8f0;
}

html.light .custom-table td {
  border-color: #e2e8f0;
  color: #0f172a;
}

html.light .custom-table tr:hover td {
  background: #f8fafc;
}

html.light .toast {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.15);
  color: #0f172a;
}

/* Responsive Input Group (inputs and actions stack vertically on small viewports) */
.input-group-responsive {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 640px) {
  .input-group-responsive {
    flex-direction: column;
    align-items: stretch;
  }
  .input-group-responsive .input-control {
    width: 100% !important;
  }
  .input-group-responsive .btn,
  .input-group-responsive button {
    width: 100%;
    justify-content: center;
  }
}

/* PWA Installation Highlight Banner & Modals */
.pwa-install-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: rgba(24, 24, 27, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg), var(--shadow-glow-purple);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: pwa-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes pwa-slide-in {
  from {
    transform: translateY(40px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.pwa-install-banner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pwa-install-banner-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-install-banner-icon {
  background: var(--accent-purple-glow);
  color: var(--accent-purple);
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pwa-pulse-glow 2s infinite ease-in-out;
}

@keyframes pwa-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
  }
  50% {
    box-shadow: 0 0 12px 4px rgba(168, 85, 247, 0.2);
  }
}

.pwa-install-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.pwa-install-banner-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.pwa-install-banner-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.pwa-install-banner-body {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.pwa-install-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-install-banner-btn-install {
  flex: 1;
  background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 10px rgba(168, 85, 247, 0.2);
}

.pwa-install-banner-btn-install:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.pwa-install-banner-btn-dismiss {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pwa-install-banner-btn-dismiss:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

/* Light Mode Overrides */
html.light .pwa-install-banner {
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(168, 85, 247, 0.15);
}

html.light .pwa-install-banner-btn-dismiss {
  border-color: #cbd5e1;
}

html.light .pwa-install-banner-btn-dismiss:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

html.light .pwa-install-banner-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* iOS Safari Guide Modal styles */
.pwa-ios-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: pwa-fade-in 0.3s ease forwards;
}

@keyframes pwa-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pwa-ios-modal {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: pwa-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

html.light .pwa-ios-modal {
  background: #ffffff;
  border-color: #e2e8f0;
}

.pwa-ios-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pwa-ios-instructions-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

.pwa-ios-instruction-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pwa-ios-step-number {
  background: var(--accent-purple-glow);
  color: var(--accent-purple);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}

.pwa-ios-share-icon, .pwa-ios-plus-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px;
  margin: 0 4px;
  vertical-align: middle;
}

html.light .pwa-ios-share-icon, 
html.light .pwa-ios-plus-icon {
  background: rgba(0, 0, 0, 0.05);
}

/* Responsiveness for installation banner */
@media (max-width: 640px) {
  .pwa-install-banner {
    bottom: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
    border-radius: var(--radius-md);
  }
}

/* Tool Header Share Component */
.tool-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-share-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.tool-share-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

/* Share Modal Overlay & Dialog */
.share-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeIn 0.2s ease-out;
}

.share-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  animation: scaleUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.share-modal-header h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.share-modal-close-btn:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}

.share-modal-body {
  padding: 20px;
}

.share-social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.share-social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.share-social-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.12);
}

.share-social-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-link-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 6px 6px 12px;
}

.share-link-input {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font-mono);
  width: 100%;
  outline: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Mobile & Tablet Optimization)
   ========================================================================== */

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .grid-sidebar,
  .grid-sidebar-left,
  .grid-sidebar-large,
  .grid-2,
  .tool-grid-2,
  [class*="grid-2"],
  [class*="tool-grid-2"],
  div[style*="1fr 320px"],
  div[style*="1fr 400px"],
  div[style*="250px 1fr"],
  div[style*="grid-template-columns: 1fr 320px"],
  div[style*="grid-template-columns: 250px 1fr"],
  div[style*="grid-template-columns: 1fr 400px"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a span {
    display: none;
  }

  .nav-links a {
    padding: 8px;
  }

  .glass-card {
    padding: 24px;
  }

  .tool-header h1 {
    font-size: 24px;
  }
}

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

  main {
    padding: 20px 0 !important;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .tool-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .glass-card {
    padding: 20px !important;
    border-radius: var(--radius-md) !important;
  }

  .card {
    padding: 18px !important;
  }

  .tool-header {
    margin-bottom: 20px !important;
  }

  .tool-header h1 {
    font-size: 22px !important;
    flex-wrap: wrap;
  }

  .tool-header p {
    font-size: 13.5px !important;
  }

  .nav-wrapper {
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 10px;
    justify-content: center;
  }

  header nav.main-nav {
    width: 100%;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
  }
}

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

  .glass-card {
    padding: 16px !important;
  }

  .card {
    padding: 14px !important;
  }

  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .form-input,
  .form-control,
  .input-control {
    font-size: 13.5px;
    padding: 8px 12px;
  }

  .share-social-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}



