/* ── Reset & Base ─────────────────────────────────────────────────── */

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

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
  background-color: #1a1a2e;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ──────────────────────────────────────────────────────── */

.header {
  text-align: center;
  padding: 2rem 1rem 1rem;
  width: 100%;
  max-width: 800px;
}

.header__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #7289da;
  margin-bottom: 0.3rem;
}

.header__subtitle {
  font-size: 0.95rem;
  color: #8e8e9e;
}

/* ── Container ───────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 800px;
  padding: 0 1rem 2rem;
}

/* ── Drop Zone ───────────────────────────────────────────────────── */

.drop-zone {
  border: 2px dashed #4f545c;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background-color 0.2s;
  background-color: #16213e;
}

.drop-zone:hover,
.drop-zone--active {
  border-color: #7289da;
  background-color: #1a2744;
}

.drop-zone__icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
  color: #7289da;
}

.drop-zone__text {
  font-size: 1.1rem;
  color: #b0b0c0;
  margin-bottom: 1rem;
}

.drop-zone__formats {
  font-size: 0.85rem;
  color: #6e6e80;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s,
    opacity 0.15s;
}

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

.btn--primary {
  background-color: #7289da;
  color: #fff;
}

.btn--primary:hover:not(:disabled) {
  background-color: #5b6eae;
}

.btn--secondary {
  background-color: #4f545c;
  color: #e0e0e0;
}

.btn--secondary:hover:not(:disabled) {
  background-color: #40444b;
}

.btn--download {
  background-color: #43b581;
  color: #fff;
}

.btn--download:hover:not(:disabled) {
  background-color: #3ca374;
}

/* ── File Info ────────────────────────────────────────────────────── */

.file-info {
  background-color: #16213e;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.file-info__row {
  padding: 0.15rem 0;
  font-size: 0.9rem;
}

.file-info__row strong {
  color: #7289da;
  min-width: 80px;
  display: inline-block;
}

/* ── Convert Section ─────────────────────────────────────────────── */

.convert-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.convert-section label {
  font-weight: 600;
  color: #b0b0c0;
}

.convert-section select {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #4f545c;
  background-color: #2f3136;
  color: #e0e0e0;
  font-size: 0.95rem;
  cursor: pointer;
}

.convert-section select:focus {
  outline: none;
  border-color: #7289da;
}

/* ── Status ──────────────────────────────────────────────────────── */

.status {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  min-height: 1.5rem;
}

.status--info {
  color: #7289da;
}

.status--success {
  color: #43b581;
}

.status--error {
  color: #f04747;
}

/* ── Preview ─────────────────────────────────────────────────────── */

.preview-section {
  margin-top: 1rem;
}

.preview-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #b0b0c0;
  margin-bottom: 0.5rem;
}

.preview-content {
  background-color: #0f3460;
  border-radius: 8px;
  padding: 1rem;
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 400px;
  overflow-y: auto;
  color: #c8d6e5;
  border: 1px solid #1a4a7a;
}

/* ── Actions ─────────────────────────────────────────────────────── */

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ── Utility ─────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ── Footer ──────────────────────────────────────────────────────── */

.footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8rem;
  color: #6e6e80;
  width: 100%;
  max-width: 800px;
}

.footer a {
  color: #7289da;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 600px) {
  .header__title {
    font-size: 1.35rem;
  }

  .drop-zone {
    padding: 2rem 1rem;
  }

  .convert-section {
    flex-direction: column;
    align-items: stretch;
  }
}
