* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  color-scheme: dark;
  --bg: #05070d;
  --surface: #0d111c;
  --surface-soft: #111827;
  --text: #f8fafc;
  --muted: #9aa4b2;
  --accent: #38bdf8;
  --accent-2: #8b5cf6;
  --ring: #38bdf8;
  --line: rgba(255, 255, 255, 0.11);
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.46);
}

body {
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 4%, rgba(56, 189, 248, 0.18), transparent 30rem),
    radial-gradient(circle at 88% 12%, rgba(139, 92, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, #090d16 0%, var(--bg) 100%);
}

.translate-widget {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  min-height: 48px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(56, 189, 248, 0.38);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 12, 22, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.translate-widget label {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.translate-widget select {
  height: 34px;
  min-width: 156px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.translate-widget select:focus {
  outline: 3px solid rgba(56, 189, 248, 0.24);
  outline-offset: 2px;
}

#google_translate_element,
body > .skiptranslate,
.goog-te-banner-frame,
#goog-gt-tt {
  display: none !important;
}

body {
  top: 0 !important;
}

.page-shell {
  width: min(1160px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.logo-link {
  display: inline-flex;
  border-radius: 8px;
}

.logo-link:focus-visible,
.tool-card:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 4px;
}

.logo {
  width: min(360px, 86vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 26px rgba(56, 189, 248, 0.14));
}

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

h1 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  font-weight: 900;
}

.tagline {
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: center;
  gap: 18px;
  width: 100%;
}

.cards-wide {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.9), rgba(7, 10, 18, 0.96));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.media-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 12px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 34%, rgba(56, 189, 248, 0.16), transparent 40%),
    linear-gradient(180deg, #0b0f19 0%, #05070d 100%);
}

.media-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 14px;
}

.card-copy {
  width: 100%;
  min-height: 82px;
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.9);
}

.card-copy strong {
  font-size: 21px;
  line-height: 1.2;
}

.card-copy small {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.home-feature {
  width: min(780px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.1fr);
}

.home-feature-media {
  aspect-ratio: auto;
  min-height: 310px;
}

.home-feature-copy {
  min-height: 100%;
  padding: 34px;
  justify-content: center;
  gap: 12px;
  border-top: 0;
  border-left: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 10%, rgba(139, 92, 246, 0.12), transparent 14rem),
    rgba(7, 10, 18, 0.94);
}

.home-feature-copy .feature-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.home-feature-copy strong {
  font-size: 34px;
}

.feature-description {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.telegram-highlight {
  width: fit-content;
  padding: 7px 11px 7px 7px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.08);
  color: #bae6fd;
  font-size: 13px;
  font-weight: 800;
}

.telegram-highlight img {
  width: 26px;
  height: 26px;
  display: block;
}

.feature-action {
  width: fit-content;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 15px 30px rgba(56, 189, 248, 0.16);
}

.tool-card:hover,
.tool-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  background: linear-gradient(180deg, rgba(20, 30, 50, 0.96), rgba(8, 12, 22, 0.98));
  box-shadow: var(--shadow);
}

.detail-shell {
  width: min(760px, calc(100% - 32px));
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-actions {
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.button {
  min-height: 44px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.button-secondary {
  background: var(--surface-soft);
  color: var(--text);
  border: 1px solid var(--line);
}

.local-message {
  padding: 28px;
}

.local-message h2 {
  margin-bottom: 8px;
  font-size: 24px;
}

.local-message p {
  color: var(--muted);
  line-height: 1.5;
}

.local-message .detail-actions {
  margin: 24px -28px -28px;
}

@media (max-width: 768px) {
  .translate-widget {
    top: 10px;
    right: 10px;
    left: 10px;
    justify-content: space-between;
    border-radius: 12px;
  }

  .translate-widget select {
    min-width: 0;
    width: min(58vw, 210px);
  }

  .page-shell {
    justify-content: flex-start;
    padding: 78px 0 24px;
    gap: 20px;
  }

  .logo {
    width: min(240px, 76vw);
  }

  h1 {
    max-width: 340px;
    font-size: 32px;
    line-height: 1.06;
  }

  .tagline {
    font-size: 15px;
  }

  .cards,
  .cards-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  .tool-card {
    border-radius: 14px;
  }

  .home-feature {
    display: flex;
  }

  .home-feature-media {
    min-height: auto;
    aspect-ratio: 1.35 / 1;
  }

  .home-feature-copy {
    min-height: 0;
    padding: 22px 18px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .home-feature-copy strong {
    font-size: 26px;
  }

  .media-frame {
    padding: 8px;
  }

  .card-copy {
    min-height: 74px;
    padding: 15px 16px 17px;
  }

  .card-copy strong {
    font-size: 19px;
  }
}

@media (max-width: 430px) {
  .translate-widget {
    min-height: 44px;
    padding: 6px 8px 6px 11px;
    gap: 7px;
  }

  .translate-widget label,
  .translate-widget select {
    font-size: 12px;
  }

  .translate-widget select {
    width: 56vw;
    height: 32px;
  }

  .page-shell {
    width: min(100% - 20px, 390px);
    padding-top: 68px;
    gap: 17px;
  }

  .logo {
    width: min(220px, 74vw);
  }

  .eyebrow {
    margin-top: 2px;
    font-size: 11px;
  }

  h1 {
    max-width: 320px;
    font-size: 29px;
  }

  .tagline {
    max-width: 330px;
    font-size: 14px;
  }

  .tool-card {
    border-radius: 13px;
  }

  .home-feature-copy {
    padding: 17px 15px 18px;
    gap: 9px;
  }

  .home-feature-copy strong {
    font-size: 23px;
  }

  .feature-description {
    font-size: 14px;
  }

  .telegram-highlight {
    padding: 5px 9px 5px 5px;
    font-size: 11px;
  }

  .telegram-highlight img {
    width: 23px;
    height: 23px;
  }

  .feature-action {
    min-height: 40px;
    padding: 0 14px;
    font-size: 13px;
  }

  .cards-wide {
    gap: 13px;
  }

  .cards-wide .tool-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    align-items: stretch;
  }

  .cards-wide .media-frame {
    aspect-ratio: 1 / 1;
  }

  .cards-wide .card-copy {
    min-height: 0;
    justify-content: center;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}
