:root {
  --primary: #0071e3;
  --primary-dark: #005bb5;
  --success: #34c759;
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #d2d2d7;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 2rem 1rem;
  line-height: 1.6;
}

main { max-width: 640px; margin: 0 auto; text-align: center; }

h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
h2 { font-size: 1.25rem; margin: 1.5rem 0 0.5rem; text-align: left; }
.subtitle { color: var(--text-muted); margin-bottom: 2rem; }

#drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem 1.5rem;
  margin: 2rem 0;
  cursor: pointer;
  background: var(--card);
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
#drop-zone:hover { border-color: var(--primary); transform: translateY(-2px); }
#drop-zone.dragover { background: #e8f2ff; border-color: var(--primary); }

#controls {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}
#controls label { font-weight: 600; font-size: 0.9rem; }

select {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 1rem;
  cursor: pointer;
}
input[type="range"] { width: 140px; accent-color: var(--primary); }
#quality-value { font-weight: 600; min-width: 2.5rem; }

#preview { margin: 1.5rem 0; font-size: 0.95rem; }
#preview img { max-width: 100%; max-height: 300px; border-radius: var(--radius); margin-top: 1rem; box-shadow: var(--shadow); }

#convert-btn, #download-link {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
#convert-btn:hover, #download-link:hover { background: var(--primary-dark); transform: translateY(-1px); }
#convert-btn:disabled { opacity: 0.5; cursor: not-allowed; }
#download-link { background: var(--success); }
#download-link:hover { background: #2aa84a; }

.privacy { margin-top: 2rem; font-size: 0.85rem; color: var(--text-muted); }

.seo-content { text-align: left; margin-top: 3rem; background: var(--card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.seo-content p, .seo-content li { color: var(--text-muted); margin-bottom: 0.5rem; }
.seo-content ul { padding-left: 1.5rem; }

footer { margin-top: 2rem; color: var(--text-muted); font-size: 0.85rem; }
