/* ===================================================================
   SOFTECHONLINE.IN - STYLESHEET
   Design System: Crimson Red & Deep Carbon Slate (Matching Softech 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 - Softech Crimson Red & Carbon Black */
  --primary: #dc2626;          /* Softech Vibrant Red */
  --primary-hover: #b91c1c;    /* Deep Crimson */
  --primary-dark: #991b1b;     /* Dark Softech Red */
  --primary-light: #ef4444;    /* Bright Coral Red */
  --accent: #dc2626;           /* Softech 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;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

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

img, video, canvas {
  max-width: 100%;
  height: auto;
}

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;
  width: 180px;
  transition: width var(--transition-normal);
}

.header-search:focus-within {
  width: 240px;
}

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

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

.search-input {
  width: 100%;
  height: 38px;
  padding: 0 54px 0 34px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  font-size: 0.85rem;
  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: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  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;
  width: 320px;
  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 (Clean & Spacious) */
.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

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

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

/* Nav Dropdown for Group Ventures */
.nav-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-trigger {
  cursor: pointer;
  border: none;
  background: transparent;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  margin-top: 4px;
  left: 0;
  width: 330px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 3px;
  z-index: 1000;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Invisible hover bridge to eliminate any gap between trigger and menu */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
  background: transparent;
}

[data-theme="dark"] .nav-dropdown-menu {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-wrapper:hover .nav-dropdown-menu,
.nav-dropdown-wrapper:focus-within .nav-dropdown-menu,
.nav-dropdown-wrapper.active .nav-dropdown-menu {
  display: flex;
}

/* Tools Suite 2-Column Mega Dropdown */
.tools-dropdown-menu {
  width: 620px;
  max-width: 92vw;
  max-height: calc(100vh - var(--header-height) - 20px);
  overflow-y: auto;
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 10px;
}

.nav-dropdown-wrapper:hover .tools-dropdown-menu,
.nav-dropdown-wrapper:focus-within .tools-dropdown-menu,
.nav-dropdown-wrapper.active .tools-dropdown-menu {
  display: grid;
}

.tools-dropdown-menu .dropdown-item {
  padding: 8px 10px;
}

.tools-dropdown-menu .dropdown-item-icon {
  font-size: 1.25rem;
  margin-top: 2px;
}

.tools-dropdown-menu .dropdown-item-title {
  font-size: 0.86rem;
}

.tools-dropdown-menu .dropdown-item-desc {
  font-size: 0.74rem;
  line-height: 1.25;
}

@media (max-width: 768px) {
  .tools-dropdown-menu {
    width: 320px;
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .tools-dropdown-menu {
    width: 540px;
    left: -60px;
  }
}

.tools-dropdown-menu::-webkit-scrollbar {
  width: 5px;
}

.tools-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: background-color var(--transition-fast);
}

.dropdown-item:hover {
  background-color: var(--bg-subtle);
}

.dropdown-item-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-top: 2px;
}

.dropdown-item-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dropdown-item-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dropdown-item-desc {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-top: 2px;
}

.outbound-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

.outbound-badge.badge-edu {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.2);
}

.outbound-badge.badge-radio {
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.2);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.dropdown-footer-link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  justify-content: center;
  text-align: center;
  padding: 8px 12px;
}

.dropdown-footer-link:hover {
  color: var(--primary-hover);
}

/* 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; }
}

/* Header Right Actions */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Toggle Button */
.btn-icon {
  width: 38px;
  height: 38px;
  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);
  flex-shrink: 0;
}

.btn-icon:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* Mobile Hamburger Menu Button */
.mobile-menu-btn {
  display: none;
}

/* Mobile Nav Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 23, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999;
  display: none;
  animation: drawerFadeIn 0.2s ease forwards;
}

.mobile-nav-drawer.active {
  display: block;
}

.mobile-drawer {
  display: none !important;
}

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

.mobile-drawer-inner {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  padding: 20px 18px 30px 18px;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  animation: drawerSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawerSlideDown {
  from { transform: translateY(-16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.mobile-search-box {
  margin-bottom: 18px;
}

.mobile-search-box input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 0.92rem;
}

.mobile-search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-surface);
}

.mobile-nav-group-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin: 18px 0 8px 4px;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(2px);
}

.mobile-nav-item .m-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-nav-item .m-content {
  flex: 1;
}

.mobile-nav-item .m-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-item .m-sub {
  font-size: 0.77rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.mobile-nav-item.mobile-item-subtle {
  background: transparent;
  border-style: dashed;
}

.m-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
}

.m-badge.badge-edu {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
}

.m-badge.badge-radio {
  background: rgba(234, 88, 12, 0.08);
  color: #ea580c;
}

.mobile-nav-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.mobile-nav-pills-row .m-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
}

.mobile-nav-pills-row .m-pill:hover {
  color: var(--primary);
  border-color: var(--primary);
}

/* ===================================================================
   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; }
}

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

/* Modern Responsive Tool Switcher Bar (Zero Horizontal Overflow) */
.tool-switcher-bar {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.tool-switcher-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
}

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

.tool-switcher-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--accent-glow-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-glow);
}

.tool-switcher-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-switcher-select-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.tool-switcher-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 30px 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat calc(100% - 10px) center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tool-switcher-select:hover,
.tool-switcher-select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-glow-subtle);
}

.tool-switcher-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  overflow: visible;
}

.tool-switcher-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: var(--radius-full);
  font-size: 0.81rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tool-switcher-pill:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-glow-subtle);
  transform: translateY(-1px);
}

.tool-switcher-pill.active {
  background: var(--accent-gradient);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
  font-weight: 700;
}

@media (max-width: 768px) {
  .tool-switcher-bar {
    padding: 12px;
    margin-bottom: 16px;
  }
  .tool-switcher-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .tool-switcher-select-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .tool-switcher-select {
    flex: 1;
  }
  .tool-switcher-pills {
    gap: 5px;
  }
  .tool-switcher-pill {
    padding: 5px 10px;
    font-size: 0.76rem;
  }
}

/* Tool Switcher Tabs Bar (Fallback / Index Page) */
.tool-nav-tabs-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  overflow: visible;
  padding: 4px 2px 14px 2px;
  margin-bottom: 8px;
}

.tool-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  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;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.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: repeat(auto-fit, minmax(170px, 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); }
}

/* (Cleanly moved to consolidated media queries at bottom) */


/* ===================================================================
   QUICK TOOLS MEGA MENU & MODERN LAUNCHER STYLES
   =================================================================== */

.quick-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--accent);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-menu-trigger:hover {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.nav-count-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
}

.quick-menu-trigger:hover .nav-count-badge {
  background: #ffffff;
  color: var(--accent);
}

.quick-sparkle {
  animation: pulseRotate 3s infinite ease-in-out;
}

@keyframes pulseRotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.2) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* Quick Mega Menu Overlay & Modal */
.quick-mega-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 23, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.quick-mega-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.quick-mega-menu-card {
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform var(--transition-normal);
}

.quick-mega-menu-overlay.active .quick-mega-menu-card {
  transform: scale(1) translateY(0);
}

.quick-mega-menu-header {
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.quick-mega-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.quick-mega-icon {
  font-size: 1.8rem;
  background: rgba(239, 68, 68, 0.1);
  padding: 10px;
  border-radius: var(--radius-md);
  line-height: 1;
}

.quick-mega-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

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

.quick-mega-search-bar {
  padding: 14px 28px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.quick-mega-search-bar svg {
  color: var(--text-muted);
}

.quick-mega-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  outline: none;
}

.quick-mega-search-bar input::placeholder {
  color: var(--text-muted);
}

.quick-menu-category-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.quick-menu-category-row::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.quick-menu-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.quick-menu-cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-surface);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.quick-menu-cat-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.quick-mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.mega-menu-tool-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.mega-menu-tool-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.mega-tool-icon {
  font-size: 1.6rem;
  background: var(--bg-surface);
  padding: 8px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.mega-tool-content {
  flex: 1;
  min-width: 0;
}

.mega-tool-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.mega-tool-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.mega-tool-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
}

.quick-mega-footer {
  padding: 14px 28px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Floating Quick Action Button */
.floating-quick-menu-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 6px 20px var(--accent-glow);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.floating-quick-menu-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.floating-badge {
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

/* ===================================================================
   NEW ACTIVE TOOL SUITE SPECIFIC STYLES
   =================================================================== */

/* 1. Case Converter */
.case-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.case-stat-pill {
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.case-stat-pill span {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--accent);
}

.case-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 8px;
}

/* 2. CSS Generator */
.css-studio-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.css-controls-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.css-preview-stage {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.css-shadow-box {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.css-grad-box {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.css-code-card {
  margin-top: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
}

.css-code-pre {
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  padding: 12px;
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  word-break: break-all;
}

.grad-presets-grid {
  display: flex;
  gap: 8px;
}

.grad-preset-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast);
}

.grad-preset-btn:hover {
  transform: scale(1.2);
}

/* 3. Color Tools */
.color-master-stage {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.color-hero-picker {
  position: relative;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-light);
}

.color-main-native-input {
  position: absolute;
  inset: -10px;
  width: 140%;
  height: 140%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.color-swatch-display {
  width: 100%;
  height: 100%;
}

.color-readouts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.color-readout-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 10px 14px;
  border-radius: var(--radius-md);
}

.color-readout-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.color-readout-text {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.color-palettes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}

.palette-swatch-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 10px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: transform var(--transition-fast);
}

.palette-swatch-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.contrast-checker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr 1fr;
  gap: 14px;
  align-items: center;
}

.contrast-preview-pill {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  text-align: center;
  border: 1px solid var(--border-light);
}

/* 4. Markdown Preview */
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.md-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.md-col-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

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

.md-textarea:focus {
  border-color: var(--accent);
}

.md-render-box {
  height: 340px;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  line-height: 1.6;
}

.md-render-box h1, .md-render-box h2, .md-render-box h3 {
  margin-top: 14px;
  margin-bottom: 8px;
  font-weight: 800;
}

.md-render-box pre {
  background: #0f172a;
  color: #f8fafc;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.md-render-box code {
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.md-render-box blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 14px;
  margin: 12px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* 5. Unit Converter */
.unit-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.unit-input-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* 6. Lorem Generator */
.lorem-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  align-items: center;
  background: var(--bg-subtle);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.custom-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

/* 7. UTM inputs */
.utm-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* (Cleanly moved to consolidated media queries at bottom) */

/* ===================================================================
   STANDALONE CONTENT PAGES, GUIDES & FAQ SYSTEM (AdSense Readiness)
   =================================================================== */
.content-page-wrapper {
  padding: 40px 0 80px 0;
  min-height: calc(100vh - var(--header-height) - 300px);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb-nav a:hover {
  color: var(--primary);
}

.content-page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-md);
  max-width: 960px;
  margin: 0 auto;
}

/* (Cleanly moved to consolidated media queries at bottom) */

.page-hero {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
}

.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--accent-glow-subtle);
  border: 1px solid var(--accent-glow);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-section {
  margin-bottom: 32px;
}

.legal-section h2, .content-page-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 28px 0 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h3, .content-page-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 8px 0;
}

.legal-section p, .content-page-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-section ul, .content-page-card ul {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.legal-section li, .content-page-card li {
  margin-bottom: 6px;
}

.highlight-box {
  background: var(--bg-subtle);
  border-left: 4px solid var(--primary);
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 20px 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.highlight-box strong {
  color: var(--text-primary);
}

/* Contact Grid */
.contact-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

/* (Cleanly moved to consolidated media queries at bottom) */

.contact-info-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card-item {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.contact-card-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.contact-card-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Informational Guides & SEO Knowledge Base */
.seo-knowledge-section {
  margin-top: 54px;
  padding-top: 36px;
  border-top: 1px solid var(--border-light);
}

.section-tagline {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.section-main-heading {
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-intro-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 800px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.knowledge-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.knowledge-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-glow);
}

.knowledge-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.knowledge-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.knowledge-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

.knowledge-card-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  flex: 1;
}

.knowledge-card-body p {
  margin-bottom: 12px;
}

.knowledge-card-body ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.knowledge-card-body li {
  margin-bottom: 4px;
}

/* FAQ Accordion */
.faq-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin-top: 20px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item.active {
  border-color: var(--primary);
}

.faq-question {
  width: 100%;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.faq-question:hover {
  background: var(--bg-subtle);
}

.faq-icon-chevron {
  transition: transform var(--transition-fast);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.active .faq-icon-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  padding: 0 22px 20px 22px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-secondary);
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===================================================================
   SOFTECH ONLINE GROUP: VENTURES & CORPORATE ECOSYSTEM
   =================================================================== */
.group-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-full);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.btn-venture-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--accent-gradient);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--accent-glow);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  text-decoration: none;
}

.btn-venture-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-venture-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  color: var(--text-primary) !important;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-venture-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

/* Group Ecosystem Section */
.ventures-showcase-section {
  padding: 50px 0 30px 0;
}

.ventures-header-wrap {
  text-align: center;
  max-width: 780px;
  margin: 0 auto 40px auto;
}

.ventures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.venture-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.venture-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--border-light);
  transition: background var(--transition-fast);
}

.venture-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-glow);
}

.venture-card.featured::before {
  background: var(--accent-gradient);
}

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

.venture-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.venture-category-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.venture-category-badge.badge-marketing {
  background: rgba(220, 38, 38, 0.08);
  color: var(--primary);
  border-color: rgba(220, 38, 38, 0.25);
}

.venture-category-badge.badge-education {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.25);
}

.venture-category-badge.badge-radio {
  background: rgba(234, 88, 12, 0.1);
  color: #ea580c;
  border-color: rgba(234, 88, 12, 0.25);
}

.venture-category-badge.badge-tools {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border-color: rgba(16, 185, 129, 0.25);
}

.venture-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.venture-subtitle {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.venture-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 18px;
  flex: 1;
}

.venture-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.venture-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.venture-features-list li span.v-check {
  color: var(--success);
  font-weight: 800;
}

.venture-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.venture-action-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Group Metrics Counter Strip */
.group-metrics-strip {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
  box-shadow: var(--shadow-sm);
}

.metric-item-block {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.metric-item-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

.metric-item-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}


/* ===================================================================
   CONSOLIDATED RESPONSIVE DESIGN & MEDIA QUERIES
   (Positioned at bottom of stylesheet for 100% cascade accuracy)
   =================================================================== */

/* 1. Large Desktops & Laptops (1024px to 1240px) - Header Neatness & Congestion Prevention */
@media (min-width: 1024px) and (max-width: 1240px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .header-container {
    gap: 12px;
  }

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

  .header-nav {
    gap: 4px;
  }

  .nav-link {
    padding: 6px 9px;
    font-size: 0.82rem;
    gap: 4px;
  }

  .header-search {
    width: 150px;
  }

  .header-search:focus-within {
    width: 200px;
  }
}

/* 2. Tablets & Medium Screens (max-width: 1023px) */
@media (max-width: 1023px) {
  :root {
    --header-height: 64px;
  }

  /* Seamlessly switch from desktop nav to mobile hamburger menu */
  .desktop-nav,
  .header-nav {
    display: none !important;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .header-search {
    display: none;
  }

  .brand-logo-img {
    height: 38px;
    max-width: 175px;
  }

  .main-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .sidebar-column {
    order: 2;
  }

  .content-workspace {
    order: 1;
  }

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

  .ad-skyscraper {
    max-width: 100%;
    min-height: 250px;
  }

  /* Complex tool multi-column grids convert cleanly to single column */
  .css-studio-layout,
  .md-split-grid,
  .contrast-checker-grid,
  .utm-inputs-grid,
  .color-master-stage,
  .contact-layout-grid {
    grid-template-columns: 1fr;
  }
}

/* 3. Mobile Devices & Small Tablets (max-width: 767px) */
@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }

  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  /* Hero Section Mobile */
  .hero-section {
    padding: 24px 0 20px 0;
  }

  .hero-title {
    font-size: clamp(1.65rem, 6vw, 2.2rem) !important;
    line-height: 1.25;
  }

  .hero-subtitle {
    font-size: 0.92rem;
  }

  .hero-actions-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .btn-venture-primary,
  .btn-venture-secondary {
    width: 100%;
    justify-content: center;
  }

  /* Group Ventures Showcase Mobile */
  .ventures-showcase-section {
    padding: 30px 0 20px 0;
  }

  .ventures-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .venture-card {
    padding: 22px 18px;
  }

  .group-metrics-strip {
    grid-template-columns: 1fr 1fr;
    padding: 18px 14px;
    gap: 16px;
  }

  .metric-item-num {
    font-size: 1.6rem;
  }

  .metric-item-label {
    font-size: 0.72rem;
  }

  /* Internet Speed Test Card Mobile */
  .speed-test-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
  }

  .gauge-wrapper {
    width: 240px;
    height: 175px;
  }

  .gauge-svg {
    width: 240px;
    height: 175px;
  }

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

  .speed-waveform-canvas {
    height: 50px;
  }

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

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

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

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

  /* Tool Cards & Panes Mobile Padding */
  .tool-pane-card {
    padding: 20px 14px;
    border-radius: var(--radius-lg);
  }

  .compress-controls-grid,
  .compress-comparison-grid,
  .qr-stage-layout,
  .base64-grid {
    grid-template-columns: 1fr;
  }

  .word-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Knowledge Base & FAQs on Mobile */
  .knowledge-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .knowledge-card {
    padding: 20px 16px;
  }

  .faq-question {
    padding: 16px 14px;
    font-size: 0.94rem;
  }

  .faq-answer {
    padding: 0 14px 16px 14px;
    font-size: 0.88rem;
  }

  /* Content & Legal Pages Mobile */
  .content-page-card {
    padding: 24px 16px;
    border-radius: var(--radius-md);
  }

  .page-hero-title {
    font-size: 1.7rem;
  }

  /* Footer on Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

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

  .footer-legal-links {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Quick Mega Menu Modal Mobile */
  .quick-mega-menu-card {
    max-height: 94vh;
    border-radius: var(--radius-lg);
  }

  .quick-mega-menu-header,
  .quick-mega-search-bar,
  .quick-mega-footer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .quick-menu-category-row {
    padding: 10px 14px;
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .quick-menu-category-row::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .quick-menu-cat-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .quick-mega-grid {
    grid-template-columns: 1fr;
    padding: 16px 14px;
    gap: 10px;
  }

  .quick-mega-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  /* Floating Quick Tools Button */
  .floating-quick-menu-btn {
    bottom: 18px;
    right: 16px;
    padding: 10px 16px;
    font-size: 0.86rem;
  }
}

/* 4. Small Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .brand-logo-img {
    height: 30px;
    max-width: 140px;
  }

  .gauge-wrapper {
    width: 210px;
    height: 155px;
  }

  .gauge-svg {
    width: 210px;
    height: 155px;
  }

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

  .group-metrics-strip {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .compress-controls-grid {
    grid-template-columns: 1fr;
  }

  .tool-nav-tabs-wrapper {
    gap: 6px;
  }

  .tool-nav-tab {
    padding: 7px 14px;
    font-size: 0.8rem;
  }

  .floating-quick-menu-btn .floating-text {
    display: none;
  }

  .floating-quick-menu-btn {
    padding: 12px;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    justify-content: center;
  }

  .floating-quick-menu-btn .floating-badge {
    position: absolute;
    top: -4px;
    right: -4px;
  }
}
