/* ============================================================
   PictureSizes.com — Main Stylesheet
   Dark-first, system-font, zero-bloat design system
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Dark mode (default) */
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a26;
  --bg-card: #14141f;
  --bg-card-hover: #1c1c2a;
  --bg-input: #1a1a26;
  --bg-code: #1e1e2e;

  --text-primary: #e8e8f0;
  --text-secondary: #9898b0;
  --text-tertiary: #6a6a80;
  --text-inverse: #0a0a0f;

  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.15);
  --accent-glow-strong: rgba(108, 92, 231, 0.3);

  --green: #00cec9;
  --green-glow: rgba(0, 206, 201, 0.15);
  --orange: #fdcb6e;
  --orange-glow: rgba(253, 203, 110, 0.12);
  --red: #ff6b6b;
  --cyan: #74b9ff;

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(108, 92, 231, 0.3);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(108, 92, 231, 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Fira Code", Consolas, monospace;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --max-width: 1200px;
  --header-height: 64px;
}

/* Light mode overrides */
[data-theme="light"] {
  --bg-primary: #f5f5fa;
  --bg-secondary: #eeeef4;
  --bg-tertiary: #e4e4ee;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8fc;
  --bg-input: #ffffff;
  --bg-code: #f0f0f8;

  --text-primary: #1a1a2e;
  --text-secondary: #5a5a78;
  --text-tertiary: #8888a0;
  --text-inverse: #f5f5fa;

  --accent: #5b4cdb;
  --accent-light: #7c6ff0;
  --accent-glow: rgba(91, 76, 219, 0.08);
  --accent-glow-strong: rgba(91, 76, 219, 0.15);

  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);
  --border-accent: rgba(91, 76, 219, 0.25);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --shadow-glow: 0 0 30px rgba(91, 76, 219, 0.06);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
}

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

a:hover {
  color: var(--accent);
}

img, svg {
  display: block;
  max-width: 100%;
}

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

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

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
}

.badge--green {
  background: var(--green-glow);
  color: var(--green);
  border-color: rgba(0, 206, 201, 0.25);
}

.badge--orange {
  background: var(--orange-glow);
  color: var(--orange);
  border-color: rgba(253, 203, 110, 0.2);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-base);
}

[data-theme="light"] .site-header {
  background: rgba(245, 245, 250, 0.85);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent-light);
}

/* Primary Nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link[aria-expanded="true"] {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.nav-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform var(--transition-fast);
}

.nav-link[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: all var(--transition-fast);
  pointer-events: none;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

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

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

.dropdown-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.dropdown-icon svg {
  width: 18px;
  height: 18px;
}

.dropdown-icon--green { background: var(--green-glow); color: var(--green); }
.dropdown-icon--orange { background: var(--orange-glow); color: var(--orange); }

.dropdown-label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.dropdown-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  line-height: 1.4;
  margin-top: 2px;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }

.btn-pwa {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-pwa:hover {
  background: var(--accent-light);
  color: var(--text-inverse);
  box-shadow: 0 0 20px var(--accent-glow-strong);
}

.btn-pwa svg {
  width: 15px;
  height: 15px;
}

/* Mobile menu toggle */
.mobile-toggle {
  display: none;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.mobile-toggle svg { width: 22px; height: 22px; }

/* ============================================================
   HERO SECTION — Instant Calculator
   ============================================================ */
.hero {
  position: relative;
  padding: 80px 0 60px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow-strong) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  max-width: 520px;
}

.hero-updated {
  margin-bottom: 16px;
}

.hero-h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent-light), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 460px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.hero-links .btn-primary {
  background: var(--accent);
  color: #fff;
}

.hero-links .btn-primary:hover {
  background: var(--accent-light);
  color: var(--text-inverse);
  box-shadow: 0 4px 20px var(--accent-glow-strong);
}

.hero-links .btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.hero-links .btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

/* Hero Calculator Widget */
.hero-calculator {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.calc-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-title svg {
  width: 18px;
  height: 18px;
  color: var(--accent-light);
}

.calc-tab-group {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.calc-tab {
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  border-radius: 4px;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calc-tab.active {
  background: var(--accent);
  color: #fff;
}

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

.calc-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

.calc-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.calc-field input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: border-color var(--transition-fast);
  outline: none;
}

.calc-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.calc-field input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.calc-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 4px;
  color: var(--text-tertiary);
}

.calc-link-icon svg {
  width: 20px;
  height: 20px;
}

.calc-ratio-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.calc-ratio-row label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.calc-ratio-select {
  flex: 1;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239898b0'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

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

/* Visual Bounding Box Preview */
.calc-preview {
  position: relative;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  overflow: hidden;
}

.calc-preview-box {
  border: 2px dashed var(--accent-light);
  border-radius: 4px;
  background: var(--accent-glow);
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
}

.calc-preview-label {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-weight: 600;
  white-space: nowrap;
}

.calc-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.calc-actions button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-calc-copy {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-calc-copy:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
}

.btn-calc-copy svg {
  width: 14px;
  height: 14px;
}

.btn-calc-go {
  background: var(--accent);
  color: #fff;
}

.btn-calc-go:hover {
  background: var(--accent-light);
  color: var(--text-inverse);
}

/* ============================================================
   SECTION: Trusted By / Social Proof Strip
   ============================================================ */
.trust-strip {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.trust-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.trust-stats {
  display: flex;
  gap: 32px;
}

.trust-stat {
  text-align: center;
}

.trust-stat-number {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.trust-stat-label {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* ============================================================
   SECTION: The Three Pillars
   ============================================================ */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-badge {
  margin-bottom: 12px;
  display: inline-flex;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Pillar Cards */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.pillar-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.pillar-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.pillar-card:hover::before {
  opacity: 1;
}

.pillar-card--green::before { background: var(--green); }
.pillar-card--orange::before { background: var(--orange); }

.pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: var(--accent-glow);
  color: var(--accent-light);
}

.pillar-icon svg { width: 24px; height: 24px; }
.pillar-card--green .pillar-icon { background: var(--green-glow); color: var(--green); }
.pillar-card--orange .pillar-icon { background: var(--orange-glow); color: var(--orange); }

.pillar-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.pillar-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.pillar-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pillar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  transition: all var(--transition-fast);
}

.pillar-link:hover {
  color: var(--text-primary);
  background: var(--accent-glow);
}

.pillar-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* Feature Cards (for tool pages) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
  text-align: center;
}

.feature-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: var(--accent-glow);
  color: var(--accent-light);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

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

/* ============================================================
   SECTION: Quick Specs (Social Media Sizes Grid)
   ============================================================ */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.spec-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

.spec-platform-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.spec-platform-icon--instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: #fff; }
.spec-platform-icon--facebook { background: #1877f2; color: #fff; }
.spec-platform-icon--twitter { background: #000; color: #fff; }
.spec-platform-icon--youtube { background: #ff0000; color: #fff; }
.spec-platform-icon--linkedin { background: #0a66c2; color: #fff; }
.spec-platform-icon--tiktok { background: #010101; color: #fff; }
.spec-platform-icon--pinterest { background: #e60023; color: #fff; }
.spec-platform-icon--threads { background: #000; color: #fff; }

[data-theme="light"] .spec-platform-icon--twitter { background: #1da1f2; }
[data-theme="light"] .spec-platform-icon--threads { background: #333; }

.spec-platform-name {
  font-size: 1rem;
  font-weight: 700;
}

.spec-platform-update {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.spec-table {
  width: 100%;
  font-size: 0.8rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

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

.spec-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.spec-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.copy-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.copy-btn:hover {
  color: var(--accent-light);
  background: var(--accent-glow);
}

.copy-btn svg {
  width: 13px;
  height: 13px;
}

.copy-btn.copied {
  color: var(--green);
}

.spec-card-footer {
  margin-top: auto;
  padding-top: 14px;
}

.spec-card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-light);
}

.spec-card-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.spec-card-link:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   SECTION: Pro Tip Callout
   ============================================================ */
.protip {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin: 40px 0;
  position: relative;
}

.protip::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.protip-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: var(--accent-light);
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

.protip-content {
  flex: 1;
}

.protip-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.protip-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.protip-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ============================================================
   SECTION: Comparisons
   ============================================================ */
.comparisons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.compare-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.compare-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.compare-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compare-title svg {
  width: 18px;
  height: 18px;
  color: var(--orange);
}

.compare-visual {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  justify-content: center;
  padding: 20px 0;
  margin-bottom: 16px;
}

.compare-box {
  border: 2px solid var(--accent-light);
  border-radius: 4px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.compare-box-label {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-weight: 600;
  text-align: center;
  padding: 4px;
}

.compare-box--b {
  border-color: var(--green);
  background: var(--green-glow);
}

.compare-box--b .compare-box-label {
  color: var(--green);
}

.compare-vs {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.compare-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-light);
}

.compare-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.compare-link:hover svg {
  transform: translateX(3px);
}

/* ============================================================
   SECTION: All Pages / Sitemap
   ============================================================ */
.sitemap-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.sitemap-column h3 {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.sitemap-column ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sitemap-column a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition-fast);
}

.sitemap-column a:hover {
  color: var(--accent-light);
}

.sitemap-column a .new-badge {
  font-size: 0.6rem;
  padding: 1px 5px;
  background: var(--green-glow);
  color: var(--green);
  border-radius: 100px;
  font-weight: 700;
}

/* ============================================================
   SECTION: FAQ (with Schema)
   ============================================================ */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.faq-item.open {
  border-color: var(--border-strong);
}

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

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

.faq-question svg {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.faq-item.open .faq-question svg {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}

.faq-answer-inner {
  padding: 0 22px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 48px;
}

.footer-nav-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

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

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

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.footer-bottom a {
  color: var(--text-tertiary);
}

.footer-bottom a:hover {
  color: var(--text-secondary);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

/* ============================================================
   TOAST / NOTIFICATION
   ============================================================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  background: var(--green);
  color: #000;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-content {
    text-align: center;
    margin: 0 auto;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-links {
    justify-content: center;
  }

  .hero-calculator {
    max-width: 480px;
    margin: 0 auto;
  }

  .pillars-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }

  .sitemap-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-brand {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .hero { padding: 48px 0 40px; }

  .primary-nav { display: none; }
  .btn-pwa { display: none; }
  .mobile-toggle { display: flex; }

  /* Mobile nav overlay */
  .primary-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 20px 24px;
    z-index: 999;
    overflow-y: auto;
    gap: 4px;
  }

  .primary-nav.open .nav-link {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .primary-nav.open .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--bg-tertiary);
    min-width: auto;
    pointer-events: auto;
    margin-top: 4px;
    border-radius: var(--radius-md);
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .comparisons-grid {
    grid-template-columns: 1fr;
  }

  .sitemap-grid {
    grid-template-columns: 1fr;
  }

  .footer-nav {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .trust-stats { gap: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-calculator { padding: 20px; }

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

  .calc-link-icon { display: none; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.animate-in:nth-child(1) { animation-delay: 0ms; }
.animate-in:nth-child(2) { animation-delay: 80ms; }
.animate-in:nth-child(3) { animation-delay: 160ms; }
.animate-in:nth-child(4) { animation-delay: 240ms; }
.animate-in:nth-child(5) { animation-delay: 320ms; }
.animate-in:nth-child(6) { animation-delay: 400ms; }
.animate-in:nth-child(7) { animation-delay: 480ms; }
.animate-in:nth-child(8) { animation-delay: 560ms; }

/* Scroll-triggered */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   TOOLS GRID
   ============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tool-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--accent-glow);
  color: var(--accent-light);
}

.tool-icon svg {
  width: 26px;
  height: 26px;
}

.tool-icon--green {
  background: var(--green-glow);
  color: var(--green);
}

.tool-icon--orange {
  background: var(--orange-glow);
  color: var(--orange);
}

.tool-card:hover .tool-icon--green::before { background: var(--green); }
.tool-card:hover .tool-icon--orange::before { background: var(--orange); }

.tool-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

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

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tool-feature {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--bg-tertiary);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-light);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  transition: all var(--transition-fast);
  justify-content: center;
}

.tool-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow-strong);
}

.tool-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
}

.tool-link:hover svg {
  transform: translateX(2px);
}

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

/* ============================================================
   SPEC DETAIL PAGES
   ============================================================ */
.spec-section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 28px;
  letter-spacing: -0.02em;
}

.spec-table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
}

.spec-table-scroll {
  overflow-x: auto;
  margin-top: 20px;
}

.spec-table-full {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.spec-table-full thead {
  background: var(--bg-tertiary);
}

.spec-table-full th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border-strong);
}

.spec-table-full td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.6;
}

.spec-table-full tbody tr:last-child td {
  border-bottom: none;
}

.spec-table-full tbody tr:hover {
  background: var(--bg-tertiary);
}

.spec-table-full code {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

.spec-table-full strong {
  font-weight: 700;
  color: var(--text-primary);
}

/* Spec Detail Cards */
.specs-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-top: 28px;
}

.spec-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.spec-detail-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.spec-detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.spec-detail-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  color: #fff;
  flex-shrink: 0;
}

.spec-detail-icon svg {
  width: 24px;
  height: 24px;
}

.spec-detail-icon--green {
  background: var(--green);
}

.spec-detail-icon--orange {
  background: var(--orange);
}

.spec-detail-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.spec-detail-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spec-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  gap: 12px;
}

.spec-detail-label {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.spec-detail-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.spec-detail-tips {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.spec-detail-tips strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 8px;
}

.spec-detail-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-detail-tips li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.spec-detail-tips li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--accent-light);
  font-weight: 700;
}

/* Spec Tip Cards */
.spec-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.spec-tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.spec-tip-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.spec-tip-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.spec-tip-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-tip-card li {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 18px;
  position: relative;
}

.spec-tip-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: 700;
}

.spec-tip-card strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 768px) {
  .specs-detail-grid {
    grid-template-columns: 1fr;
  }

  .spec-tips-grid {
    grid-template-columns: 1fr;
  }

  .spec-table-scroll {
    margin: 0 -28px;
    padding: 0 28px;
  }
}

/* ============================================================
   ABOUT PAGE & STATIC PAGES
   ============================================================ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-section {
  margin-bottom: 48px;
}

.about-section h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.about-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.about-section p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 28px;
  position: relative;
}

.about-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
  font-size: 1.1rem;
}

.about-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.about-grid > div {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.about-grid h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--accent-light);
}

.about-grid p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

/* ============================================================
   CALCULATOR PAGES
   ============================================================ */
.calculator-main {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  max-width: 700px;
  margin: 0 auto;
}

/* File Upload Area */
.file-upload-area {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
}

.file-upload-area:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.file-upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.file-upload-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-light);
}

.file-upload-icon svg {
  width: 48px;
  height: 48px;
}

.file-upload-primary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.file-upload-secondary {
  font-size: 0.875rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* Image Preview */
.image-preview-container {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  max-height: 280px;
  overflow: hidden;
}

#previewCanvas {
  max-width: 100%;
  max-height: 250px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.calc-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}

.calc-tabs .calc-tab {
  flex: 1;
  padding: 10px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  background: transparent;
}

.calc-tabs .calc-tab.active {
  background: var(--accent);
  color: #fff;
}

.calc-tabs .calc-tab:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.calc-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 24px;
}

.calc-input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.calc-input-group label span {
  color: var(--text-tertiary);
  opacity: 0.7;
  font-weight: 500;
}

.calc-input-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  outline: none;
}

.calc-input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.calc-input-group input::placeholder {
  color: var(--text-tertiary);
  opacity: 0.4;
  font-weight: 400;
}

.calc-ratio-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.calc-ratio-icon svg {
  width: 24px;
  height: 24px;
}

/* Resize Options Group */
.resize-options-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Preset Buttons */
.presets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.preset-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.preset-btn-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.preset-btn-dims {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

/* Percentage Mode */
.percentage-input-wrapper {
  margin-bottom: 20px;
}

.percentage-input-wrapper label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.percentage-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.percentage-input-group input {
  flex: 1;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  outline: none;
}

.percentage-suffix {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.percentage-info {
  background: var(--bg-tertiary);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.percentage-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.percentage-info-item span {
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.percentage-info-item strong {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Lock Ratio Button */
.lock-ratio-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lock-ratio-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
}

.lock-ratio-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-light);
}

.lock-ratio-btn svg {
  width: 20px;
  height: 20px;
}

.calc-result {
  text-align: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  border: 2px solid var(--border);
  transition: all var(--transition-base);
}

.calc-result-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.calc-result-value {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--accent-light);
  line-height: 1;
  margin-bottom: 8px;
}

.calc-result-decimal {
  font-size: 1.1rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-weight: 600;
}

.calc-preview-area {
  margin-bottom: 32px;
}

.calc-preview-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  text-align: center;
}

.calc-preview-container {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.calc-preview-box-ar {
  border: 3px dashed var(--accent-light);
  border-radius: 6px;
  background: var(--accent-glow);
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 300px;
}

.calc-preview-dimensions {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-light);
  font-weight: 700;
  white-space: nowrap;
  padding: 8px;
}

.calc-actions-ar {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.btn-calc-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-calc-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-calc-action svg {
  width: 16px;
  height: 16px;
}

.btn-calc-action--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-calc-action--primary:hover {
  background: var(--accent-light);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow-strong);
}

/* Presets Grid */
.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.preset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all var(--transition-base);
  cursor: pointer;
  text-align: center;
}

.preset-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.preset-visual {
  position: relative;
  width: 100%;
  background: var(--accent-glow);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preset-visual--vertical {
  max-width: 60%;
  margin-left: auto;
  margin-right: auto;
}

.preset-ratio {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-light);
  font-size: 0.9rem;
}

.preset-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.preset-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  line-height: 1.4;
}

.preset-example {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent-light);
  font-weight: 600;
}

/* Calculator Mode Switching */
.calc-mode-content {
  position: relative;
}

.calc-mode {
  display: none;
}

.calc-mode.active {
  display: block;
}

.calc-select {
  padding: 10px 12px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 100px;
}

.calc-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.calc-additional-results {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-top: 28px;
}

.calc-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

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

.calc-stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.calc-stat-value {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Print Quality Indicators */
.calc-stat-value.quality-low {
  color: var(--red);
}

.calc-stat-value.quality-fair {
  color: var(--orange);
}

.calc-stat-value.quality-good {
  color: var(--cyan);
}

.calc-stat-value.quality-very-good {
  color: var(--green);
}

.calc-stat-value.quality-excellent {
  color: var(--green);
  font-weight: 700;
}

/* Calculator Actions */
.calc-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.calc-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.calc-btn svg {
  width: 16px;
  height: 16px;
}

.calc-btn--primary {
  background: var(--accent);
  color: #fff;
  border: none;
}

.calc-btn--primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 16px var(--accent-glow-strong);
}

.calc-btn--secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.calc-btn--secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Preset Cards - DPI Calculator Style */
.preset-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.preset-spec {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.preset-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-light);
  font-family: var(--font-mono);
}

/* Explainer Section */
.explainer-section {
  max-width: 900px;
  margin: 0 auto;
}

.explainer-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  text-align: center;
}

.explainer-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.explainer-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.explainer-content h3:first-child {
  margin-top: 0;
}

.explainer-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
}

.explainer-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explainer-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  padding-left: 28px;
  position: relative;
}

.explainer-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-light);
  font-weight: 700;
}

.explainer-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.section-title-sm {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (max-width: 768px) {
  .calculator-main {
    padding: 28px 20px;
  }

  .calc-inputs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calc-ratio-icon {
    transform: rotate(90deg);
    margin-bottom: 0;
  }

  .calc-result-value {
    font-size: 2.5rem;
  }

  .calc-actions-ar {
    grid-template-columns: 1fr;
  }

  .calc-actions {
    flex-direction: column;
  }

  .presets-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .explainer-content {
    padding: 24px;
  }
}

/* ============================================================
   IMAGE COMPRESSOR TOOL
   ============================================================ */

/* Compression Comparison (Side-by-Side) */
.compression-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.comparison-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.comparison-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.comparison-item canvas {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.comparison-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: center;
}

.comparison-info span {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.compression-savings {
  font-size: 0.875rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--green-glow);
  color: var(--green);
}

/* Compression Controls */
.compression-controls {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Quality Slider */
.quality-slider {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 100px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border-strong);
}

.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quality-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.quality-slider::-webkit-slider-thumb:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

.quality-slider::-moz-range-thumb:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

.quality-slider:focus::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.quality-slider:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.quality-markers {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.quality-markers span {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Format Select */
.format-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%239898b0'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.format-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.format-select:hover {
  border-color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .compression-comparison {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .compression-controls {
    padding: 20px;
  }
}

/* ============================================================
   COLOR FORMAT CONVERTER TOOL
   ============================================================ */

/* Color Preview */
.color-preview-area {
  margin-bottom: 32px;
}

.color-preview-box {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  background: linear-gradient(135deg, #6c5ce7, #a29bfe);
}

/* Color Input Section */
.color-input-section {
  margin-bottom: 24px;
}

.color-format-hint {
  font-size: 0.8rem;
  margin-top: 8px;
  font-weight: 600;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

/* Color Picker Section */
.color-picker-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.color-picker-section label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

#colorPicker {
  width: 100%;
  height: 60px;
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

#colorPicker:hover {
  border-color: var(--accent);
}

#colorPicker:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Color Results */
.color-results {
  margin-bottom: 24px;
}

.color-results-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  text-align: center;
}

.color-format-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: all var(--transition-fast);
}

.color-format-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.color-format-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.color-format-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.color-format-value {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-all;
}

/* Alpha Slider */
.alpha-slider-wrapper {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.alpha-slider-wrapper label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.alpha-slider-wrapper label span {
  color: var(--accent-light);
  font-family: var(--font-mono);
}

.alpha-slider {
  width: 100%;
  height: 6px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(108, 92, 231, 0.2) 25%,
    rgba(108, 92, 231, 0.5) 50%,
    rgba(108, 92, 231, 0.8) 75%,
    rgba(108, 92, 231, 1) 100%);
  border-radius: 100px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  border: 1px solid var(--border);
}

.alpha-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.alpha-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.alpha-slider::-webkit-slider-thumb:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

.alpha-slider::-moz-range-thumb:hover {
  background: var(--accent-light);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .color-preview-box {
    height: 150px;
  }

  .color-format-value {
    font-size: 0.95rem;
  }
}

/* ============================================================
   CSS SIZE GENERATOR TOOL
   ============================================================ */

/* CSS Generator Sections */
.css-gen-section {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.css-gen-section:last-of-type {
  border-bottom: none;
  margin-bottom: 24px;
}

.css-gen-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.css-gen-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.css-gen-row:last-child {
  margin-bottom: 0;
}

/* Input with Unit Selector */
.css-input-with-unit {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.css-input-with-unit input {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
  outline: none;
}

.css-input-with-unit input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.css-input-with-unit .calc-select {
  min-width: 80px;
  padding: 12px 12px;
  font-size: 0.9rem;
}

/* CSS Generator Options */
.css-gen-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* CSS Output Section */
.css-output-section {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.css-output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.css-output-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#copyCssBtn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

#copyCssBtn:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 12px var(--accent-glow-strong);
}

#copyCssBtn svg {
  width: 14px;
  height: 14px;
}

.css-code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 0;
  overflow-x: auto;
}

.css-code-block code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre;
  display: block;
}

/* Preset Cards Enhancement */
.preset-card {
  text-align: left;
}

.preset-spec {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  word-break: break-all;
}

/* Responsive */
@media (max-width: 768px) {
  .css-gen-row {
    grid-template-columns: 1fr;
  }

  .css-output-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  #copyCssBtn {
    width: 100%;
    justify-content: center;
  }

  .css-code-block {
    padding: 16px;
  }

  .css-code-block code {
    font-size: 0.8rem;
  }
}

/* ============================================================
   RESPONSIVE BREAKPOINT CALCULATOR TOOL
   ============================================================ */

/* Framework Tabs */
.framework-tabs {
  display: flex;
  gap: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 6px;
  flex-wrap: wrap;
}

.framework-tab {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  text-align: center;
}

.framework-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.framework-tab.active {
  background: var(--accent);
  color: #fff;
}

/* Approach Selector */
.approach-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-option:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent);
}

.radio-option input[type="radio"]:checked + .radio-label {
  color: var(--text-primary);
}

.radio-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.radio-label strong {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.radio-label small {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Custom Breakpoint Inputs */
.breakpoint-inputs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.breakpoint-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: center;
}

.breakpoint-name,
.breakpoint-value {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  outline: none;
}

.breakpoint-name:focus,
.breakpoint-value:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.btn-remove-breakpoint {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.btn-remove-breakpoint:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.btn-remove-breakpoint svg {
  width: 18px;
  height: 18px;
}

.btn-add-breakpoint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-add-breakpoint:hover {
  border-color: var(--accent);
  color: var(--accent-light);
  background: var(--accent-glow);
}

.btn-add-breakpoint svg {
  width: 18px;
  height: 18px;
}

/* Breakpoints Preview */
.breakpoints-preview {
  margin-bottom: 32px;
}

.breakpoint-range-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.breakpoint-range-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: all var(--transition-fast);
}

.breakpoint-range-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}

.breakpoint-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.breakpoint-range-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

.breakpoint-range-size {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  font-weight: 600;
}

.breakpoint-range-bar {
  height: 8px;
  background: var(--green);
  border-radius: 100px;
  transition: all var(--transition-base);
}

/* Breakpoint Reference Cards */
.breakpoint-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.breakpoint-ref-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.breakpoint-ref-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-light);
}

.breakpoint-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.breakpoint-list li {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
  line-height: 1.6;
}

.breakpoint-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 1.2rem;
}

.breakpoint-list strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .framework-tabs {
    flex-direction: column;
  }

  .framework-tab {
    min-width: auto;
  }

  .approach-selector {
    grid-template-columns: 1fr;
  }

  .breakpoint-input-row {
    grid-template-columns: 1fr;
  }

  .btn-remove-breakpoint {
    width: 100%;
    height: auto;
    padding: 10px;
  }

  .breakpoint-range-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .breakpoint-reference-grid {
    grid-template-columns: 1fr;
  }
}
