:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #0b1220;
  --muted: #4a5a70;
  --line: #d7deea;
  --primary: #1f8d86;
  --danger: #b91c1c;
  --ok: #065f46;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
  background: #eef3fb;
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(1180px, 92%);
  margin: 0 auto;
}

header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  position: sticky;
  top: 0;
  z-index: 6;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #f4f8ff;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(85, 165, 255, 0.5));
}

.topbar nav a {
  margin-left: 14px;
  text-decoration: none;
  color: #d8e9ff;
  font-weight: 600;
  font-size: 0.88rem;
}

main { padding: 28px 0 44px; position: relative; z-index: 2; }

.card {
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(200, 219, 246, 0.7);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(10, 20, 45, 0.18);
}

.card.small { max-width: 440px; }

h1 { margin-top: 0; font-size: 1.5rem; }
h2 { margin-top: 24px; font-size: 1.15rem; }
p { color: var(--muted); }

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

.grid .full { grid-column: 1 / -1; }

label {
  display: grid;
  gap: 6px;
  color: #1e293b;
  font-size: 0.95rem;
}

input, textarea, button {
  font: inherit;
}

input, textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

button, .button {
  display: inline-block;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}

button:hover, .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(19, 110, 105, 0.3);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.alert.error {
  background: #fee2e2;
  color: var(--danger);
}

.alert.success {
  background: #dcfce7;
  color: var(--ok);
}

.hero {
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.clean-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.clean-form label {
  font-weight: 600;
}

.clean-form input {
  margin-top: 6px;
  height: 44px;
}

.clean-form button {
  height: 44px;
}

/* Home visual style */
body.home-page {
  background: #0e1f3d;
}

.site-header {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 7;
}

.site-header-inner {
  min-height: 38px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 34px;
  color: #f1f7ff;
  font-weight: 600;
  font-size: 1.08rem;
}

.header-ico {
  width: 18px;
  height: 18px;
  margin-right: 6px;
  fill: #00d2ff;
  vertical-align: -3px;
}

body.home-page header {
  display: none;
}

body.home-page::before {
  content: none;
}

body.home-page::after {
  content: none;
}

body.home-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -28deg,
      rgba(64, 134, 255, 0.12),
      rgba(64, 134, 255, 0.12) 1px,
      transparent 1px,
      transparent 70px
    );
  opacity: 0.6;
  pointer-events: none;
}

body.home-page .hero > * {
  position: relative;
  z-index: 1;
}

#particles-js {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-image: url("/static/background.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.08) contrast(1.03);
  z-index: 1;
  pointer-events: none;
}

.hero-shell {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: min(100%, 1180px);
}

.hero-shell::before {
  content: none;
}

.hero-shell .hero {
  z-index: 1;
}

.logo-chip {
  width: fit-content;
  margin: 18px auto 38px;
  padding: 16px 46px;
  border-radius: 60px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 10px 26px rgba(26, 30, 58, 0.3);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: -1px;
  position: relative;
  z-index: 3;
}

.logo-chip img {
  width: 52px;
  height: 52px;
}

body.home-page .card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22);
  border-radius: 30px;
  padding: 38px;
}

.hero-head {
  margin: -38px -38px 24px;
  padding: 30px 38px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(167, 190, 219, 0.45);
}

.hero-form {
  margin: 0 -38px -38px;
  padding: 26px 38px 34px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
}

body.home-page h1,
body.home-page h2,
body.home-page label {
  color: #ffffff;
}

body.home-page h1 {
  font-size: 2.8rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

body.home-page p {
  font-size: 1.24rem;
  color: rgba(234, 244, 255, 0.9);
  line-height: 1.55;
}

body.home-page .clean-form label {
  font-size: 1.1rem;
  font-weight: 700;
}

body.home-page .clean-form input {
  height: 56px;
  font-size: 1.15rem;
  border-radius: 14px;
  padding: 12px 16px;
}

body.home-page .clean-form button {
  height: 60px;
  font-size: 1.15rem;
  border-radius: 16px;
  font-weight: 800;
}

body.home-page input,
body.home-page textarea,
body.home-page select {
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

body.home-page input::placeholder {
  color: rgba(228, 238, 250, 0.5);
}

body.home-page button,
body.home-page .button,
body.home-page .copy-btn {
  background: linear-gradient(90deg, #00d2ff 0%, #3a7bd5 100%);
}

.site-footer {
  margin: 58px auto 0;
  width: min(1180px, 92%);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(15px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 26px 18px;
  position: relative;
  z-index: 5;
}

.footer-text {
  text-align: center;
  color: #fff;
  line-height: 1.8;
  font-size: 1rem;
}

.footer-text img {
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
}

.result-card .button {
  margin-top: 16px;
}

.result-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 10px;
}

.result-grid div {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(179, 201, 232, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  backdrop-filter: blur(2px);
}

.result-grid small {
  display: block;
  color: rgba(226, 239, 255, 0.85);
  font-weight: 600;
  margin-bottom: 4px;
}

.result-grid strong {
  font-size: 1.08rem;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.unlock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.copy-btn {
  border: 0;
  border-radius: 8px;
  background: #0f8f87;
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  min-width: 86px;
}

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

  .brand span {
    display: none;
  }

  .site-header-inner {
    flex-direction: column;
    gap: 3px;
    padding: 5px 0;
    font-size: 0.94rem;
  }

  .logo-chip {
    font-size: 1.55rem;
    padding: 12px 24px;
  }

  .hero-shell {
    width: min(96vw, 1040px);
  }

  body.home-page .card {
    padding: 22px;
    border-radius: 18px;
  }

  .hero-head {
    margin: -22px -22px 16px;
    padding: 20px 22px 14px;
  }

  .hero-form {
    margin: 0 -22px -22px;
    padding: 16px 22px 20px;
  }

  body.home-page h1 {
    font-size: 1.9rem;
  }

  body.home-page p {
    font-size: 1rem;
  }

  body.home-page .clean-form label {
    font-size: 1rem;
  }

  body.home-page .clean-form input {
    height: 48px;
    font-size: 1rem;
  }

  body.home-page .clean-form button {
    height: 50px;
    font-size: 1.05rem;
  }
}
