/* Капля — минималистичный стиль */
:root {
  --blue: #1e90ff;
  --blue-light: #e8f3ff;
  --blue-dark: #0e6fd8;
  --text: #1a1d23;
  --text-secondary: #6b7280;
  --border: #e2e6ea;
  --bg: #f7f9fc;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(30,144,255,0.08);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Шапка ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo-icon { font-size: 1.4rem; line-height: 1; }
.nav { display: flex; gap: 20px; }
.nav a { font-size: 0.875rem; color: var(--text-secondary); }
.nav a:hover { color: var(--blue); text-decoration: none; }

/* ── Основная область ── */
.main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Hero ── */
.hero {
  text-align: center;
  margin-bottom: 40px;
}
.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}
.hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ── Зона загрузки ── */
.drop-zone {
  border: 2.5px dashed var(--blue);
  border-radius: var(--radius);
  background: var(--blue-light);
  padding: 52px 32px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  position: relative;
  outline: none;
}
.drop-zone:hover, .drop-zone.dragover {
  background: #d4e9ff;
  border-color: var(--blue-dark);
}
.drop-icon { font-size: 2.8rem; margin-bottom: 14px; display: block; }
.drop-text-main {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.drop-text-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.drop-text-sub span {
  margin: 0 4px;
  opacity: 0.5;
}
#file-input { display: none; }

/* ── Баннер (ошибки/статус) ── */
.banner {
  display: none;
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  line-height: 1.5;
}
.banner.error {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.banner.info {
  background: var(--blue-light);
  border: 1px solid #93c5fd;
  color: #1e40af;
}
.banner.visible { display: block; }
.banner-title { font-weight: 600; margin-bottom: 4px; }

/* ── Прогресс ── */
.progress-wrap {
  display: none;
  margin-top: 20px;
}
.progress-wrap.visible { display: block; }
.progress-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--blue);
  width: 0%;
  border-radius: 3px;
  transition: width 0.2s;
}

/* ── Секция «Как это работает» ── */
.how-section { margin-top: 52px; }
.how-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}
.step {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.step h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Сноска ── */
.footnote {
  margin-top: 40px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
}

/* ── Подвал ── */
.site-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--blue); }
.footer-sep { margin: 0 8px; opacity: 0.4; }

/* ── Контентные страницы ── */
.content-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.content-page h1 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 32px;
  letter-spacing: -0.02em;
}
.content-page h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--text);
}
.content-page p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.7;
}
.content-page ul {
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ── Changelog ── */
.changelog-list { list-style: none; padding: 0; margin: 0; }
.changelog-item {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.changelog-item:last-child { border-bottom: none; }
.changelog-date {
  flex: 0 0 130px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding-top: 2px;
}
.changelog-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
}
@media (max-width: 480px) {
  .changelog-item { flex-direction: column; gap: 4px; }
  .changelog-date { flex: none; }
}

/* ── Страницы ошибок ── */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px;
  text-align: center;
}
.error-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--blue-light);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 16px;
}
.error-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.error-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.btn-home {
  display: inline-block;
  padding: 11px 28px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-home:hover { background: var(--blue-dark); text-decoration: none; }
