/* ===== Asos ===== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #eef2ff;
  --bg: #f8faff;
  --surface: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --success: #10b981;
  --danger: #ef4444;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  --shadow-lg: 0 20px 50px rgba(37, 99, 235, 0.15);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* ===== Header ===== */
.site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 18px;
}

.brand-name span, .footer-brand span {
  color: var(--primary);
}

.nav { display: flex; gap: 24px; }

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}

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

/* ===== Hero ===== */
.hero {
  padding: 48px 0 60px;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

h1 {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(30px, 5vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.gradient-text {
  background: linear-gradient(120deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== Tool card ===== */
.tool-card {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.drop-zone {
  border: 2px dashed #c7d2fe;
  border-radius: var(--radius);
  background: var(--primary-light);
  padding: 48px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--primary);
  background: #e0e7ff;
}

.drop-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.drop-title {
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}

.drop-hint {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

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

.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35); }

.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-upload {
  min-width: 180px;
  margin-top: 8px;
}

.btn-download {
  background: var(--success);
  color: #fff;
  width: 100%;
}

.btn-download:hover { background: #059669; box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  width: 100%;
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Editor ===== */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.preview-box {
  background: #f1f5f9;
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
}

.preview-img {
  width: 100%;
  height: 260px;
  object-fit: contain;
  background: repeating-conic-gradient(#f8fafc 0% 25%, #eef2ff 0% 50%);
  background-size: 20px 20px;
  border-radius: 10px;
}

.preview-label {
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.preview-label strong {
  color: var(--text);
  display: block;
  font-size: 15px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
}

.resize-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resize-row input[type="number"] {
  width: 90px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}

.resize-row .times { color: var(--text-muted); }

.aspect-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  font-size: 13px !important;
  font-weight: 500 !important;
  margin: 0 0 0 8px !important;
}

.aspect-check input { accent-color: var(--primary); width: 16px; height: 16px; }

.btn-compress {
  margin-top: 4px;
}

/* ===== Result ===== */
.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

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

.result-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.savings-box {
  text-align: center;
  padding: 20px;
  border-radius: var(--radius);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.savings-pct {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--success);
}

.savings-note {
  color: #059669;
  font-size: 14px;
}

/* ===== Sections ===== */
.features, .howto, .faq {
  padding: 56px 0 0;
}

.features h2, .howto h2, .faq h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 32px;
}

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

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.feature:hover { transform: translateY(-4px); }

.feature-icon { font-size: 30px; display: block; margin-bottom: 12px; }

.feature h3 {
  font-size: 17px;
  margin-bottom: 8px;
  font-family: 'Manrope', sans-serif;
}

.feature p { font-size: 14px; color: var(--text-muted); }

.howto-list {
  list-style: none;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.howto-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 15px;
}

.howto-list .step {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== FAQ ===== */
.faq { padding-bottom: 60px; }

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  position: relative;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--primary);
  font-weight: 400;
}

details[open] summary::after { content: '−'; }

details p {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Privacy note ===== */
.privacy-note {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: #fff;
}

.footer-note { font-size: 14px; color: #94a3b8; margin-top: 4px; }

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

.footer-nav a { color: #94a3b8; text-decoration: none; font-size: 14px; }
.footer-nav a:hover { color: #fff; }

.footer-copy {
  font-size: 13px;
  color: #64748b;
  border-top: 1px solid #1e293b;
  padding-top: 16px;
}

/* ===== Page (content sahifalari) ===== */
.page {
  padding: 48px 0 72px;
}

.page h1 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 24px;
}

.page h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  margin: 32px 0 12px;
}

.page p, .page li {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 12px;
}

.page ul, .page ol { padding-left: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* ===== Utilities ===== */
.hidden { display: none !important; }