﻿/* =============================================================
   AdBorder — Tool Page Styles (index.html)
   Migrated inline styles + original tool.css
   July 2026
   ============================================================= */

/* ===== Ad Slots — wider for tool page ===== */
.ad-slot { max-width: var(--tool-max); }

/* ===== Hero ===== */
.tool-section { max-width: var(--tool-max); margin: 0 auto; padding: 24px; }
.tool-hero { text-align: center; margin-bottom: 40px; padding-top: 32px; }
.tool-hero h1 {
  font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 12px;
}
.tool-hero h1 .accent-word { color: var(--accent); }
.tool-hero h1 .gradient-word {
  color: var(--accent-light);
}
.tool-hero p { color: var(--text2); font-size: 1.05rem; max-width: 520px; margin: 0 auto; }

.tool-container {
  display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start;
}

/* ===== Upload Zone ===== */
.upload-stage {
  position: relative; width: 100%; aspect-ratio: 4/3; min-height: 360px;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: linear-gradient(145deg, #0d0d1a, #12122a);
  transition: box-shadow 0.4s ease;
}
.upload-stage:hover { box-shadow: 0 0 60px rgba(13,148,136,0.12), 0 0 120px rgba(217,119,6,0.06); }
.upload-stage.dragover { box-shadow: 0 0 80px rgba(13,148,136,0.25), 0 0 160px rgba(217,119,6,0.12); }
.upload-stage.dragover .stage-border { opacity: 1; border-width: 3px; }
.upload-stage.has-image { cursor: default; aspect-ratio: auto; min-height: auto; }

.stage-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

/* Animated conic-gradient border frame */
@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.stage-border {
  position: absolute; inset: 24px; border-radius: 14px;
  border: 2px solid transparent;
  background: linear-gradient(#0d0d1a, #0d0d1a) padding-box,
              conic-gradient(from var(--angle, 0deg), #0d9488, #d97706, #f43f5e, #0d9488) border-box;
  opacity: 0.6; transition: opacity 0.4s, border-width 0.3s;
  z-index: 2; pointer-events: none;
  animation: borderRotate 6s linear infinite;
}
@keyframes borderRotate { to { --angle: 360deg; } }

/* Inner glow pulse */
.stage-glow {
  position: absolute; inset: 24px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 50%, rgba(13,148,136,0.08), transparent 70%);
  z-index: 2; pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* Demo image cycling */
.stage-demo {
  position: absolute; z-index: 3; pointer-events: none;
  inset: 44px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.stage-demo-img {
  width: 70%; max-height: 65%; object-fit: contain;
  border-radius: 4px; opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.stage-demo-img.active { opacity: 0.5; transform: scale(1); }

/* Upload text overlay */
.stage-content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
.upload-stage.has-image .stage-content { opacity: 0; pointer-events: none; }
.upload-stage.has-image .stage-border { opacity: 0; }
.upload-stage.has-image .stage-glow { opacity: 0; }
.upload-stage.has-image .stage-demo { opacity: 0; }

.stage-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(13,148,136,0.15), rgba(217,119,6,0.1));
  border: 1px solid rgba(13,148,136,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}
.upload-stage:hover .stage-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(13,148,136,0.2);
}
.stage-icon-wrap svg { width: 28px; height: 28px; stroke: #5eead4; fill: none; stroke-width: 1.5; }
.icon-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(13,148,136,0.15);
  animation: ringPulse 2.5s ease-in-out infinite;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0; }
}

.stage-title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 6px; color: var(--text);
}
.stage-sub { color: var(--text2); font-size: 0.88rem; margin-bottom: 12px; }
.stage-hint { color: var(--text3); font-size: 0.78rem; letter-spacing: 0.02em; }
.stage-keys { display: inline-flex; gap: 4px; margin-top: 10px; }
.stage-key {
  padding: 2px 8px; border-radius: 4px; font-size: 0.7rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text3); font-family: var(--font-body);
}

/* Bloom animation */
.bloom-overlay {
  position: absolute; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0;
}
.bloom-overlay.active { animation: bloomFlash 0.8s ease-out forwards; }
@keyframes bloomFlash { 0% { opacity: 1; } 30% { opacity: 1; } 100% { opacity: 0; } }
.bloom-ring {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid rgba(13,148,136,0.6);
  animation: bloomExpand 0.8s ease-out forwards;
}
@keyframes bloomExpand { 0% { transform: scale(0.5); opacity: 1; } 100% { transform: scale(15); opacity: 0; } }

#fileInput { display: none; }

/* Preview */
.preview-wrapper { display: none; position: relative; }
.preview-wrapper.active { display: block; }
.upload-stage.hidden { display: none; }
#previewCanvas {
  max-width: 100%; max-height: 500px; border-radius: var(--radius-sm);
  display: block; margin: 0 auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4), 0 0 0 1px var(--surface-border);
}
.preview-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  padding: 10px 24px; border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
  position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--gradient-brand); color: white;
  box-shadow: 0 4px 20px rgba(13,148,136,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(13,148,136,0.45); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--surface-border); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--surface-border-hover); }
.btn .ripple {
  position: absolute; border-radius: 50%; transform: scale(0);
  animation: ripple 0.6s linear; background: rgba(255,255,255,0.3);
  pointer-events: none;
}
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ===== Controls Panel ===== */
.controls-panel {
  background: rgba(255,255,255,0.025);
  backdrop-filter: blur(24px) saturate(1.3); -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px;
  padding: 0; position: sticky; top: 72px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.04);
}

.panel-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; gap: 10px;
}
.panel-header-icon {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(13,148,136,0.2), rgba(217,119,6,0.15));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.panel-header h3 {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 700;
  color: var(--text); letter-spacing: -0.01em; margin: 0;
}

.control-group {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  position: relative;
}
.control-group:last-child { border-bottom: none; }
.control-group label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 0.67rem;
  margin-bottom: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.control-group label .label-icon { font-size: 0.78rem; opacity: 0.7; }

/* Style Grid */
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.style-btn {
  padding: 12px 4px 10px; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; background: rgba(255,255,255,0.025);
  cursor: pointer; text-align: center; font-size: 0.68rem;
  font-weight: 600; color: var(--text3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  position: relative; overflow: hidden;
}
.style-btn::before {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  background: linear-gradient(135deg, rgba(13,148,136,0.12), rgba(217,119,6,0.08));
  opacity: 0; transition: opacity 0.25s;
}
.style-btn:hover { border-color: rgba(255,255,255,0.12); color: var(--text2); transform: translateY(-1px); }
.style-btn:hover::before { opacity: 0.5; }
.style-btn.active {
  border-color: rgba(13,148,136,0.45);
  color: var(--accent);
  background: rgba(13,148,136,0.06);
  box-shadow: 0 0 24px rgba(13,148,136,0.08), inset 0 0 0 1px rgba(13,148,136,0.12);
}
.style-btn.active::before { opacity: 1; }
.style-btn .style-icon { font-size: 1.15rem; display: block; line-height: 1; position: relative; z-index: 1; }
.style-btn span:last-child { position: relative; z-index: 1; }

/* Slider */
.slider-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 5px; background: rgba(255,255,255,0.06);
  border-radius: 3px; outline: none;
  transition: background 0.2s;
}
input[type="range"]:hover { background: rgba(255,255,255,0.1); }
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 0 3px rgba(13,148,136,0.15), 0 0 14px rgba(13,148,136,0.35);
  transition: box-shadow 0.2s, transform 0.15s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 5px rgba(13,148,136,0.18), 0 0 24px rgba(13,148,136,0.5);
  transform: scale(1.12);
}
input[type="range"]::-webkit-slider-thumb:active { transform: scale(0.95); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); cursor: pointer; border: none;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.15), 0 0 14px rgba(13,148,136,0.35);
}
.slider-value {
  font-size: 0.78rem; font-weight: 700; min-width: 44px; text-align: center;
  color: var(--text);
  background: rgba(255,255,255,0.04);
  padding: 5px 10px; border-radius: 7px;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.width-presets { display: flex; gap: 5px; margin-top: 10px; }
.width-preset {
  flex: 1; padding: 10px 4px; border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-sm); background: rgba(255,255,255,0.02); cursor: pointer;
  font-size: 0.68rem; font-weight: 600; color: var(--text3);
  min-height: 40px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}
.width-preset:hover { border-color: rgba(13,148,136,0.35); color: var(--accent); background: rgba(13,148,136,0.05); }

/* Color */
.color-row { display: flex; align-items: center; gap: 12px; }
input[type="color"] {
  width: 36px; height: 36px; border: 2px solid rgba(255,255,255,0.08);
  border-radius: 10px; cursor: pointer; padding: 3px; background: transparent;
  transition: border-color 0.2s;
}
input[type="color"]:hover { border-color: rgba(255,255,255,0.2); }
.color-swatches { display: flex; gap: 5px; flex-wrap: wrap; }
.color-swatch {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.color-swatch:hover { transform: scale(1.15); box-shadow: 0 0 14px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(255,255,255,0.1); }
.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(13,148,136,0.25), 0 0 14px rgba(13,148,136,0.2);
  transform: scale(1.1);
}

/* Gradient */
.gradient-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.gradient-btn {
  height: 36px; border-radius: 10px; border: 2px solid rgba(255,255,255,0.05);
  cursor: pointer; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.gradient-btn:hover { transform: scale(1.08) translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.25); }
.gradient-btn.active { border-color: rgba(217,119,6,0.6); box-shadow: 0 0 0 2px rgba(217,119,6,0.2), 0 4px 16px rgba(0,0,0,0.25); }

/* Radius */
#radiusGroup { display: none; }

/* Toggle */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: border-color 0.2s, background 0.2s;
}
.toggle-row:hover { border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.03); }
.toggle-row span { font-size: 0.82rem; color: var(--text2); font-weight: 500; }
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: rgba(255,255,255,0.08);
  border-radius: 12px; cursor: pointer; transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  border-radius: 50%; background: var(--text3); top: 3px; left: 3px;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle input:checked + .toggle-slider {
  background: rgba(13,148,136,0.35);
  box-shadow: 0 0 16px rgba(13,148,136,0.15);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px); background: var(--accent);
  box-shadow: 0 0 8px rgba(13,148,136,0.4);
}

/* Social */
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.social-btn {
  padding: 9px 4px; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; background: rgba(255,255,255,0.02); cursor: pointer;
  font-size: 0.68rem; font-weight: 600; text-align: center; color: var(--text3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.social-btn:hover { border-color: rgba(217,119,6,0.3); color: var(--text2); transform: translateY(-1px); }
.social-btn.active {
  border-color: rgba(217,119,6,0.45); background: rgba(217,119,6,0.06);
  color: var(--accent2);
  box-shadow: 0 0 16px rgba(217,119,6,0.08);
}

/* Format */
.format-row { display: flex; gap: 5px; }
.format-btn {
  flex: 1; padding: 10px 6px; border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; background: rgba(255,255,255,0.02); cursor: pointer;
  font-size: 0.74rem; font-weight: 700; text-align: center;
  color: var(--text3); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font-display); letter-spacing: 0.03em;
}
.format-btn:hover { border-color: rgba(255,255,255,0.12); color: var(--text2); transform: translateY(-1px); }
.format-btn.active {
  border-color: rgba(13,148,136,0.45); background: rgba(13,148,136,0.06);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(13,148,136,0.08);
}

#qualityGroup { display: none; }

/* Batch */
.batch-area { display: none; margin-top: 16px; }
.batch-area.active { display: block; }
.batch-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.batch-thumb {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.06); cursor: pointer; transition: all 0.25s;
}
.batch-thumb:hover { border-color: rgba(255,255,255,0.15); }
.batch-thumb.active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(13,148,136,0.2), 0 0 14px rgba(13,148,136,0.15); }
.batch-progress { background: rgba(255,255,255,0.04); border-radius: 4px; height: 4px; overflow: hidden; display: none; }
.batch-progress.active { display: block; }
.batch-progress-bar { height: 100%; background: var(--gradient-brand); border-radius: 4px; transition: width 0.3s; }

/* ===== Privacy Banner ===== */
.privacy-banner {
  background: rgba(217,119,6,0.06); border: 1px solid rgba(217,119,6,0.15);
  border-radius: var(--radius); padding: 14px 20px;
  margin: 32px auto; max-width: var(--tool-max);
  display: flex; align-items: center; gap: 12px;
  font-size: 0.88rem; color: rgba(217,119,6,0.9);
}
.privacy-banner .lock-icon { font-size: 1.2rem; }

/* ===== Stats ===== */
.stats-section { max-width: var(--tool-max); margin: 0 auto; padding: 48px 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card {
  background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 28px 20px; text-align: center;
  transition: all 0.3s ease;
}
.stat-card:hover {
  border-color: var(--surface-border-hover);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.stat-number {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800;
  color: var(--accent-light);
  line-height: 1.2;
}
.stat-label { font-size: 0.82rem; color: var(--text3); margin-top: 4px; }

/* ===== Activity Toast ===== */
.activity-toast {
  position: fixed; bottom: 80px; left: 24px; z-index: 90;
  background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border); border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 0.8rem; color: var(--text2);
  transform: translateX(-120%); transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex; align-items: center; gap: 8px; max-width: 280px;
}
.activity-toast.show { transform: translateX(0); }
.activity-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; flex-shrink: 0; }

/* ===== Content Sections ===== */
.content-section { max-width: var(--tool-max); margin: 0 auto; padding: 56px 24px; }
.content-section h2 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  margin-bottom: 16px; letter-spacing: -0.02em;
}
.content-section p { color: var(--text2); font-size: 0.95rem; max-width: 700px; margin-bottom: 12px; }

/* Features Grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 28px; }
.feature-card {
  background: var(--surface); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 28px; transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(13,148,136,0.06), transparent 50%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover { border-color: var(--surface-border-hover); box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
.feature-card:hover::after { opacity: 1; }
.feature-card .feature-icon { font-size: 1.8rem; margin-bottom: 14px; display: block; }
.feature-card h3 { font-family: var(--font-display); font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.85rem; color: var(--text3); margin: 0; }

/* ===== Newsletter ===== */
.newsletter-section { max-width: var(--tool-max); margin: 0 auto; padding: 40px 24px; }
.newsletter-card {
  background: linear-gradient(145deg, rgba(13,148,136,0.06), rgba(217,119,6,0.04));
  border: 1px solid rgba(13,148,136,0.12);
  border-radius: 20px; padding: 36px 32px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.newsletter-text { flex: 1; min-width: 240px; }
.newsletter-text h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.newsletter-text p { color: var(--text3); font-size: 0.85rem; margin: 0; }
.newsletter-form { display: flex; gap: 8px; flex: 1; min-width: 280px; max-width: 440px; }
.newsletter-form input[type="email"] {
  flex: 1; padding: 11px 16px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 0.85rem; font-family: var(--font-body); outline: none;
  transition: border-color 0.2s;
}
.newsletter-form input[type="email"]:focus { border-color: rgba(13,148,136,0.4); }
.newsletter-form input[type="email"]::placeholder { color: var(--text3); }
.newsletter-form button {
  padding: 11px 24px; border: none; border-radius: 10px;
  background: var(--gradient-brand); color: white; font-weight: 700;
  font-size: 0.82rem; cursor: pointer; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(13,148,136,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: var(--font-body);
}
.newsletter-form button:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(13,148,136,0.35); }
.newsletter-success { color: #22c55e; font-size: 0.85rem; font-weight: 600; display: none; margin-top: 8px; }

/* ===== FAQ ===== */
.faq-list { margin-top: 28px; }
.faq-item {
  background: var(--surface); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  margin-bottom: 10px; overflow: hidden; transition: border-color 0.3s;
}
.faq-item:hover { border-color: var(--surface-border-hover); }
.faq-question {
  padding: 18px 24px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9rem;
  color: var(--text); transition: color 0.2s; user-select: none;
  background: none; border: none; width: 100%; text-align: left;
}
.faq-question:hover { color: var(--accent-light); }
.faq-arrow { transition: transform 0.3s; font-size: 0.7rem; color: var(--text3); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer-inner { padding: 0 24px 18px; color: var(--text3); font-size: 0.88rem; line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 500px; }

/* ===== Scroll Reveal — tool page stagger ===== */
.reveal:nth-child(2) { transition-delay: 0.08s; }
.reveal:nth-child(3) { transition-delay: 0.16s; }
.reveal:nth-child(4) { transition-delay: 0.24s; }

/* ===== Blog CTA Banner ===== */
.blog-cta { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.blog-cta-card {
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(217,119,6,0.06));
  border: 1px solid rgba(13,148,136,0.15);
  border-radius: var(--radius); padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.blog-cta-text h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.blog-cta-text p { color: var(--text2); font-size: 0.88rem; margin: 0; }
.blog-cta-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06); border: 1px solid var(--surface-border);
  color: var(--text); text-decoration: none; font-size: 0.85rem;
  font-weight: 600; font-family: var(--font-display);
  white-space: nowrap; transition: all 0.2s;
}
.blog-cta-link:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); text-decoration: none; }

/* ===== Platform Size Guides ===== */
.platform-guides { max-width: var(--tool-max); margin: 0 auto; padding: 48px 24px; }
.platform-guides h2 {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 800;
  margin-bottom: 8px; letter-spacing: -0.02em; text-align: center;
}
.platform-guides > p { color: var(--text2); font-size: 0.95rem; text-align: center; max-width: 600px; margin: 0 auto 28px; }
.platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.platform-card {
  background: var(--surface); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--surface-border); border-radius: var(--radius);
  padding: 24px 16px; text-align: center; text-decoration: none;
  transition: all 0.3s ease; display: block;
}
.platform-card:hover { border-color: var(--surface-border-hover); box-shadow: 0 12px 40px rgba(0,0,0,0.3); }
.platform-card-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.platform-card-icon svg { transition: color 0.3s ease; }
.platform-card:hover .platform-card-icon svg { color: var(--text) !important; }
.platform-card-name { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.platform-card-desc { color: var(--text3); font-size: 0.78rem; }

/* ===== Exit Popup ===== */
.exit-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  animation: exitFadeIn 0.3s ease;
}
.exit-overlay.active { display: flex; }
@keyframes exitFadeIn { from { opacity: 0; } to { opacity: 1; } }
.exit-popup {
  background: linear-gradient(145deg, #13132a, #1a1a35);
  border: 1px solid rgba(13,148,136,0.2); border-radius: 20px;
  padding: 36px 32px; max-width: 420px; width: 90%;
  text-align: center; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(13,148,136,0.1);
  animation: exitSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes exitSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.exit-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; color: var(--text3);
  font-size: 1.2rem; cursor: pointer; padding: 4px;
  transition: color 0.2s;
}
.exit-close:hover { color: var(--text); }
.exit-icon { font-size: 2.2rem; margin-bottom: 12px; display: block; }
.exit-popup h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 800;
  margin-bottom: 8px; color: var(--text);
}
.exit-popup p { color: var(--text2); font-size: 0.88rem; margin-bottom: 20px; line-height: 1.55; }
.exit-cta {
  display: inline-flex; padding: 10px 28px;
  background: var(--gradient-brand); color: white; border: none;
  border-radius: 10px; font-family: var(--font-body); font-weight: 700;
  font-size: 0.88rem; cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,148,136,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.exit-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(13,148,136,0.45); }
.exit-skip {
  display: block; margin-top: 12px; background: none; border: none;
  color: var(--text3); font-size: 0.78rem; cursor: pointer;
  transition: color 0.2s;
}
.exit-skip:hover { color: var(--text2); }

/* Focus visible — tool-specific controls */
.style-btn:focus-visible, .color-swatch:focus-visible, .gradient-btn:focus-visible,
.width-preset:focus-visible, .social-btn:focus-visible, .format-btn:focus-visible {
  outline: 2px solid var(--accent-light); outline-offset: 2px;
  border-color: rgba(13,148,136,0.5);
}

/* ===== Tool Tabs ===== */
.tool-tabs {
  display: flex; gap: 0; justify-content: center; margin-bottom: 24px;
  background: var(--surface); border-radius: 12px; padding: 4px;
  max-width: 400px; margin-left: auto; margin-right: auto;
}
.tool-tab {
  flex: 1; padding: 10px 20px; border: none; background: none; cursor: pointer;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  color: var(--text3); border-radius: var(--radius-sm); transition: all 0.25s;
}
.tool-tab.active {
  background: var(--gradient-brand); color: white;
  box-shadow: 0 2px 12px rgba(13,148,136,0.3);
}
.tool-tab:not(.active):hover { color: var(--text); background: var(--surface-hover); }

/* ===== Size Checker ===== */
.size-checker { display: none; }
.size-checker.active { display: block; }
.sc-upload {
  position: relative; width: 100%; max-width: 800px; margin: 0 auto 32px;
  aspect-ratio: 4/3; min-height: 360px;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: linear-gradient(145deg, #0d0d1a, #12122a);
  transition: box-shadow 0.4s ease;
}
.sc-upload:hover { box-shadow: 0 0 60px rgba(13,148,136,0.12), 0 0 120px rgba(217,119,6,0.06); }
.sc-upload.dragover { box-shadow: 0 0 80px rgba(13,148,136,0.25), 0 0 160px rgba(217,119,6,0.12); }
.sc-upload.dragover .sc-border { opacity: 1; border-width: 3px; }
.sc-upload.has-image { cursor: default; aspect-ratio: auto; min-height: auto; padding: 16px; overflow: visible; }

.sc-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

.sc-border {
  position: absolute; inset: 24px; border-radius: 14px;
  border: 2px solid transparent;
  background: linear-gradient(#0d0d1a, #0d0d1a) padding-box,
              conic-gradient(from var(--angle, 0deg), #d97706, #f43f5e, #0d9488, #d97706) border-box;
  opacity: 0.6; transition: opacity 0.4s, border-width 0.3s;
  z-index: 2; pointer-events: none;
  animation: borderRotate 6s linear infinite;
}

.sc-glow {
  position: absolute; inset: 24px; border-radius: 14px;
  background: radial-gradient(ellipse at 50% 50%, rgba(217,119,6,0.08), transparent 70%);
  z-index: 2; pointer-events: none;
  animation: glowPulse 3s ease-in-out infinite;
}

.sc-demo {
  position: absolute; z-index: 3; pointer-events: none;
  inset: 44px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.sc-demo-img {
  width: 70%; max-height: 65%; object-fit: contain;
  border-radius: 4px; opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.sc-demo-img.active { opacity: 0.5; transform: scale(1); }

.sc-content {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.4s;
}
.sc-upload.has-image .sc-content { opacity: 0; pointer-events: none; }
.sc-upload.has-image .sc-border { opacity: 0; }
.sc-upload.has-image .sc-glow { opacity: 0; }
.sc-upload.has-image .sc-demo { opacity: 0; }

.sc-icon-wrap {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(217,119,6,0.15), rgba(13,148,136,0.1));
  border: 1px solid rgba(217,119,6,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; position: relative;
  transition: transform 0.3s, box-shadow 0.3s;
}
.sc-upload:hover .sc-icon-wrap {
  transform: scale(1.08);
  box-shadow: 0 0 30px rgba(217,119,6,0.2);
}
.sc-icon-wrap svg { width: 28px; height: 28px; stroke: #fbbf24; fill: none; stroke-width: 1.5; }
.sc-icon-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 1px solid rgba(217,119,6,0.15);
  animation: ringPulse 2.5s ease-in-out infinite;
}

.sc-upload-title {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  margin-bottom: 6px; color: var(--text);
}
.sc-upload-sub { color: var(--text2); font-size: 0.88rem; margin-bottom: 12px; }
.sc-upload-hint { color: var(--text3); font-size: 0.78rem; letter-spacing: 0.02em; }
.sc-upload-keys { display: inline-flex; gap: 4px; margin-top: 10px; }
.sc-upload-key {
  padding: 2px 8px; border-radius: 4px; font-size: 0.7rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: var(--text3); font-family: var(--font-body);
}

.sc-preview { max-width: 300px; margin: 0 auto; border-radius: var(--radius-sm); display: none; position: relative; z-index: 5; }
.sc-upload.has-image .sc-preview { display: block; }
.sc-upload.has-image .sc-upload-prompt { display: none; }

.sc-results { max-width: 900px; margin: 0 auto; display: none; }
.sc-results.active { display: block; }
.sc-results h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; text-align: center; margin-bottom: 20px; }
.sc-score-overall {
  text-align: center; margin-bottom: 28px;
  padding: 20px; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--surface-border);
}
.sc-score-number {
  font-family: var(--font-display); font-size: 3.5rem; font-weight: 800;
  color: var(--accent-light);
}
.sc-score-label { color: var(--text2); font-size: 0.88rem; margin-top: 4px; }

.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 24px; }
.sc-card {
  background: var(--surface); border: 1px solid var(--surface-border);
  border-radius: var(--radius); padding: 20px; transition: all 0.3s;
}
.sc-card:hover { border-color: var(--surface-border-hover); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.sc-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.sc-card-icon { font-size: 1.3rem; }
.sc-card-name { font-family: var(--font-display); font-size: 0.92rem; font-weight: 700; }
.sc-card-score { margin-left: auto; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.sc-card-score.perfect { color: #10b981; }
.sc-card-score.good { color: #f59e0b; }
.sc-card-score.poor { color: #ef4444; }
.sc-format-list { list-style: none; padding: 0; }
.sc-format-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  font-size: 0.8rem; color: var(--text2);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sc-format-item:last-child { border: none; }
.sc-format-status { width: 18px; text-align: center; font-size: 0.85rem; }
.sc-format-name { flex: 1; }
.sc-format-size { color: var(--text3); font-size: 0.75rem; font-family: monospace; }

.sc-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.sc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: none; cursor: pointer;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  transition: all 0.25s;
}
.sc-btn-primary { background: var(--gradient-brand); color: white; }
.sc-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(13,148,136,0.4); }
.sc-btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--surface-border); }
.sc-btn-secondary:hover { background: var(--surface-hover); border-color: var(--accent2); }

/* ===== Footer — tool page wider ===== */
footer { background: var(--bg2); }

/* ===== Responsive — Tool ===== */
@media (max-width: 768px) {
  .tool-container { grid-template-columns: 1fr; }
  .controls-panel { position: static; order: -1; border-radius: 16px; margin-bottom: 8px; }
  .tool-hero h1 { font-size: 1.5rem; }
  .upload-stage { min-height: 280px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .privacy-banner { flex-direction: column; text-align: center; }
  .style-grid { grid-template-columns: repeat(4, 1fr); }
  .social-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 600px) {
  .tool-section { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .social-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-cta-card { flex-direction: column; text-align: center; padding: 24px 20px; }
  .newsletter-card { padding: 24px 20px; }
}
