:root {
  --bg: #0d1014;
  --panel: #151922;
  --panel-soft: #1b2130;
  --text: #f7fafc;
  --muted: #a6b0bf;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #14b8a6;
  --accent-strong: #0f766e;
  --accent-2: #f97316;
  --danger: #f87171;
  --success: #34d399;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.32);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34rem),
    linear-gradient(135deg, #0d1014 0%, #121722 56%, #18130f 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 40px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 16, 20, 0.88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--text);
}

.main-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
  flex: 1;
  display: grid;
  gap: 40px;
}

.converter-panel {
  width: min(620px, 100%);
  margin: 0 auto;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(21, 25, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.title-block {
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  font-size: 36px;
  line-height: 1.08;
}

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.dropzone {
  width: 100%;
  min-height: 184px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 2px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  background: rgba(20, 184, 166, 0.08);
  border-color: var(--accent);
}

.dropzone.has-file {
  background: rgba(52, 211, 153, 0.08);
  border-color: var(--success);
}

.dropzone-icon {
  min-width: 54px;
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.dropzone strong {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-align: center;
}

.dropzone span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.file-input {
  display: none;
}

.actions-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.bank-select {
  position: relative;
}

.bank-trigger,
.convert-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.bank-trigger {
  width: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  text-align: left;
}

.bank-trigger span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.bank-trigger[aria-expanded="true"] .chevron {
  transform: translateY(3px) rotate(225deg);
}

.bank-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 10;
  padding: 8px;
  background: #171c26;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.055);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.search-field input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  text-transform: none;
}

.bank-options {
  max-height: 242px;
  margin-top: 8px;
  overflow-y: auto;
}

.bank-options button {
  width: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.bank-options button:hover,
.bank-options button.selected {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.bank-options small {
  color: var(--accent);
  font-size: 12px;
}

.empty-option {
  margin: 10px 8px;
  color: var(--muted);
  font-size: 14px;
}

.convert-button {
  min-width: 198px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #2563eb 58%, var(--accent-2) 100%);
  color: white;
  font-weight: 800;
}

.convert-button:hover:not(:disabled) {
  filter: brightness(1.08);
}

.convert-button:disabled {
  cursor: not-allowed;
  opacity: 0.66;
}

.button-loader {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: white;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.button-loader.is-visible {
  display: inline-block;
}

.status {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.status.error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.status.success {
  color: #bbf7d0;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.info-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.info-card {
  padding: 24px;
  background: rgba(21, 25, 34, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.icon-box {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: rgba(20, 184, 166, 0.09);
  border: 1px solid rgba(20, 184, 166, 0.18);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.info-card h2 {
  margin-bottom: 10px;
  font-size: 18px;
}

.info-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.site-footer {
  padding: 54px 40px 34px;
  border-top: 1px solid var(--line);
  background: rgba(7, 9, 12, 0.72);
}

.footer-content {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(140px, 1fr) minmax(140px, 1fr);
  gap: 44px;
}

.footer-content p {
  max-width: 380px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer-links h2 {
  margin-bottom: 8px;
  font-size: 15px;
}

.footer-bottom {
  width: min(1120px, 100%);
  margin: 42px auto 0;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 20px;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .main-shell {
    width: min(100% - 28px, 1120px);
    padding: 36px 0;
  }

  .converter-panel {
    padding: 24px;
  }

  h1 {
    font-size: 30px;
  }

  .actions-row,
  .info-section,
  .footer-content {
    grid-template-columns: 1fr;
  }

  .convert-button {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
