:root {
  --bg-top: #0d1b2a;
  --bg-bottom: #132238;
  --panel: rgba(9, 22, 37, 0.78);
  --panel-strong: rgba(10, 25, 39, 0.95);
  --border: rgba(147, 197, 253, 0.18);
  --text-main: #f7fbff;
  --text-muted: #9cb4cd;
  --accent: #ff8c42;
  --accent-strong: #ffb703;
  --success: #30c48d;
  --danger: #ff6b6b;
  --shadow: 0 24px 60px rgba(3, 10, 18, 0.35);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 14px;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 183, 3, 0.22), transparent 22%),
    radial-gradient(circle at 85% 20%, rgba(0, 180, 216, 0.2), transparent 22%),
    linear-gradient(160deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
}

button,
input {
  font: inherit;
}

.page {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.page-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 16px;
  border: 1px solid rgba(147, 197, 253, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(20, 39, 60, 0.92) 0%, rgba(9, 22, 37, 0.86) 100%);
  box-shadow:
    0 18px 44px rgba(3, 10, 18, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.lang-switch__label {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.lang-switch__group {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(147, 197, 253, 0.1);
  border-radius: 18px;
  background: rgba(3, 12, 22, 0.44);
}

.lang-switch__button {
  min-width: 72px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: rgba(219, 234, 254, 0.72);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    color 180ms ease,
    background 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.lang-switch__button:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.lang-switch__button.is-active {
  border-color: rgba(255, 183, 3, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 183, 3, 0.16) 0%, rgba(255, 140, 66, 0.1) 100%),
    rgba(15, 31, 47, 0.96);
  color: #ffe6bf;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px rgba(4, 10, 18, 0.22);
}

.lang-switch__button:focus-visible {
  outline: 2px solid rgba(255, 183, 3, 0.35);
  outline-offset: 2px;
}

.hero {
  margin-bottom: 24px;
}

.hero__copy,
.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(20, 39, 60, 0.92) 0%, var(--panel) 100%);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero__copy {
  padding: 34px 32px 32px;
}

.hero__copy::after,
.card::after {
  content: '';
  position: absolute;
  inset: auto -10% -60% auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 140, 66, 0.22), transparent 70%);
  pointer-events: none;
}

.eyebrow,
.card__eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.hero h1,
.card h2 {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.04;
}

.hero__text {
  max-width: 36rem;
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-size: 0.86rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  padding: 28px;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 24px;
}

.form-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
}

.field span {
  color: var(--text-main);
  font-weight: 600;
}

.field input[type='text'],
.file-picker {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(156, 180, 205, 0.25);
  border-radius: var(--radius-md);
  background: rgba(5, 16, 27, 0.72);
  color: var(--text-main);
}

.field input[type='text']:focus,
.file-picker:focus-visible {
  outline: 2px solid rgba(255, 183, 3, 0.45);
  outline-offset: 1px;
}

.file-input-native {
  display: none;
}

.file-picker {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  text-align: left;
  cursor: pointer;
  background: transparent !important;
  background-image: none !important;
  color: var(--text-main);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.file-picker:hover {
  border-color: rgba(255, 183, 3, 0.28);
  background: rgba(255, 255, 255, 0.03) !important;
}

.file-picker.has-files {
  border-color: rgba(255, 183, 3, 0.24);
  background: rgba(255, 183, 3, 0.04) !important;
}

.file-picker__action {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffd27a 0%, #ffb703 100%);
  color: #122033;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(255, 183, 3, 0.24);
}

.file-picker__text {
  min-width: 0;
  color: #f7fbff;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-panel {
  padding: 18px;
  border: 1px solid rgba(156, 180, 205, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(3, 12, 22, 0.44);
}

.file-panel__summary {
  margin-bottom: 12px;
  color: var(--text-main);
  font-weight: 600;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list__empty {
  color: var(--text-muted);
}

.file-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.file-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item__meta {
  color: var(--text-muted);
}

.primary-button {
  min-height: 52px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #1b1b1b;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  box-shadow: 0 16px 28px rgba(255, 140, 66, 0.24);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(255, 183, 3, 0.28);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.feedback {
  margin: 0 0 16px;
  line-height: 1.6;
  color: #dbeafe;
}

.feedback--error {
  color: #fecaca;
}

.result-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.result-list--empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(156, 180, 205, 0.2);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

.result-item {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.result-item--success {
  border-color: rgba(48, 196, 141, 0.3);
}

.result-item--error {
  border-color: rgba(255, 107, 107, 0.28);
}

.result-item__header,
.result-item__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.result-item__header {
  margin-bottom: 10px;
}

.result-item__header strong {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-item p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
}

.result-item__meta {
  margin-top: 10px;
  flex-direction: column;
  color: #dbeafe;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .page {
    width: min(100vw - 24px, 1160px);
    padding-top: 20px;
  }

  .card,
  .hero__copy {
    padding: 22px;
  }

  .lang-switch {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 560px) {
  .card__header,
  .result-item__header {
    flex-direction: column;
  }

  .page-toolbar {
    margin-bottom: 12px;
  }

  .lang-switch {
    gap: 10px;
    padding: 10px 12px;
  }

  .lang-switch__label {
    letter-spacing: 0.16em;
  }

  .lang-switch__button {
    min-width: 64px;
    padding-inline: 14px;
  }

  .file-picker {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}
