/*
  KnightByte Network SMP
  Unified site stylesheet
  Supports:
  - index.html
  - store.html
  - apply-2.html
  - report.html / reports.html
*/

:root {
  --bg: #08131c;
  --bg-2: #0d1a26;
  --surface: #101b29;
  --surface-soft: rgba(16, 27, 41, 0.88);
  --surface-2: #122132;
  --surface-3: #18293d;
  --text: #edf4ff;
  --muted: #aebfd0;
  --muted-2: #8ca1b6;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --accent: #1ea7ff;
  --accent-2: #68c6ff;
  --accent-3: #9fdcff;
  --danger: #ff6b6b;
  --success: #54ef92;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --radius: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(30, 167, 255, 0.14), transparent 26%),
    linear-gradient(180deg, #0c2431 0%, #09141d 30%, #081119 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 21% 6%, rgba(255, 255, 255, 0.14) 0 1.5px, transparent 3px),
    radial-gradient(circle at 48% 14%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 8%, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 3px),
    radial-gradient(circle at 88% 22%, rgba(255, 255, 255, 0.12) 0 2px, transparent 3px),
    radial-gradient(circle at 15% 64%, rgba(255, 255, 255, 0.1) 0 1.5px, transparent 3px),
    radial-gradient(circle at 65% 72%, rgba(255, 255, 255, 0.08) 0 1.5px, transparent 3px);
  opacity: 0.45;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  font-family: inherit;
}

.container {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* Header */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 19, 28, 0.84);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-mark {
  width: 42px;
  height: 42px;
  min-width: 42px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
  background: transparent;
}

.brand span {
  line-height: 1;
  white-space: nowrap;
}

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-toggle {
  width: 52px;
  height: 52px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  display: grid;
  gap: 0.35rem;
  padding: 0.7rem;
  border-radius: 18px;
  background: rgba(16, 27, 41, 0.98);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.menu-panel a {
  display: block;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease;
}

.menu-panel a:hover,
.menu-panel a.active {
  background: rgba(30, 167, 255, 0.06);
  color: var(--text);
}

.menu-panel .menu-apply {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #071119 !important;
  font-weight: 700;
}

/* Common text */

h1,
h2,
h3 {
  margin-top: 0;
  letter-spacing: 0.01em;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4.5vw, 4rem);
  line-height: 1;
}

h2 {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  margin-bottom: 0.8rem;
}

h3 {
  font-size: 1.12rem;
  margin-bottom: 0.65rem;
}

p {
  line-height: 1.7;
}

.lead,
.hero p,
.section-head p,
.notice,
.sidebar-note,
.product-card p,
.modal-card p,
.popup-card p,
.footer-note,
.small-note,
.hint,
.point div,
.side-box span,
.strip-card span,
.gallery-caption,
.rule-item,
.faq-item {
  color: var(--muted);
}

/* Buttons */

.button,
.button-primary,
.button-secondary,
.store-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.9rem 1.15rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.button:hover,
.button-primary:hover,
.button-secondary:hover,
.store-buy:hover {
  transform: translateY(-1px);
}

.button,
.button-primary,
.store-buy {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #071119;
}

.button.secondary,
.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--border);
}

/* Home page */

.hero {
  padding: 52px 0 24px;
}

.hero-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 360px);
  gap: 1.2rem;
  align-items: stretch;
}

.hero-copy,
.hero-side {
  background: rgba(16, 27, 41, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2rem;
}

.hero-side {
  padding: 1.5rem;
  display: grid;
  align-content: center;
  justify-items: center;
  background:
    linear-gradient(180deg, rgba(109, 180, 255, 0.06), transparent 50%),
    rgba(16, 27, 41, 0.9);
}

.hero-card {
  background: linear-gradient(180deg, rgba(15, 34, 46, 0.96), rgba(10, 20, 30, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-logo,
.hero-card img {
  width: min(180px, 100%);
  margin: 0 auto 1rem;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.28));
}

.logo-frame {
  width: 100%;
  max-width: 220px;
  margin: 0 auto 1.2rem;
  padding: 0.4rem;
  border-radius: 22px;
  background: transparent;
  border: 0;
}

.eyebrow,
.card-tag,
.popup-badge {
  display: inline-block;
  width: fit-content;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(30, 167, 255, 0.1);
  border: 1px solid rgba(30, 167, 255, 0.16);
  color: var(--accent-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 700px;
  font-size: 1.04rem;
  line-height: 1.75;
  margin: 0;
}

.hero-actions,
.cta-row {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  align-items: stretch;
}

.hero-actions .button,
.hero-actions .button-primary,
.hero-actions .button-secondary,
.cta-row .button,
.cta-row .button-primary,
.cta-row .button-secondary {
  width: 100%;
  min-width: 0;
  min-height: 56px;
}

.hero-meta {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.meta-pill {
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}

.side-note {
  width: 100%;
  display: grid;
  gap: 0.8rem;
}

.side-box {
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.side-box strong {
  display: block;
  margin-bottom: 0.25rem;
}

.strip {
  padding: 0 0 30px;
}

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

.strip-card {
  padding: 1rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.strip-card strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.section {
  padding: 18px 0 72px;
}

.section-head {
  margin-bottom: 1rem;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-head p {
  margin: 0;
  max-width: 760px;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card p {
  margin-bottom: 0;
}

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

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

.gallery-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.gallery-caption {
  padding: 1rem 1rem 1.1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.rule-list,
.faq-list,
.point-list {
  display: grid;
  gap: 0.8rem;
}

.rule-item,
.faq-item {
  padding: 1rem 1.05rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border);
  line-height: 1.65;
}

.discord-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 1rem;
  align-items: stretch;
}

.discord-info {
  display: grid;
  gap: 1rem;
}

.point {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.point i,
.list-item i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  background: rgba(109, 180, 255, 0.12);
  color: var(--accent-2);
  font-style: normal;
  font-weight: 700;
}

.discord-embed {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 500px;
  box-shadow: var(--shadow);
}

.iframe-wrap {
  position: relative;
  width: 100%;
  min-height: 500px;
}

.iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Form pages */

.shell {
  background: rgba(16, 27, 41, 0.84);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shell-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
}

.aside {
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(109, 180, 255, 0.08), transparent 45%),
    rgba(20, 34, 51, 0.95);
  border-right: 1px solid var(--border);
}

.form-wrap {
  padding: 30px;
  background: var(--surface);
}

.stack,
.list {
  display: grid;
  gap: 1rem;
}

.list-item {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

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

.field {
  display: grid;
  gap: 0.55rem;
}

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

label {
  font-size: 0.95rem;
  font-weight: 700;
}

input,
select,
textarea,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #0d1723;
  color: var(--text);
  font-family: inherit;
}

textarea,
.field textarea {
  min-height: 140px;
  resize: vertical;
}

.checkbox-row {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 3px;
  accent-color: var(--accent);
}

.submit-row {
  margin-top: 1rem;
}

.submit-row .button-primary,
.submit-row .button,
.form-wrap .button-primary {
  width: 100%;
}

.panel,
.form-panel,
.notice,
.sidebar,
.section-bar,
.product-card,
.modal-card,
.popup-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}

.panel,
.form-panel,
.notice,
.section-bar,
.product-card,
.modal-card,
.popup-card,
.sidebar-note {
  padding: 1rem 1.1rem;
}

/* Store */

.layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 1rem;
  padding-bottom: 72px;
}

.sidebar {
  padding: 0.9rem;
  height: fit-content;
  position: sticky;
  top: 96px;
}

.sidebar h2 {
  margin: 0 0 0.8rem;
  font-size: 1.05rem;
}

.side-links {
  display: grid;
  gap: 0.35rem;
}

.side-links a,
.side-links button {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--muted);
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 0;
  border-left: 3px solid transparent;
  background: rgba(255, 255, 255, 0.015);
  cursor: pointer;
}

.side-links a:hover,
.side-links a.active,
.side-links button:hover,
.side-links button.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: rgba(30, 167, 255, 0.06);
}

.sidebar-note {
  margin-top: 1rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  background: rgba(30, 167, 255, 0.07);
  border: 1px solid rgba(30, 167, 255, 0.12);
}

.section-bar {
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 700;
}

.section-bar strong {
  color: var(--accent-2);
}

.notice {
  margin-bottom: 1rem;
  line-height: 1.7;
}

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

.product-card {
  display: grid;
  gap: 0.9rem;
}

.product-card h3,
.panel h2,
.popup-card h3,
.modal-card h3 {
  margin: 0;
}

.product-card h3 {
  color: var(--accent-2);
  font-size: 1.18rem;
}

.product-card p {
  margin: 0;
  line-height: 1.65;
  min-height: 84px;
}

.card-tag {
  width: fit-content;
  border: 1px solid rgba(30, 167, 255, 0.15);
  color: var(--accent-3);
}

.rank-art {
  aspect-ratio: 1 / 1;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
}

.rank-art::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
}

.rank-art span {
  position: relative;
  z-index: 2;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  line-height: 0.95;
  font-weight: 900;
  text-transform: uppercase;
  color: white;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

.rank-scout { background: linear-gradient(135deg, #ff4343 0%, #cf1b1b 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-knight { background: linear-gradient(135deg, #4ba0ff 0%, #175ccc 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-elite { background: linear-gradient(135deg, #ffd53a 0%, #c89b00 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-mythic { background: linear-gradient(135deg, #d855ff 0%, #8824c8 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-overlord { background: linear-gradient(135deg, #53f0ff 0%, #1497aa 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-founder { background: linear-gradient(135deg, #54ef92 0%, #1a954d 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-plus { background: linear-gradient(135deg, #ff9653 0%, #d95914 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-crate { background: linear-gradient(135deg, #7d7dff 0%, #4238bb 42%, #f3f3f3 43%, #ffffff 100%); }
.rank-glow { background: linear-gradient(135deg, #f85cff 0%, #bb1999 42%, #f3f3f3 43%, #ffffff 100%); }

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}

.price {
  font-size: 1.65rem;
  color: rgba(255, 255, 255, 0.88);
}

.price small {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 0.25rem;
  text-transform: uppercase;
}

.store-buy {
  min-height: 42px;
  white-space: nowrap;
}

/* Modal / popup */

.modal,
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 12, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 200;
}

.modal.open,
.popup-overlay.open {
  display: flex;
}

.modal-card,
.popup-card {
  width: min(540px, 100%);
}

.modal-card h3 {
  margin-top: 0;
  margin-bottom: 0.65rem;
  font-size: 1.4rem;
}

.modal-card p,
.popup-card p {
  line-height: 1.7;
  margin-top: 0;
}

.modal-grid {
  display: grid;
  gap: 0.9rem;
}

.popup-actions,
.modal-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* Footer */

.footer {
  padding: 24px 0 46px;
  border-top: 1px solid var(--border);
  color: var(--muted-2);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-note,
.small-note {
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Responsive */

@media (max-width: 1080px) {
  .hero-shell,
  .discord-layout,
  .grid-2,
  .shell-grid {
    grid-template-columns: 1fr;
  }

  .hero-side {
    max-width: 30rem;
    margin: 0 auto;
    width: 100%;
  }

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

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

  .aside {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

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

  .gallery-card img {
    height: auto;
  }
}

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

  .sidebar {
    position: static;
  }

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

@media (max-width: 820px) {
  .grid-3,
  .strip-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 72px;
  }

  .brand span {
    white-space: normal;
    font-size: 0.84rem;
  }

  .hero-copy,
  .hero-card,
  .form-wrap,
  .aside {
    padding: 1.4rem;
  }
}

@media (max-width: 700px) {
  .products,
  .hero-actions,
  .cta-row {
    grid-template-columns: 1fr;
  }

  .product-card p {
    min-height: 0;
  }

  .product-meta,
  .popup-actions,
  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }
}