﻿*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --bg: #0b0b10;
  --panel: #16161f;
  --panel-border: #242434;
  --input: #0f0f17;
  --accent: #f59e0b;
  --accent-strong: #fbbf24;
  --text: #f2f2fa;
  --muted: #9797b6;
  --quiet: #5f6078;
  --good: #35d399;
  --good-bg: rgba(53, 211, 153, 0.12);
  --info: #8da2fb;
  --info-bg: rgba(141, 162, 251, 0.12);
  --danger: #fb7185;
  --danger-bg: rgba(251, 113, 133, 0.12);
}

html {
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% -10%, rgba(245, 158, 11, 0.08), transparent 60%),
    radial-gradient(ellipse 55% 35% at 80% 110%, rgba(20, 184, 166, 0.07), transparent 60%),
    var(--bg);
}

a {
  color: inherit;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.brand {
  text-decoration: none;
}

.brand h1,
.tool-title {
  margin: 0;
  font-family: "Syne", system-ui, sans-serif;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: 0;
}

.dot {
  color: var(--accent);
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav a,
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.nav a:hover,
.back-link:hover {
  border-color: rgba(245, 158, 11, 0.55);
  color: var(--text);
}

.hero,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-top: 2px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 14px 50px rgba(0, 0, 0, 0.35);
}

.hero {
  padding: clamp(24px, 5vw, 44px);
  margin-bottom: 18px;
}

.hero p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.65;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tool-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  text-decoration: none;
}

.tool-card:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}

.tool-card h2 {
  margin: 0 0 8px;
  font-family: "Syne", system-ui, sans-serif;
  font-size: 1.45rem;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  font-weight: 800;
}

.panel {
  max-width: 680px;
  padding: 28px;
  margin: 0 auto;
}

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

input[type="password"],
textarea {
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--text);
  background: var(--input);
  font: inherit;
  outline: none;
}

input[type="password"]:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 24px;
  border: 2px dashed var(--panel-border);
  border-radius: 8px;
  background: var(--input);
  text-align: center;
}

.drop:hover,
.drop.drag-over {
  border-color: var(--accent);
}

.drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  color: #101014;
  background: var(--accent);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button:disabled {
  opacity: 0.5;
  cursor: wait;
}

.actions {
  display: none;
  gap: 10px;
  margin-top: 12px;
}

.actions.visible {
  display: flex;
}

.secondary {
  flex: 1;
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(53, 211, 153, 0.35);
  color: var(--good);
  background: var(--good-bg);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 6px;
  line-height: 1.45;
}

.status.visible {
  display: block;
}

.status.info {
  color: var(--info);
  background: var(--info-bg);
}

.status.success {
  color: var(--good);
  background: var(--good-bg);
}

.status.error {
  color: var(--danger);
  background: var(--danger-bg);
}

.meta {
  color: var(--quiet);
  font-size: 0.78rem;
}

footer {
  margin-top: 24px;
  color: var(--quiet);
  text-align: center;
  font-size: 0.8rem;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 22px;
  }
}
