*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --bg: #080b11;
  --surface: #0f1420;
  --border: #1e2535;
  --accent: #4f8ef7;
  --accent2: #a78bfa;
  --text: #e8eaf0;
  --muted: #7a84a0;
  --radius: 12px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5%;
  background: rgba(8,11,17,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── LANG SWITCH ── */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.lang-switch button {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.lang-switch button.active {
  background: var(--accent);
  color: #fff;
}

.nav-cta {
  background: var(--accent);
  color: #fff;
  padding: 0.55rem 1.3rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.2s, transform 0.2s;
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 5% 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(79,142,247,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(79,142,247,0.1);
  border: 1px solid rgba(79,142,247,0.25);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
}

.hero-badge::before { content: '●'; font-size: 0.5rem; }

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

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

.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(79,142,247,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79,142,247,0.4); }

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, background 0.2s;
}
.btn-secondary:hover { border-color: var(--accent); background: rgba(79,142,247,0.05); }

.hero-scroll {
  margin-top: 4rem;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ── SECTION WRAPPER ── */
section { padding: 6rem 5%; }
.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin-bottom: 3.5rem;
}

/* ── SERVICES ── */
#services { background: var(--surface); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.2rem;
}

.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

/* ── UNIQUE SOLUTIONS ── */
#unique { background: var(--bg); }

.unique-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.unique-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.unique-card:hover { border-color: var(--accent2); transform: translateY(-4px); }

.unique-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(167,139,250,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.unique-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent2);
  background: rgba(167,139,250,0.1);
  border: 1px solid rgba(167,139,250,0.2);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.unique-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.unique-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }

.unique-cta-wrap {
  margin-top: 3.5rem;
  padding: 2.5rem;
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(167,139,250,0.06), rgba(79,142,247,0.06));
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.unique-cta-wrap p { color: var(--muted); font-size: 0.95rem; max-width: 480px; margin: 0; }
.unique-cta-wrap strong { color: var(--text); display: block; font-size: 1.1rem; margin-bottom: 0.3rem; }

.btn-outline {
  border: 1px solid var(--accent2);
  color: var(--accent2);
  padding: 0.75rem 1.8rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.btn-outline:hover { background: var(--accent2); color: #fff; }

/* ── STACK ── */
#stack .tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tech-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.tech-pill:hover { border-color: var(--accent); color: var(--text); }

/* ── PROCESS ── */
#process { background: var(--surface); }

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.step { position: relative; }

.step-num {
  font-size: 3rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin-bottom: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { color: var(--muted); font-size: 0.9rem; }

/* ── WHY ME ── */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.why-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.why-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.why-item h4 { font-size: 1rem; font-weight: 700; margin-bottom: 0.3rem; }
.why-item p { color: var(--muted); font-size: 0.9rem; }

/* ── CONTACT ── */
#contact { background: var(--surface); }

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info p { color: var(--muted); margin-bottom: 2rem; }

.contact-detail {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-detail strong { color: var(--text); }

form { display: flex; flex-direction: column; gap: 1rem; }

input, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 130px; resize: vertical; }

.btn-submit {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 0.9rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}
.btn-submit:hover { opacity: 0.85; transform: translateY(-1px); }

/* ── BLAZER GAME ── */
#blazer { background: var(--bg); overflow: hidden; }

.blazer-mount {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.blazer-scaler {
  width: 800px;
  height: 600px;
  transform: scale(var(--blazer-scale, 1));
  transform-origin: top center;
}

.blazer-frame {
  --game-bg: #06051a;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --yellow: #ffe600;
  --green: #2bff7f;
  --red: #ff3355;
  --tile: 80px;
  --cols: 7;
  --rows: 200;
  --rotate: 68deg;
  --persp: 480px;

  position: relative;
  width: 800px; height: 600px;
  box-shadow:
    0 0 0 4px #000,
    0 0 0 8px var(--cyan),
    0 0 60px rgba(0,229,255,0.4),
    0 0 120px rgba(255,43,214,0.2);
  border-radius: 6px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 60% at 50% 100%, #28004d 0%, transparent 60%),
    linear-gradient(to bottom, #04031a 0%, #0e0030 38%, #1c0046 39%, #06051a 100%);
  font-family: 'Press Start 2P', monospace;
  color: var(--cyan);
  cursor: pointer;
  outline: none;
  user-select: none;
}
.blazer-frame.is-active {
  cursor: default;
  box-shadow:
    0 0 0 4px #000,
    0 0 0 8px var(--magenta),
    0 0 60px rgba(255,43,214,0.5),
    0 0 120px rgba(0,229,255,0.3);
}

.blazer-frame .stars {
  position: absolute; inset: 0 0 62% 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 24% 64%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 47% 32%, #fff, transparent),
    radial-gradient(1px 1px at 68% 12%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 82% 48%, #fff, transparent),
    radial-gradient(1px 1px at 91% 22%, #fff, transparent),
    radial-gradient(1px 1px at 7% 80%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 38% 76%, #fff, transparent),
    radial-gradient(1px 1px at 56% 88%, #fff, transparent);
  background-size: 250px 220px;
  opacity: 0.85;
  animation: blazer-drift 60s linear infinite;
}
@keyframes blazer-drift { to { background-position: 250px 0; } }

.blazer-frame .sun {
  position: absolute;
  top: 22%; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 130px;
  background: radial-gradient(ellipse at 50% 80%, #ffd84a 0%, #ff5fbc 45%, transparent 70%);
  filter: blur(1px);
  pointer-events: none;
}
.blazer-frame .sun-bars {
  position: absolute;
  top: 30%; left: 50%;
  transform: translateX(-50%);
  width: 240px; height: 100px;
  background: repeating-linear-gradient(to bottom, transparent 0 12px, var(--game-bg) 12px 16px);
  pointer-events: none;
  mask: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
  -webkit-mask: linear-gradient(to bottom, transparent 0%, black 30%, black 100%);
}

.blazer-frame .horizon {
  position: absolute;
  top: 38%; left: 0; right: 0;
  height: 2px;
  background: var(--magenta);
  box-shadow: 0 0 10px var(--magenta), 0 0 24px var(--magenta), 0 0 40px var(--magenta);
}

.blazer-frame .scene {
  position: absolute; inset: 0;
  perspective: var(--persp);
  perspective-origin: 50% 30%;
  overflow: hidden;
}

.blazer-frame .track-wrapper {
  position: absolute;
  bottom: -10px; left: 50%;
  width: calc(var(--tile) * var(--cols));
  height: 1px;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotateX(var(--rotate));
  transform-style: preserve-3d;
}

.blazer-frame .track {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: calc(var(--tile) * var(--rows));
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  grid-auto-rows: var(--tile);
  transform: translateY(var(--scroll, 0px));
  will-change: transform;
}

.blazer-frame .tile { box-sizing: border-box; border: 1px solid rgba(0,229,255,0.18); }
.blazer-frame .tile.n-a { background: #00b8d4; }
.blazer-frame .tile.n-b { background: #0a3142; }
.blazer-frame .tile.hole { background: #000; border: 2px solid var(--magenta); box-shadow: inset 0 0 14px var(--magenta); }
.blazer-frame .tile.boost { background: var(--yellow); box-shadow: inset 0 0 14px #ff9800; }
.blazer-frame .tile.slow { background: var(--red); box-shadow: inset 0 0 14px #800010; }
.blazer-frame .tile.jump { background: var(--green); box-shadow: inset 0 0 14px #006622; }
.blazer-frame .tile.finish { background: conic-gradient(#fff 0 25%, #000 0 50%, #fff 0 75%, #000 0); background-size: 40px 40px; }

.blazer-frame .track-wrapper::before,
.blazer-frame .track-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  width: 3px;
  height: calc(var(--tile) * var(--rows));
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan), 0 0 20px var(--cyan);
  transform: translateY(var(--scroll, 0px));
}
.blazer-frame .track-wrapper::before { left: -3px; }
.blazer-frame .track-wrapper::after { right: 0; }

.blazer-frame .ball-wrap {
  position: absolute;
  bottom: 80px; left: 50%;
  width: 0; height: 0;
  transform: translateX(calc(-50% + var(--ball-x, 0px)));
  z-index: 6;
  pointer-events: none;
}
.blazer-frame .ball {
  position: absolute;
  left: -22px;
  top: calc(-44px + var(--ball-y, 0px));
  width: 44px; height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0%, #cdf3ff 25%, #2196d4 65%, #002a4f 100%);
  border: 2px solid #fff;
  box-shadow: 0 0 18px rgba(0,229,255,0.9), 0 0 36px rgba(0,229,255,0.4);
}
.blazer-frame .ball-shadow {
  position: absolute;
  left: -22px; top: -8px;
  width: 44px; height: 14px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.7), transparent 70%);
  transform: scale(var(--shadow-scale, 1));
  filter: blur(2px);
}

.blazer-frame .hud {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 12px;
  z-index: 7;
  text-shadow: 2px 2px 0 #000;
}
.blazer-frame .stat { line-height: 1.7; }
.blazer-frame .speed-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.blazer-frame .speed-bar {
  width: 170px; height: 14px;
  background: rgba(0,30,40,0.85);
  border: 2px solid var(--cyan);
  position: relative;
}
.blazer-frame .speed-fill { height: 100%; background: var(--cyan); transition: background 0.2s; }

.blazer-frame .crt-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.blazer-frame .crt-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,0.28) 3px 4px);
  mix-blend-mode: multiply;
}
.blazer-frame .crt-overlay::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.7) 100%);
}

.blazer-frame .card-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(6,5,26,0.9);
  z-index: 40;
  text-align: center;
  gap: 22px;
  padding: 20px;
}
.blazer-frame .card-overlay h1 {
  font-size: 48px; margin: 0;
  color: var(--magenta);
  text-shadow: 3px 3px 0 var(--cyan), 6px 6px 0 #000;
  letter-spacing: 4px;
  font-weight: normal;
}
.blazer-frame .card-overlay p { font-size: 10px; line-height: 1.8; margin: 0; color: var(--cyan); }
.blazer-frame .card-overlay .key { color: var(--yellow); }
.blazer-frame .legend { display: grid; grid-template-columns: auto auto; gap: 10px 24px; font-size: 9px; }
.blazer-frame .swatch { display: inline-block; width: 14px; height: 14px; vertical-align: middle; margin-right: 8px; border: 2px solid #000; }
.blazer-frame .blink { animation: blazer-blink 1s steps(2) infinite; }
@keyframes blazer-blink { 50% { opacity: 0; } }
.blazer-frame .hidden { display: none !important; }

.blazer-frame .touch-controls {
  display: none;
  position: absolute;
  inset: auto 0 0 0;
  height: 50%;
  z-index: 50;
}
@media (hover: none) and (pointer: coarse) {
  .blazer-frame .touch-controls { display: flex; }
}
.blazer-frame .touch-zone {
  flex: 1;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 16px;
  font-size: 22px;
  color: rgba(0,229,255,0.5);
  text-shadow: 2px 2px 0 #000;
  -webkit-tap-highlight-color: transparent;
}
.blazer-frame .touch-zone:active { background: rgba(0,229,255,0.08); }
.blazer-frame .touch-zone.touch-jump { color: rgba(43,255,127,0.6); }

/* Special highlight for the Play nav link */
.nav-links a.nav-play { color: var(--accent2); font-weight: 700; }
.nav-links a.nav-play::before { content: '▶ '; font-size: 0.7rem; }

.nav-links a.nav-tools {
  color: var(--accent);
  font-weight: 600;
  border: 1px solid rgba(79,142,247,0.25);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.nav-links a.nav-tools:hover { background: rgba(79,142,247,0.08); border-color: var(--accent); color: var(--text); }

/* ── FOOTER ── */
footer {
  padding: 2rem 5%;
  border-top: 1px solid var(--border);
}

footer p { color: var(--muted); font-size: 0.85rem; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .contact-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── FADE-IN ANIMATION ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── TOOL PAGE ── */
.tool-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5%;
  background: rgba(8,11,17,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.tool-nav .nav-logo { text-decoration: none; }

.tool-page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 7rem 5% 5rem;
}

.tool-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.tool-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 1rem;
}

.tool-sub {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.75rem;
  align-items: start;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(79,142,247,0.04);
}

.dropzone-glyph { color: var(--accent); opacity: 0.75; }

.dropzone-label { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0; }

.dropzone-hint { color: var(--muted); font-size: 0.85rem; margin: 0; }

.dropzone-btn {
  cursor: pointer;
  user-select: none;
}
.dropzone-btn input { display: none; }

.dropzone-note { color: var(--muted); font-size: 0.78rem; margin: 0; }

/* File list */
.file-list {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
  position: sticky;
  top: 0;
  background: var(--bg);
}

.file-clear-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  font-family: inherit;
  transition: color 0.15s;
}
.file-clear-btn:hover { color: var(--text); }

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}
.file-item:last-child { border-bottom: none; }

.file-item-name {
  flex: 1;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size { color: var(--muted); font-size: 0.76rem; flex-shrink: 0; }

.file-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  font-family: inherit;
  transition: color 0.15s;
}
.file-remove-btn:hover { color: #ff5577; }

/* Config */
.config-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-optional { color: var(--muted); font-weight: 400; font-size: 0.75rem; }

.form-input { width: 100%; }

/* Generate button */
.tool-generate {
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.tool-generate:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Loading */
.tool-loading {
  text-align: center;
  padding: 2rem 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.tool-spinner {
  width: 38px; height: 38px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: tool-spin 0.75s linear infinite;
}
@keyframes tool-spin { to { transform: rotate(360deg); } }

.loading-text { font-weight: 600; margin: 0; }
.loading-hint { color: var(--muted); font-size: 0.83rem; margin: 0; }

/* Error */
.tool-error {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255,85,119,0.07);
  border: 1px solid rgba(255,85,119,0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.tool-error p { color: #ff5577; font-size: 0.9rem; margin: 0; }

/* Result */
.tool-result {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.result-check {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(52,211,153,0.1);
  border: 1px solid rgba(52,211,153,0.3);
  color: #34d399;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-label { font-weight: 700; font-size: 1.05rem; margin: 0; }

.result-download {
  display: inline-block;
  text-decoration: none;
  padding: 0.85rem 2.5rem;
}

.tool-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 600;
  transition: border-color 0.2s;
}
.tool-btn:hover { border-color: var(--accent); }

/* Sidebar */
.tool-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: sticky;
  top: 5.5rem;
}

.tool-info h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 1.25rem; }

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
}

.info-list li { display: flex; gap: 0.75rem; align-items: flex-start; }

.info-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 5px;
  flex-shrink: 0;
}

.info-list strong { display: block; font-size: 0.88rem; margin-bottom: 0.1rem; }
.info-list p { color: var(--muted); font-size: 0.8rem; margin: 0; line-height: 1.5; }

.info-note {
  padding: 0.9rem 1rem;
  background: rgba(79,142,247,0.06);
  border: 1px solid rgba(79,142,247,0.12);
  border-radius: 8px;
}
.info-note p { color: var(--muted); font-size: 0.8rem; margin: 0; line-height: 1.5; }

@media (max-width: 800px) {
  .tool-layout { grid-template-columns: 1fr; }
  .config-row { grid-template-columns: 1fr; }
  .tool-info { position: static; }
}
