:root {
  --bg: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.96);
  --card-bg: #0b1120;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --border-subtle: rgba(148, 163, 184, 0.45);
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.8);
  --shadow-subtle: 0 12px 30px rgba(15, 23, 42, 0.6);
  --transition-fast: 0.16s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, #0ea5e9 0, transparent 55%),
    radial-gradient(circle at 20% 80%, #22c55e 0, transparent 45%),
    radial-gradient(circle at 90% 20%, #a855f7 0, transparent 40%),
    #020617;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

/* Layout */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(2, 6, 23, 0.96),
    rgba(2, 6, 23, 0.86),
    transparent
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #e0f2fe 0, #38bdf8 45%, #0f172a 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 14px 26px rgba(56, 189, 248, 0.55);
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.98rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.main-nav a {
  position: relative;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.2rem 0;
  transition: color var(--transition-fast);
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  transition: width var(--transition-fast);
}

.main-nav a:hover {
  color: var(--text-main);
}

.main-nav a:hover::after {
  width: 100%;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.75);
}

.lang-switch a {
  min-width: 38px;
  padding: 0.16rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.lang-switch a:hover {
  color: var(--text-main);
  transform: translateY(-1px);
}

.lang-switch a.active {
  background: radial-gradient(circle at 0 0, #e0f2fe 0, var(--accent) 40%, var(--accent-strong) 100%);
  color: #020617;
  font-weight: 600;
}

/* Hero */

.hero {
  padding: 2.8rem 0 2.4rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(0, 2.4fr);
  align-items: center;
  gap: 2.5rem;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.1rem, 3.7vw, 2.8rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 0;
  max-width: 520px;
  font-size: 0.98rem;
  color: var(--text-muted);
}

.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.hero-bullets li {
  font-size: 0.82rem;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
}

.hero-card {
  position: relative;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-xl) + 2px);
  background: conic-gradient(from 160deg, #38bdf8, #a855f7, #22c55e, #38bdf8);
  opacity: 0.88;
  filter: blur(6px);
  z-index: -1;
}

.hero-card-inner {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem 1.6rem 1.4rem;
}

.hero-card-inner h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.hero-card-inner p {
  margin: 0 0 0.95rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-mini-ui {
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.98);
  border: 1px dashed rgba(148, 163, 184, 0.5);
  padding: 0.8rem;
}

.hero-dropzone {
  height: 72px;
  border-radius: 0.9rem;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  margin-bottom: 0.6rem;
}

.hero-bar {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  opacity: 0.95;
  margin-bottom: 0.35rem;
}

.hero-bar.small {
  width: 46%;
  opacity: 0.7;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-primary {
  background: radial-gradient(circle at 0 0, #e0f2fe 0, var(--accent) 40%, var(--accent-strong) 100%);
  color: #020617;
  box-shadow: 0 16px 34px rgba(56, 189, 248, 0.65);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(56, 189, 248, 0.8);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.96);
  color: var(--text-main);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent-strong);
  box-shadow: var(--shadow-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px dashed rgba(148, 163, 184, 0.55);
}

.btn-ghost:hover {
  color: var(--text-main);
  border-style: solid;
}

/* Converter */

.converter {
  padding: 0 0 3.6rem;
}

.panel {
  background: var(--bg-elevated);
  border-radius: 30px;
  padding: 1.8rem 1.7rem 1.85rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.panel-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.24rem;
}

.panel-header p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.converter-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1.7rem;
  margin-top: 1.6rem;
}

.converter-left,
.converter-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Dropzone */

.dropzone {
  position: relative;
  border-radius: 1.15rem;
  border: 1.5px dashed rgba(148, 163, 184, 0.8);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.98));
  padding: 1.35rem 1.1rem 1.15rem;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.dropzone.dragover {
  border-color: var(--accent-strong);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.28), rgba(15, 23, 42, 1));
  box-shadow: 0 18px 42px rgba(56, 189, 248, 0.45);
  transform: translateY(-1px);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  font-size: 1.7rem;
  margin-bottom: 0.4rem;
}

.dropzone h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
}

.dropzone p {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Options */

.converter-options {
  border-radius: 1.1rem;
  padding: 0.95rem 1.1rem 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: radial-gradient(circle at 100% 0, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.98));
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field-group label,
.field-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

select,
input[type="number"],
input[type="text"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.98);
  color: var(--text-main);
  padding: 0.45rem 0.8rem;
  font-size: 0.86rem;
  outline: none;
  width: 100%;
}

select:focus,
input:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.radio-group input {
  accent-color: var(--accent-strong);
}

.resize-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.resize-inputs label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.16rem;
}

.resize-inputs input {
  border-radius: 10px;
}

input[type="range"] {
  width: 100%;
}

.range-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
}

.range-meta .hint {
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Queue & Table */

.queue-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.queue-header h3 {
  margin: 0;
  font-size: 0.98rem;
}

.table-wrapper {
  position: relative;
  border-radius: 1.05rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.99);
  min-height: 140px;
  overflow: hidden;
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.results-table thead {
  background: linear-gradient(
    to right,
    rgba(15, 23, 42, 0.98),
    rgba(15, 23, 42, 0.94)
  );
}

.results-table th,
.results-table td {
  padding: 0.55rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.96);
}

.results-table th {
  font-weight: 500;
  color: var(--text-muted);
  border-bottom-color: rgba(148, 163, 184, 0.32);
  font-size: 0.78rem;
}

.results-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.96);
}

.results-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.92);
}

.thumb {
  width: 52px;
  height: 40px;
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3), rgba(15, 23, 42, 1));
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
}

.status-pending {
  background: rgba(148, 163, 184, 0.22);
  color: #e5e7eb;
}

.status-converting {
  background: rgba(56, 189, 248, 0.2);
  color: #e0f2fe;
}

.status-done {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.status-error {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.size-text {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.actions-cell .btn {
  padding: 0.33rem 0.8rem;
  font-size: 0.78rem;
}

.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.empty-state p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.bulk-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}

/* SEO / FAQ */

.seo-section,
.faq-section {
  margin-top: 2.15rem;
  padding: 1.5rem 1.6rem 1.7rem;
  border-radius: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: radial-gradient(circle at 100% 0, rgba(148, 163, 184, 0.22), rgba(15, 23, 42, 0.98));
}

.seo-section h2,
.faq-section h2 {
  margin: 0 0 0.8rem;
  font-size: 1.04rem;
}

.seo-body h2 {
  font-size: 0.98rem;
  margin: 1.1rem 0 0.4rem;
}

.seo-body p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #e5e7eb;
  margin: 0.35rem 0 0.6rem;
}

.seo-body ul {
  padding-left: 1.25rem;
  margin: 0.5rem 0 0.7rem;
}

.seo-body li {
  font-size: 0.9rem;
  color: #e5e7eb;
  margin-bottom: 0.2rem;
}

.faq-item + .faq-item {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.32);
}

.faq-item h3 {
  margin: 0;
  font-size: 0.95rem;
}

.faq-item p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1.25rem 0 1.4rem;
  margin-top: 1.7rem;
  background: radial-gradient(circle at 50% 0, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 1));
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-meta {
  font-size: 0.8rem;
}

/* Skeleton */

.skeleton {
  position: relative;
  overflow: hidden;
}

.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(15, 23, 42, 0.95),
    rgba(148, 163, 184, 0.35),
    rgba(15, 23, 42, 0.95)
  );
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
  opacity: 0.6;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Responsive */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card {
    order: -1;
  }

  .converter-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel {
    border-radius: 24px;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-inner {
    padding: 0.7rem 0;
  }

  .hero {
    padding: 1.9rem 0 1.7rem;
  }

  .panel {
    padding: 1.5rem 1.25rem 1.55rem;
  }

  .converter-options {
    padding: 0.9rem 0.9rem 1rem;
  }

  .results-table th:nth-child(2),
  .results-table td:nth-child(2) {
    max-width: 150px;
    word-break: break-all;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .resize-inputs {
    grid-template-columns: minmax(0, 1fr);
  }

  .actions {
    flex-direction: column;
  }

  .bulk-actions {
    justify-content: stretch;
  }

  .bulk-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
