/* ===================================================================
   SOTECHONLINE.IN - STYLESHEET
   Design System: Crimson Red & Deep Carbon Slate (Matching Sotech Logo)
   High-Contrast Modern Aesthetics, Smooth Micro-Interactions,
   Optimized for Fast Page Load & Google AdSense High CTR
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Brand Color Palette - Sotech Crimson Red & Carbon Black */
  --primary: #dc2626;          /* Sotech Vibrant Red */
  --primary-hover: #b91c1c;    /* Deep Crimson */
  --primary-dark: #991b1b;     /* Dark Sotech Red */
  --primary-light: #ef4444;    /* Bright Coral Red */
  --accent: #dc2626;           /* Sotech Accent */
  --accent-light: #f87171;     /* Light Crimson */
  --accent-gradient: linear-gradient(135deg, #e11d48 0%, #dc2626 50%, #b91c1c 100%);
  --accent-glow: rgba(220, 38, 38, 0.25);
  --accent-glow-subtle: rgba(220, 38, 38, 0.08);
  
  /* Status Colors */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;          /* Crisp Off-White */
  --bg-surface: #ffffff;       /* Pure White Card */
  --bg-subtle: #f1f5f9;        /* Light Slate */
  --bg-hover: #e2e8f0;
  
  /* Text */
  --text-primary: #111827;     /* Sotech Deep Slate Carbon */
  --text-secondary: #4b5563;   /* Slate 600 */
  --text-muted: #9ca3af;       /* Slate 400 */
  --text-inverse: #ffffff;

  /* Borders & Dividers */
  --border-light: #e5e7eb;
  --border-focus: #dc2626;

  /* Shadows with Crimson Ambient Ambient Light */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 25px -4px rgba(17, 24, 39, 0.08), 0 4px 6px -4px rgba(17, 24, 39, 0.04);
  --shadow-glow: 0 0 25px rgba(220, 38, 38, 0.35);

  /* Layout & Geometry */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;
  --container-max: 1240px;
  --header-height: 72px;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Mode Theme Overrides */
[data-theme="dark"] {
  --primary: #ef4444;
  --primary-hover: #f87171;
  --primary-dark: #dc2626;
  --primary-light: #fca5a5;
  --accent: #ef4444;
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #ef4444 50%, #b91c1c 100%);
  --accent-glow: rgba(239, 68, 68, 0.35);
  --accent-glow-subtle: rgba(239, 68, 68, 0.12);
  --bg-page: #0a0e17;
  --bg-surface: #111827;
  --bg-subtle: #1f2937;
  --bg-hover: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #6b7280;
  --border-light: #1f2937;
  --border-focus: #ef4444;
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

/* ===================================================================
   RESET & BASE STYLES
   =================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.5;
  scroll-behavior: smooth;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background-color: var(--bg-page);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

input {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ===================================================================
   HEADER & NAVBAR (Updated for Sotech Logo without text duplication)
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.95);
}

.header-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Brand Link with Logo Image (No duplicate text!) */
.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform var(--transition-fast);
  padding: 4px 0;
}

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

.brand-logo-img {
  height: 44px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: transform var(--transition-normal), filter var(--transition-normal);
}

.brand-link:hover .brand-logo-img {
  transform: scale(1.02);
  filter: drop-shadow(0 4px 12px var(--accent-glow));
}

/* Dynamic theme logo switching */
.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

/* Header Search */
.header-search {
  position: relative;
  flex: 1;
  max-width: 440px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color var(--transition-fast);
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 70px 0 40px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.search-input:focus {
  outline: none;
  background-color: var(--bg-surface);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input:focus + .search-icon {
  color: var(--accent);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-muted);
  pointer-events: none;
}

/* Search Dropdown / Autocomplete Results */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  max-height: 380px;
  overflow-y: auto;
  z-index: 1000;
}

.search-results-dropdown.active {
  display: flex;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-fast);
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover, .search-result-item.highlighted {
  background-color: var(--bg-subtle);
}

.search-result-icon {
  font-size: 1.25rem;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.search-result-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.search-result-tag {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background-color: var(--accent-glow-subtle);
  color: var(--accent);
  font-weight: 700;
}

/* Navigation Items */
.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.nav-link.active {
  color: var(--accent);
  background-color: var(--accent-glow-subtle);
}

/* FM Radio Nav Pill with Live Pulse */
.nav-link-radio {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(185, 28, 28, 0.12) 100%);
  color: var(--accent);
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-weight: 700;
}

.nav-link-radio:hover {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.live-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ef4444;
  position: relative;
  display: inline-block;
}

.live-pulse-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid #ef4444;
  animation: pulse-ring 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Theme Toggle Button */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
  background-color: var(--bg-subtle);
  transform: translateY(-1px);
}

/* ===================================================================
   ADSENSE PLACEHOLDERS SYSTEM
   =================================================================== */
.ad-slot-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 18px 0;
  width: 100%;
}

.ad-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.ad-label-icon {
  font-size: 0.65rem;
}

.ad-box {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.ad-box:hover {
  border-color: var(--accent);
}

.ad-box-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ad-box-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.ad-box-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Top Leaderboard Ad (728x90) */
.ad-leaderboard {
  max-width: 728px;
  width: 100%;
  min-height: 90px;
}

/* Sidebar Skyscraper Ad (300x600) */
.ad-skyscraper {
  width: 100%;
  max-width: 300px;
  min-height: 600px;
}

/* In-Feed Native Ad (336x280) */
.ad-infeed {
  width: 100%;
  max-width: 336px;
  min-height: 280px;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
  text-align: center;
  padding: 24px 0 20px 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  background-color: var(--accent-glow-subtle);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-title .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.12rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

.hero-pill-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.category-pill:hover, .category-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* ===================================================================
   MAIN LAYOUT (Two-column: 75% Active Tool / 25% Sidebar)
   =================================================================== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  padding-bottom: 60px;
}

@media (min-width: 1024px) {
  .main-layout {
    grid-template-columns: 3fr 1fr; /* 75% / 25% exact ratio */
  }
}

.content-workspace {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

/* ===================================================================
   ACTIVE TOOL: INTERNET SPEED TEST (HERO TOOL)
   =================================================================== */
.speed-test-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 34px 28px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

/* Crimson ambient backlight */
.speed-test-card::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0) 70%);
  pointer-events: none;
}

/* Tool Header */
.tool-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.tool-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--accent-glow-subtle);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.tool-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.tool-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.server-info-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
}

.status-dot.testing {
  background-color: var(--accent);
  animation: pulse-ring 1s infinite;
}

/* Gauge & Speed Display Area */
.gauge-stage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px 15px 10px;
  position: relative;
}

.gauge-wrapper {
  position: relative;
  width: 320px;
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  width: 320px;
  height: 230px;
  transform: rotate(-90deg);
}

.gauge-track {
  fill: none;
  stroke: var(--bg-subtle);
  stroke-width: 14;
  stroke-linecap: round;
}

.gauge-progress {
  fill: none;
  stroke: url(#gaugeGradient);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 0.15s cubic-bezier(0.1, 0.9, 0.2, 1);
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* Digital Readout inside gauge */
.gauge-center-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -35%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-phase-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-glow-subtle);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 4px;
}

.gauge-number-val {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  min-width: 160px;
}

.gauge-unit {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Live Waveform Canvas */
.speed-waveform-canvas {
  width: 100%;
  max-width: 480px;
  height: 52px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
}

/* Progress Step Indicator (Ping -> Download -> Upload) */
.speed-test-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 15px 0 25px 0;
  width: 100%;
  max-width: 420px;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.step-indicator .step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

.step-indicator.active {
  color: var(--accent);
}

.step-indicator.active .step-circle {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 12px var(--accent-glow);
}

.step-indicator.completed {
  color: var(--success);
}

.step-indicator.completed .step-circle {
  background-color: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

/* Metric Readout Cards (Ping, Download, Upload) */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.metric-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.metric-card.active-testing {
  border-color: var(--accent);
  background: var(--accent-glow-subtle);
  box-shadow: 0 0 20px var(--accent-glow);
}

.metric-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.metric-icon {
  font-size: 1rem;
}

.metric-icon.ping { color: #f59e0b; }
.metric-icon.download { color: var(--accent); }
.metric-icon.upload { color: #8b5cf6; }

.metric-value-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.metric-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Action Controls */
.test-action-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Big Start Button */
.btn-start-test {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 48px;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent-gradient);
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px var(--accent-glow), 0 0 0 0 rgba(220, 38, 38, 0.5);
  transition: all var(--transition-normal);
  cursor: pointer;
  overflow: hidden;
}

.btn-start-test:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px var(--accent-glow), 0 0 18px rgba(220, 38, 38, 0.6);
}

.btn-start-test:active:not(:disabled) {
  transform: translateY(1px);
}

.btn-start-test:disabled {
  opacity: 0.9;
  cursor: not-allowed;
}

.btn-start-test.testing {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  animation: pulse-button 1.5s infinite;
}

@keyframes pulse-button {
  0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* Results Summary Box */
.results-summary-card {
  display: none;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  width: 100%;
  margin-top: 20px;
  animation: slideUp 0.3s ease-out forwards;
}

.results-summary-card.active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background-color: var(--success-glow);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-grade {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

/* ===================================================================
   FEATURED TOOLS SECTION
   =================================================================== */
.featured-tools-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.section-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-link:hover {
  text-decoration: underline;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.tool-card:hover {
  transform: translateY(-5px);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 12px 28px -5px var(--accent-glow), var(--shadow-md);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-card-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--text-primary);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(2deg);
  background: var(--accent-glow-subtle);
  color: var(--accent);
}

.tool-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
}

.tool-tag.hot {
  background-color: rgba(220, 38, 38, 0.12);
  color: var(--accent);
}

.tool-tag.featured {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--primary-dark);
}

.tool-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-card-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.tool-card-action {
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform var(--transition-fast);
}

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

/* ===================================================================
   SIDEBAR WIDGETS
   =================================================================== */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title-icon {
  color: var(--accent);
}

/* Popular Tools List Widget */
.widget-tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.widget-tool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
}

.widget-tool-item:hover {
  background-color: var(--bg-subtle);
  color: var(--accent);
  transform: translateX(4px);
}

.widget-tool-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-tool-icon {
  font-size: 1.1rem;
}

.widget-tool-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
}

/* Connection Info Widget */
.connection-info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-light);
}

.conn-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.conn-label {
  color: var(--text-muted);
}

.conn-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
}

/* Bookmark CTA Widget */
.bookmark-widget {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.04) 0%, rgba(185, 28, 28, 0.08) 100%);
  border: 1px solid rgba(220, 38, 38, 0.18);
  text-align: center;
}

.bookmark-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.shortcut-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--accent);
}

/* ===================================================================
   FOOTER
   =================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 50px 0 25px 0;
  transition: background-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.6;
}

.footer-disclaimer {
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 2px solid var(--accent);
  padding-left: 10px;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 14px;
}

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

.footer-nav-list a {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

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

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

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ===================================================================
   MODALS
   =================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

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

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

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

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  font-size: 1.25rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--accent);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.modal-body h4 {
  color: var(--text-primary);
  margin: 16px 0 6px 0;
  font-size: 0.95rem;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  background-color: var(--bg-subtle);
}

/* FM Radio Player in Modal */
.radio-player-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.radio-now-playing {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.radio-station-logo {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.radio-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.radio-station-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
}

.radio-station-genre {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.radio-play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: transform var(--transition-fast);
}

.radio-play-btn:hover {
  transform: scale(1.08);
}

.stations-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.station-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.station-item:hover, .station-item.active {
  background-color: var(--accent-glow-subtle);
  border-color: var(--accent);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background-color: var(--text-primary);
  color: var(--bg-surface);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--accent);
  animation: slideInRight 0.25s ease-out;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===================================================================
   RESPONSIVENESS & MEDIA QUERIES
   =================================================================== */
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .ad-skyscraper {
    max-width: 100%;
    min-height: 250px;
  }
}

@media (max-width: 767px) {
  :root {
    --header-height: 62px;
  }

  .brand-logo-img {
    height: 34px;
    max-width: 170px;
  }

  .header-search {
    display: none;
  }

  .header-nav {
    gap: 4px;
  }

  .nav-link span.nav-text {
    display: none;
  }

  .hero-section {
    padding: 16px 0 14px 0;
  }

  .speed-test-card {
    padding: 20px 16px;
  }

  .gauge-wrapper {
    width: 260px;
    height: 190px;
  }

  .gauge-svg {
    width: 260px;
    height: 190px;
  }

  .gauge-number-val {
    font-size: 2.8rem;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .metric-card {
    flex-direction: row;
    justify-content: space-between;
    padding: 12px 18px;
  }

  .metric-card-header {
    margin-bottom: 0;
  }

  .btn-start-test {
    width: 100%;
    padding: 14px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .ad-leaderboard {
    min-height: 50px;
    max-height: 90px;
  }
}

/* ===================================================================
   INTEGRATED TOOLS WORKSPACE SYSTEM & PANES
   =================================================================== */

/* Tool Switcher Tabs Bar */
.tool-nav-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px 2px;
  margin-bottom: 8px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tool-nav-tabs-wrapper::-webkit-scrollbar {
  height: 4px;
}

.tool-nav-tabs-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

.tool-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.tool-nav-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-nav-tab.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 14px var(--accent-glow);
}

/* Pane Visibility */
.tool-workspace-pane {
  display: none;
}

.tool-workspace-pane.active-pane {
  display: block;
  animation: fadeInPane 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Base Tool Card */
.tool-pane-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 34px 28px;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.tool-pane-card::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  height: 250px;
  background: radial-gradient(ellipse, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0) 70%);
  pointer-events: none;
}

/* -------------------------------------------------------------------
   IMAGE COMPRESSOR STYLES
   ------------------------------------------------------------------- */
.compress-drop-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px 20px;
  text-align: center;
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.compress-drop-zone:hover, .compress-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow-subtle);
  transform: scale(1.01);
}

.compress-drop-icon {
  font-size: 2.8rem;
}

.compress-controls-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin: 20px 0;
  background: var(--bg-subtle);
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
}

.control-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
}

/* Custom Crimson Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-glow);
  transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.custom-select {
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}

.custom-select:focus {
  border-color: var(--accent);
}

/* Comparison Preview Grid */
.compress-comparison-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.compress-preview-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.compress-img-frame {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.compress-img-frame img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.compress-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.85rem;
}

.compress-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.compress-badge.success {
  background: var(--success-glow);
  color: var(--success);
}

.compress-badge.neutral {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------
   PASSWORD GENERATOR STYLES
   ------------------------------------------------------------------- */
.pass-display-group {
  position: relative;
  display: flex;
  align-items: center;
  margin: 20px 0 14px 0;
}

.pass-display-input {
  width: 100%;
  height: 58px;
  padding: 0 110px 0 20px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-light);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  transition: border-color var(--transition-fast);
}

.pass-display-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-surface);
}

.pass-display-actions {
  position: absolute;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pass-action-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.pass-action-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.05);
}

.rotate-icon {
  animation: spin 0.3s ease;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(180deg); }
}

.pass-strength-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

.pass-strength-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
}

.pass-strength-track {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  overflow: hidden;
}

.pass-strength-bar {
  height: 100%;
  width: 50%;
  border-radius: var(--radius-full);
  background: var(--accent);
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pass-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 0.88rem;
  font-weight: 600;
  user-select: none;
}

.checkbox-pill:hover {
  border-color: var(--accent);
}

.checkbox-pill input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.pass-history-wrapper {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-light);
}

.pass-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.pass-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  font-size: 0.82rem;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.pass-history-item:hover {
  background: var(--accent-glow-subtle);
  color: var(--accent);
}

.pass-history-item .copy-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* -------------------------------------------------------------------
   QR CODE GENERATOR STYLES
   ------------------------------------------------------------------- */
.qr-stage-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
  margin-top: 20px;
}

.qr-type-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.qr-type-tab {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.qr-type-tab.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.qr-preview-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  gap: 18px;
}

.qr-canvas-wrapper {
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.qr-canvas-wrapper canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.qr-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.color-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.color-input-wrapper input[type="color"] {
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  background: none;
}

/* -------------------------------------------------------------------
   JSON FORMATTER & VALIDATOR STYLES
   ------------------------------------------------------------------- */
.json-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.json-actions-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.json-editor-textarea {
  width: 100%;
  height: 340px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition-fast);
}

.json-editor-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.json-status-tag {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.json-status-tag.success {
  background: var(--success-glow);
  color: var(--success);
}

.json-status-tag.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.json-status-tag.neutral {
  background: var(--bg-hover);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------
   WORD COUNTER STYLES
   ------------------------------------------------------------------- */
.word-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.word-stat-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
}

.word-stat-val {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.word-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.word-input-textarea {
  width: 100%;
  height: 220px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  margin-bottom: 14px;
}

.word-input-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.case-tools-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.keyword-density-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.keyword-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: 0.85rem;
}

.keyword-row:last-child {
  border-bottom: none;
}

.keyword-name {
  font-weight: 700;
  color: var(--text-primary);
}

.keyword-count {
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------
   BASE64 TOOL STYLES
   ------------------------------------------------------------------- */
.base64-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 18px 0;
}

.base64-textarea {
  width: 100%;
  height: 200px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-primary);
  outline: none;
  resize: vertical;
}

.base64-textarea:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
}

/* -------------------------------------------------------------------
   FM RADIO STUDIO WORKSPACE STYLES
   ------------------------------------------------------------------- */
.radio-studio-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, rgba(185, 28, 28, 0.15) 100%);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 20px 0;
}

.radio-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 36px;
}

.eq-bar {
  width: 5px;
  border-radius: var(--radius-full);
  background: var(--accent);
  animation: eqBounce 1.2s ease-in-out infinite alternate;
}

.eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.eq-bar:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.eq-bar:nth-child(3) { height: 60%; animation-delay: 0.5s; }
.eq-bar:nth-child(4) { height: 100%; animation-delay: 0.2s; }
.eq-bar:nth-child(5) { height: 50%; animation-delay: 0.4s; }

@keyframes eqBounce {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

@media (max-width: 767px) {
  .compress-controls-grid, .compress-comparison-grid, .qr-stage-layout, .base64-grid {
    grid-template-columns: 1fr;
  }
  .word-stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
