/* === ОБЩИЕ СТИЛИ CONVERTIK.PRO === */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #222;
  line-height: 1.6;
  background: #fafafa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === ШАПКА === */
header {
  background: #fff;
  border-bottom: 1px solid #eaeaea;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  text-decoration: none;
}
.logo span { color: #4CAF50; }
nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  flex-wrap: wrap;
}
nav a {
  color: #444;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
  padding: 6px 0;
}
nav a:hover { color: #4CAF50; }

/* === ОСНОВНОЙ КОНТЕНТ === */
main {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}
main.wide { max-width: 900px; }

/* === ХЛЕБНЫЕ КРОШКИ === */
.breadcrumbs {
  font-size: 13px;
  color: #888;
  margin-bottom: 25px;
}
.breadcrumbs a {
  color: #888;
  text-decoration: none;
}
.breadcrumbs a:hover {
  color: #4CAF50;
  text-decoration: underline;
}
.breadcrumbs span { margin: 0 6px; }

/* === ЗАГОЛОВОК ИНСТРУМЕНТА === */
.tool-header {
  text-align: center;
  margin-bottom: 30px;
}
.tool-header h1 {
  font-size: 30px;
  margin-bottom: 10px;
  line-height: 1.25;
}
.tool-header p {
  color: #666;
  font-size: 15px;
}
.badge {
  display: inline-block;
  background: #e8f5e9;
  color: #2e7d32;
  font-size: 13px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 15px;
  font-weight: 500;
}

/* === HERO (главная) === */
.hero { text-align: center; margin-bottom: 55px; }
.hero h1 { font-size: 34px; margin-bottom: 15px; line-height: 1.25; }
.hero p { font-size: 17px; color: #666; max-width: 620px; margin: 0 auto; }
.section-title {
  font-size: 22px;
  margin-bottom: 8px;
  margin-top: 40px;
  scroll-margin-top: 90px;
}
.section-title:first-of-type { margin-top: 0; }
.section-desc { color: #777; font-size: 14px; margin-bottom: 22px; }

/* === СЕТКА КАРТОЧЕК === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 22px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}
.card:hover {
  border-color: #4CAF50;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}
.card-icon { font-size: 26px; margin-bottom: 12px; }
.card h3 { font-size: 17px; margin-bottom: 6px; }
.card p { font-size: 14px; color: #777; flex: 1; }
.card .tag {
  display: inline-block;
  font-size: 11px;
  color: #2e7d32;
  background: #e8f5e9;
  padding: 3px 9px;
  border-radius: 10px;
  margin-top: 12px;
  align-self: flex-start;
}

/* === ЗОНА ЗАГРУЗКИ === */
#drop-zone {
  background: #fff;
  border: 2px dashed #ccc;
  padding: 50px 20px;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.2s;
  text-align: center;
}
#drop-zone:hover { border-color: #888; }
#drop-zone.dragover { border-color: #4CAF50; background: #f0fff0; }
#drop-zone .dz-icon { font-size: 42px; margin-bottom: 12px; }
#drop-zone .dz-text { font-size: 16px; color: #444; margin-bottom: 6px; }
#drop-zone .dz-hint { font-size: 13px; color: #999; }

/* === БЛОК ЛИМИТОВ === */
.limits {
  margin-top: 15px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 13px;
  color: #666;
}
.limits strong { color: #444; }
.limits ul { margin: 8px 0 0 20px; padding: 0; }
.limits ul li { margin-bottom: 4px; }

/* === ИНДИКАТОР ЗАГРУЗКИ === */
.loader {
  display: none;
  text-align: center;
  margin-top: 25px;
  color: #666;
  font-size: 15px;
}
.loader.active { display: block; }

/* === РЕЗУЛЬТАТ === */
#result {
  margin-top: 30px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 25px;
  display: none;
  text-align: center;
}
#result.active { display: block; }
#result p { margin-bottom: 15px; color: #444; }
#preview {
  max-width: 100%;
  max-height: 400px;
  margin: 0 auto 20px;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
a.button {
  display: inline-block;
  padding: 12px 28px;
  background: #4CAF50;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s;
}
a.button:hover { background: #45a049; }
a.button.reset { background: #eee; color: #444; margin-left: 10px; }
a.button.reset:hover { background: #ddd; }

/* === ДВУХКОЛОНОЧНЫЙ РЕЖИМ (CSV/JSON/YAML/XML) === */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}
.tool-panel {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.panel-header h2 { font-size: 15px; font-weight: 600; color: #444; }
.panel-actions { display: flex; gap: 8px; }
.panel-actions button, .panel-actions a {
  background: #f0f0f0;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #444;
  text-decoration: none;
  transition: background 0.2s;
}
.panel-actions button:hover, .panel-actions a:hover { background: #e0e0e0; }

/* === TEXTAREA === */
#input-text, #output-text {
  width: 100%;
  flex: 1;
  min-height: 250px;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  color: #333;
  line-height: 1.5;
}
#output-text { background: #f9f9f9; color: #555; }
#input-text:focus { outline: none; border-color: #4CAF50; }

/* === НАСТРОЙКИ === */
.options {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  font-size: 14px;
}
.options label { display: flex; align-items: center; gap: 6px; cursor: pointer; color: #555; }
.options input[type="text"] {
  padding: 5px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  width: 80px;
}

/* === КНОПКА КОНВЕРТАЦИИ === */
.convert-btn {
  width: 100%;
  padding: 14px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 15px;
}
.convert-btn:hover { background: #45a049; }

/* === ОШИБКА === */
.error-msg {
  display: none;
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #c62828;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 15px;
}
.error-msg.active { display: block; }

/* === ПРЕДУПРЕЖДЕНИЕ О НЕПОДДЕРЖКЕ === */
.not-supported {
  display: none;
  margin-top: 20px;
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 15px 20px;
  font-size: 14px;
  color: #8a6d00;
}
.not-supported.active { display: block; }

/* === SEO-ТЕКСТ === */
.seo-text {
  margin-top: 60px;
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 30px 25px;
}
.seo-text h2 { font-size: 20px; margin-bottom: 15px; }
.seo-text h3 { font-size: 17px; margin-top: 22px; margin-bottom: 10px; }
.seo-text p { color: #555; font-size: 15px; margin-bottom: 12px; }
.seo-text ul { margin: 10px 0 15px 22px; color: #555; font-size: 15px; }
.seo-text ul li { margin-bottom: 6px; }
.seo-text code {
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #c62828;
}

/* === ПОДВАЛ === */
footer {
  background: #fff;
  border-top: 1px solid #eaeaea;
  padding: 45px 20px 20px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 35px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eaeaea;
}
.footer-col h4 { font-size: 15px; margin-bottom: 14px; color: #222; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col p { font-size: 14px; color: #666; margin-bottom: 10px; }
.footer-col a { color: #666; text-decoration: none; font-size: 14px; transition: color 0.2s; }
.footer-col a:hover { color: #4CAF50; text-decoration: underline; }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #999;
  line-height: 1.5;
}

/* === ПРАВОВЫЕ СТРАНИЦЫ === */
.page-header { margin-bottom: 35px; }
.page-header h1 { font-size: 28px; margin-bottom: 8px; line-height: 1.3; }
.page-header .updated { font-size: 13px; color: #999; }
.content h2 { font-size: 19px; margin-top: 30px; margin-bottom: 12px; color: #222; }
.content h2:first-of-type { margin-top: 0; }
.content p { color: #444; font-size: 15px; margin-bottom: 14px; }
.content ul { margin: 10px 0 15px 22px; color: #444; font-size: 15px; }
.content ul li { margin-bottom: 7px; }
.content a { color: #4CAF50; text-decoration: none; }
.content a:hover { text-decoration: underline; }
.highlight {
  background: #e8f5e9;
  border-left: 4px solid #4CAF50;
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  font-size: 15px;
  color: #2e7d32;
}
.highlight strong { color: #1b5e20; }
.cookies-table, .data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0 25px;
  font-size: 14px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eaeaea;
}
.cookies-table th, .data-table th {
  background: #f5f5f5;
  text-align: left;
  padding: 12px 15px;
  font-weight: 600;
  color: #444;
  border-bottom: 1px solid #eaeaea;
}
.cookies-table td, .data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #555;
  vertical-align: top;
}
.cookies-table tr:last-child td, .data-table tr:last-child td { border-bottom: none; }
.cookies-table td strong, .data-table td strong { color: #222; }

/* === 404 === */
.error-block { text-align: center; margin-bottom: 50px; }
.error-code {
  font-size: 100px;
  font-weight: 700;
  color: #4CAF50;
  line-height: 1;
  margin-bottom: 15px;
  letter-spacing: 2px;
}
.error-block h1 { font-size: 28px; margin-bottom: 12px; line-height: 1.3; }
.error-block p { color: #666; font-size: 16px; max-width: 520px; margin: 0 auto 25px; }
.back-btn {
  display: inline-block;
  padding: 12px 30px;
  background: #4CAF50;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  transition: background 0.2s;
}
.back-btn:hover { background: #45a049; }
.links-block {
  background: #fff;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  padding: 30px 25px;
}
.links-block h2 { font-size: 18px; margin-bottom: 8px; }
.links-block > p { color: #777; font-size: 14px; margin-bottom: 20px; }
.links-section { margin-bottom: 25px; }
.links-section:last-child { margin-bottom: 0; }
.links-section h3 { font-size: 15px; color: #444; margin-bottom: 12px; }
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.links-grid a {
  display: block;
  padding: 10px 14px;
  background: #fafafa;
  border: 1px solid #eaeaea;
  border-radius: 8px;
  text-decoration: none;
  color: #444;
  font-size: 14px;
  transition: all 0.2s;
}
.links-grid a:hover {
  background: #f0fff0;
  border-color: #4CAF50;
  color: #2e7d32;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 700px) {
  .tool-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 26px; }
  .tool-header h1 { font-size: 24px; }
  .header-inner { justify-content: center; text-align: center; }
  nav ul { gap: 15px; justify-content: center; }
  #drop-zone { padding: 35px 15px; }
}
@media (max-width: 600px) {
  .page-header h1 { font-size: 22px; }
  .error-code { font-size: 72px; }
  .error-block h1 { font-size: 22px; }
  .cookies-table, .data-table { font-size: 13px; }
  .cookies-table th, .cookies-table td,
  .data-table th, .data-table td { padding: 10px; }
}