:root {
  color-scheme: dark;
  --bg: #06111f;
  --panel: #0b1d33;
  --panel-2: #102b47;
  --ink: #f7fbff;
  --muted: #a8bad0;
  --blue: #1fb6ff;
  --blue-dark: #0b65d8;
  --yellow: #ffd12f;
  --line: rgba(255, 255, 255, .12);
  --shadow: 0 24px 70px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 15% 5%, rgba(31, 182, 255, .18), transparent 28rem),
    linear-gradient(180deg, #06111f 0%, #07172a 42%, #06111f 100%);
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }

button, input, textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 3.5rem);
  background: rgba(6, 17, 31, .86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
}

.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: var(--yellow);
  font-weight: 700;
  text-transform: uppercase;
  font-size: .7rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.site-nav a, .admin-trigger {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .7rem .9rem;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.site-nav a:hover, .admin-trigger:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, .05);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .06);
}

.hero {
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(2rem, 5vw, 5rem) clamp(1rem, 5vw, 5rem);
}

.hero-content {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--yellow);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1rem;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: .9;
  letter-spacing: 0;
}

h2 {
  margin-bottom: .7rem;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.35;
}

.hero-copy, .section-heading p, .site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.hero-copy {
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 720px;
}

.hero-actions, .quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: .78rem 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  background: var(--yellow);
  color: #09111d;
  box-shadow: 0 14px 35px rgba(255, 209, 47, .18);
}

.btn.secondary {
  background: rgba(255, 255, 255, .06);
  color: var(--ink);
  border-color: var(--line);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.hero-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: linear-gradient(145deg, rgba(16, 43, 71, .84), rgba(9, 22, 39, .9));
  box-shadow: var(--shadow);
}

.hero-shield {
  width: min(100%, 360px);
  display: block;
  margin: 0 auto 1.4rem;
  filter: drop-shadow(0 24px 45px rgba(0, 0, 0, .45));
}

.stat {
  display: grid;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
}

.stat span {
  color: var(--yellow);
  font-size: 2.2rem;
  font-weight: 900;
}

.stat small, .pulse-list span {
  color: var(--muted);
}

.pulse-list {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .9rem;
  padding: 1rem;
  border: 1px solid rgba(31, 182, 255, .28);
  border-radius: 8px;
}

.section, .section-band {
  padding: clamp(3rem, 6vw, 5.5rem) clamp(1rem, 5vw, 5rem);
}

.yanapaq-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1rem, 5vw, 5rem);
  border-block: 1px solid rgba(255, 209, 47, .18);
  background: linear-gradient(90deg, rgba(255, 209, 47, .12), rgba(31, 182, 255, .1));
}

.yanapaq-copy {
  max-width: 860px;
}

.yanapaq-copy h2 {
  margin-bottom: .45rem;
  font-size: clamp(1.65rem, 3vw, 2.6rem);
}

.yanapaq-copy p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
}

.yanapaq-actions, .yanapaq-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .7rem;
}

.section-band {
  background: rgba(255, 255, 255, .035);
  border-block: 1px solid var(--line);
}

.section.alt {
  background: rgba(9, 24, 43, .74);
}

.section-heading {
  max-width: 850px;
  margin-bottom: 1.5rem;
}

.section-band .section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.carousel-controls {
  display: flex;
  gap: .5rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .07);
  cursor: pointer;
  font-size: 1.35rem;
}

.carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 390px);
  gap: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .35rem .2rem 1rem;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 2.5rem, #000 calc(100% - 2.5rem), transparent 100%);
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel .card {
  scroll-snap-align: start;
  animation: carouselCardIn .55s ease both;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.carousel .card:hover {
  border-color: rgba(31, 182, 255, .45);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .34);
  transform: translateY(-4px);
}

@keyframes carouselCardIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .carousel, .carousel .card {
    scroll-behavior: auto;
    animation: none;
    transition: none;
  }
}

.card, .method-item, .quiz-box, .report-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 43, 71, .92), rgba(8, 22, 39, .94));
  box-shadow: 0 14px 50px rgba(0, 0, 0, .2);
}

.card {
  min-height: 260px;
  padding: 1.2rem;
}

.card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, .05);
  cursor: zoom-in;
}

.card-tag {
  display: inline-flex;
  margin-bottom: .85rem;
  border-radius: 999px;
  padding: .34rem .65rem;
  background: rgba(255, 209, 47, .14);
  color: var(--yellow);
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card p, .method-item p {
  color: var(--muted);
  line-height: 1.65;
}

.tip-list {
  padding-left: 1.1rem;
  color: var(--ink);
  line-height: 1.65;
}

.tip-list li::marker {
  color: var(--yellow);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.method-list {
  display: grid;
  gap: .85rem;
}

.method-item {
  width: 100%;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.2rem;
  padding: 1rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.method-item strong {
  color: var(--yellow);
}

.method-item:hover {
  border-color: rgba(31, 182, 255, .5);
  transform: translateY(-1px);
}

.method-item span {
  color: var(--muted);
  font-weight: 800;
  justify-self: end;
}

.official-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(255, 209, 47, .42);
  border-radius: 8px;
  padding: .72rem .9rem;
  color: #09111d;
  background: var(--yellow);
  font-weight: 900;
}

.report-section {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(300px, 1fr);
  gap: 2rem;
  align-items: start;
}

.report-form, .quiz-box {
  padding: 1.2rem;
}

label {
  display: grid;
  gap: .45rem;
  margin-bottom: .9rem;
  color: var(--muted);
  font-weight: 700;
}

input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem;
  color: var(--ink);
  background: rgba(2, 9, 18, .72);
  outline: none;
}

input[type="checkbox"] {
  width: auto;
}

input[type="file"] {
  padding: .65rem;
}

input:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 182, 255, .18);
}

.form-status {
  min-height: 1.3rem;
  margin: .8rem 0 0;
  color: var(--yellow);
}

.quiz-section {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(300px, 1fr);
  gap: 2rem;
  align-items: start;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--yellow);
}

.answers {
  display: grid;
  gap: .7rem;
  margin: 1rem 0;
}

.answer-btn {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .8rem;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}

.answer-btn.correct {
  border-color: #49dd8f;
  background: rgba(73, 221, 143, .15);
}

.answer-btn.wrong {
  border-color: #ff7070;
  background: rgba(255, 112, 112, .15);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  background: #050d18;
}

.admin-modal, .detail-modal, .yanapaq-modal, .privacy-modal {
  width: min(960px, calc(100vw - 2rem));
  max-height: min(850px, calc(100vh - 2rem));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--ink);
  background: #071426;
  box-shadow: var(--shadow);
}

.admin-modal::backdrop, .detail-modal::backdrop, .yanapaq-modal::backdrop, .privacy-modal::backdrop {
  background: rgba(0, 0, 0, .72);
}

.yanapaq-modal-body {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.privacy-content {
  max-height: 62vh;
  overflow: auto;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  line-height: 1.72;
}

.privacy-content h1,
.privacy-content h2,
.privacy-content h3 {
  color: var(--ink);
}

.privacy-content h1 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.privacy-content h2 {
  margin-top: 1.35rem;
  font-size: 1.25rem;
}

.privacy-content a {
  color: var(--yellow);
  text-decoration: underline;
}

.detail-body {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.detail-copy {
  color: var(--muted);
  line-height: 1.75;
  white-space: pre-line;
}

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

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, .04);
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
}

.image-grid img, .admin-thumb {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, .05);
  cursor: zoom-in;
}

.image-grid img {
  height: auto;
  max-height: 380px;
}

.admin-thumb {
  max-width: 110px;
  aspect-ratio: 4 / 3;
}

.image-viewer {
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  color: var(--ink);
  background: #050d18;
  box-shadow: var(--shadow);
}

.image-viewer::backdrop {
  background: rgba(0, 0, 0, .82);
}

.image-viewer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: .8rem;
}

.image-viewer img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 8rem);
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.login-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1rem 0;
}

.admin-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
}

.tab {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem .8rem;
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}

.tab.active {
  color: #071426;
  background: var(--yellow);
  border-color: var(--yellow);
  font-weight: 900;
}

.admin-content {
  display: grid;
  gap: 1rem;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.admin-form label:nth-child(3),
.admin-form label:nth-child(4),
.admin-form label:nth-child(5),
.admin-form .full {
  grid-column: 1 / -1;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.admin-list {
  display: grid;
  gap: .7rem;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
}

.row-actions {
  display: flex;
  gap: .45rem;
}

.danger {
  color: #ffb7b7;
}

@media (max-width: 920px) {
  .hero, .report-section, .quiz-section, .yanapaq-band {
    grid-template-columns: 1fr;
  }

  .yanapaq-actions {
    justify-content: flex-start;
  }

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

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #071426;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a, .admin-trigger {
    text-align: left;
  }

  .section-band .section-heading, .site-footer {
    display: block;
  }

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

  .method-item {
    grid-template-columns: 1fr;
  }

  .method-item span {
    justify-self: start;
  }

  .detail-grid, .image-grid {
    grid-template-columns: 1fr;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }
}
