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

:root {
  --primary: #FF4D00;
  --secondary: #FFBE00;
  --accent: #00C896;
  --blue: #0057FF;
  --purple: #8B00FF;
  --bg: #0A0A0F;
  --bg2: #13131A;
  --bg3: #1C1C26;
  --card: #1E1E2E;
  --border: rgba(255,255,255,0.08);
  --text: #FFFFFF;
  --text2: #A0A0B8;
  --radius: 16px;
  --font: 'Nunito', sans-serif;
  --mono: 'Space Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: rgba(10,10,15,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.logo span { color: var(--primary); }

nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
}

nav ul a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

nav ul a:hover {
  color: var(--text);
  background: var(--bg3);
}

/* ── HERO ── */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(255,77,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,77,0,0.15);
  border: 1px solid rgba(255,77,0,0.4);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text2);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stat span {
  display: block;
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
}

.hero-stat small {
  font-size: 13px;
  color: var(--text2);
}

/* ── TOOLS GRID ── */
.tools-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text2);
  margin-bottom: 24px;
}

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

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-color, var(--primary));
  border-radius: var(--radius) var(--radius) 0 0;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.15);
  background: var(--bg3);
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
  background: var(--icon-bg, rgba(255,77,0,0.15));
}

.tool-card h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tool-card p {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

.tool-card .tool-badge {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  background: rgba(255,255,255,0.06);
  color: var(--text2);
}

/* ── TOOL PAGE ── */
.tool-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 50px 20px 80px;
}

.tool-page-header {
  margin-bottom: 36px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.tool-page-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  margin-bottom: 10px;
}

.tool-page-header p {
  font-size: 16px;
  color: var(--text2);
}

/* ── UPLOAD BOX ── */
.upload-box {
  border: 2px dashed rgba(255,77,0,0.4);
  border-radius: var(--radius);
  padding: 60px 30px;
  text-align: center;
  background: rgba(255,77,0,0.04);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.upload-box:hover, .upload-box.dragover {
  border-color: var(--primary);
  background: rgba(255,77,0,0.08);
}

.upload-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.upload-box h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.upload-box p {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 20px;
}

.upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: #e64400; transform: translateY(-1px); }

.btn-success {
  background: var(--accent);
  color: #000;
}

.btn-success:hover { background: #00b384; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover { border-color: rgba(255,255,255,0.3); background: var(--bg3); }

/* ── CONTROLS ── */
.controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
}

.control-group {
  margin-bottom: 20px;
}

.control-group:last-child { margin-bottom: 0; }

.control-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.control-group input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  height: 6px;
  cursor: pointer;
}

.control-group input[type="number"],
.control-group input[type="text"],
.control-group select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.control-group input:focus,
.control-group select:focus {
  border-color: var(--primary);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.range-val {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  min-width: 45px;
  text-align: right;
}

/* ── RESULT BOX ── */
.result-box {
  background: var(--card);
  border: 1px solid rgba(0,200,150,0.3);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  display: none;
}

.result-box.show { display: block; }

.result-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-item {
  background: var(--bg2);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}

.stat-item .val {
  font-size: 20px;
  font-weight: 900;
  color: var(--accent);
}

.stat-item .lbl {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
}

/* ── PREVIEW ── */
.preview-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}

.preview-panel {
  background: var(--bg2);
  border-radius: 12px;
  overflow: hidden;
}

.preview-panel .preview-label {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}

.preview-panel img {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  display: block;
  padding: 12px;
}

/* ── INFO SECTION ── */
.info-section {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.info-section h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 16px;
}

.info-section p {
  font-size: 15px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 16px;
}

.faq { margin-top: 40px; }

.faq h2 {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 20px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}

.faq-q {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  transition: background 0.2s;
}

.faq-q:hover { background: var(--bg3); }

.faq-a {
  padding: 0 20px;
  font-size: 14px;
  color: var(--text2);
  line-height: 1.7;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s;
}

.faq-a.open {
  max-height: 200px;
  padding: 16px 20px;
}

/* ── FOOTER ── */
footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text2);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

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

footer p {
  font-size: 13px;
  color: var(--text2);
}

/* ── LOADING ── */
.loading {
  display: none;
  text-align: center;
  padding: 30px;
}

.loading.show { display: block; }

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── PROGRESS ── */
.progress-bar-wrap {
  background: var(--bg2);
  border-radius: 100px;
  height: 8px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 100px;
  transition: width 0.3s;
  width: 0%;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.5s ease forwards;
}

.fade-up-1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-3 { animation-delay: 0.3s; opacity: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { padding: 14px 20px; }
  nav ul { display: none; }
  .hero { padding: 50px 20px 40px; }
  .preview-row { grid-template-columns: 1fr; }
  .result-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats { gap: 24px; }
}
