.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0 30px;
  cursor: pointer;
  font-weight: 900;
  text-align: center;
}

.primary-button {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #160b04;
  box-shadow: 0 0 34px rgba(255, 116, 24, 0.28);
}

.secondary-button {
  border: 1px solid rgba(241, 163, 41, 0.6);
  background: rgba(14, 14, 17, 0.72);
  color: var(--text);
}

.ghost-button {
  border: 1px solid transparent;
  background: transparent;
  color: var(--gold-soft);
}

.danger-button {
  border: 1px solid rgba(209, 73, 73, 0.62);
  background: rgba(82, 18, 18, 0.72);
  color: #ffd1d1;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.danger-button:hover,
.mini-button:hover {
  filter: brightness(1.08);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled,
.mini-button:disabled,
.is-disabled {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}

.form-card {
  display: grid;
  gap: 18px;
  padding: 30px;
  background: rgba(16, 17, 22, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel {
  background: rgba(16, 17, 22, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.panel-soft {
  background: rgba(34, 36, 43, 0.86);
  border: 1px solid var(--line);
}

.page-hero {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  align-items: end;
  padding: 120px max(36px, calc((100vw - var(--max)) / 2)) 66px;
  background:
    linear-gradient(90deg, rgba(7, 8, 10, 0.94), rgba(7, 8, 10, 0.62)),
    linear-gradient(0deg, var(--bg), rgba(13, 13, 16, 0) 46%),
    var(--page-hero-bg, url("/assets/images/backgrounds/bg-news.jpg") center / cover no-repeat);
}

.theme-news {
  --page-hero-bg: url("/assets/images/backgrounds/bg-news.jpg") center / cover no-repeat;
}

.theme-guide {
  --page-hero-bg: url("/assets/images/backgrounds/bg-home-poster.jpg") center / cover no-repeat;
}

.theme-classes {
  --page-hero-bg: url("/assets/images/backgrounds/bg-classes.jpg") center / cover no-repeat;
}

.theme-download {
  --page-hero-bg: url("/assets/images/backgrounds/bg-download.jpg") center / cover no-repeat;
}

.theme-account {
  --page-hero-bg: url("/assets/images/backgrounds/bg-account.jpg") center / cover no-repeat;
}

.theme-support {
  --page-hero-bg: url("/assets/images/backgrounds/bg-support.jpg") center / cover no-repeat;
}

.theme-recharge {
  --page-hero-bg: url("/assets/images/backgrounds/bg-recharge.jpg") center / cover no-repeat;
}

.theme-admin {
  --page-hero-bg: linear-gradient(135deg, #101116, #18191f);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 161, 42, 0.55), transparent);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
}

.page-hero h1 {
  margin-bottom: 16px;
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 1.02;
}

.page-hero p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
  color: #ded8cc;
  font-size: 17px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--gold-soft);
}

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

.tabs button,
.tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(16, 17, 22, 0.78);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 0 18px;
  font-weight: 800;
}

.tabs .active,
.tabs [aria-selected="true"] {
  border-color: transparent;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  color: #160b04;
}

.tag {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(240, 161, 42, 0.35);
  background: rgba(240, 161, 42, 0.12);
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  width: fit-content;
  color: var(--gold-soft);
  font-weight: 900;
}

.text-link:hover {
  color: var(--gold);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.meta-grid div,
.info-list div {
  padding: 16px;
  background: rgba(7, 8, 10, 0.56);
  border: 1px solid var(--line);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.meta-grid dt,
.info-list dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.meta-grid dd,
.info-list dd {
  margin: 0;
  font-weight: 900;
}

.stat-bars {
  display: grid;
  gap: 13px;
}

.stat-bar {
  display: grid;
  grid-template-columns: 88px 1fr 42px;
  gap: 12px;
  align-items: center;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.stat-bar i {
  display: block;
  height: 9px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
}

.stat-bar i::before {
  content: "";
  display: block;
  width: calc(var(--value, 60) * 1%);
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--orange));
}

.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}

.side-nav {
  position: sticky;
  top: 96px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.side-nav button,
.side-nav a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  background: rgba(16, 17, 22, 0.82);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 0 16px;
  font-weight: 800;
}

.side-nav .active,
.side-nav [aria-current="page"] {
  border-color: rgba(240, 161, 42, 0.5);
  color: var(--gold-soft);
}

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

.guide-card .meta-grid,
.media-card .meta-grid,
.feature-card .meta-grid,
.download-card .meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card,
.guide-card,
.feature-card,
.faq-card,
.download-card {
  overflow: hidden;
  background: rgba(16, 17, 22, 0.9);
  border: 1px solid var(--line);
}

.media-card .media,
.guide-card .media,
.feature-card .media,
.download-card .media {
  min-height: 170px;
  background: #15161b center / cover no-repeat;
}

.media-card .copy,
.guide-card .copy,
.feature-card .copy,
.download-card .copy,
.faq-card {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.media-card h3,
.guide-card h3,
.feature-card h3,
.download-card h3,
.faq-card h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.media-card p,
.guide-card p,
.feature-card p,
.download-card p,
.faq-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  background: rgba(16, 17, 22, 0.9);
  border: 1px solid var(--line);
}

.data-table th,
.data-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--gold-soft);
  font-size: 13px;
}

.data-table td {
  color: var(--muted-strong);
  line-height: 1.6;
}

.empty-state {
  padding: 30px;
  border: 1px dashed rgba(240, 161, 42, 0.34);
  color: var(--muted);
  text-align: center;
}

.form-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.form-head p {
  margin-bottom: 0;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.form-head h3 {
  margin-bottom: 0;
  font-size: 30px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 14px;
  font-weight: 900;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(7, 8, 10, 0.78);
  color: var(--text);
  outline: 0;
}

.field input,
.field select {
  min-height: 48px;
  padding: 0 14px;
}

.field textarea {
  min-height: 132px;
  resize: vertical;
  padding: 13px 14px;
  line-height: 1.6;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240, 161, 42, 0.16);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(245, 242, 235, 0.42);
}

.field-hint {
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.field-hint.is-ok {
  color: var(--green);
}

.field-hint.is-error {
  color: var(--danger);
}

.form-grid,
.form-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.check-row input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.form-status {
  display: none;
  min-height: 44px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(7, 8, 10, 0.64);
  color: var(--muted);
  line-height: 1.5;
}

.form-status.is-visible {
  display: flex;
}

.form-status.is-success {
  border-color: rgba(115, 223, 131, 0.45);
  color: #b8f5c1;
}

.form-status.is-error {
  border-color: rgba(255, 155, 138, 0.52);
  color: #ffb8aa;
}

.form-status.is-loading {
  border-color: rgba(240, 161, 42, 0.5);
  color: var(--gold-soft);
}

.mini-button {
  min-height: 48px;
  border: 1px solid rgba(241, 163, 41, 0.72);
  background: rgba(240, 161, 42, 0.12);
  color: var(--gold-soft);
  cursor: pointer;
  font-weight: 900;
}

.notice-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.notice-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--dark-line);
}

.notice-list span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  background: var(--red-soft);
  color: #fff;
  font-size: 12px;
}

.notice-list a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-list time {
  color: #777a82;
}

@media (max-width: 680px) {
  .form-card {
    padding: 22px;
  }

  .form-head,
  .form-grid,
  .form-actions {
    grid-template-columns: 1fr;
  }

  .form-head {
    display: grid;
    align-items: start;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .notice-list li {
    grid-template-columns: 54px 1fr;
  }

  .notice-list time {
    grid-column: 2;
  }
}

@media (max-width: 960px) {
  .content-grid,
  .card-grid,
  .meta-grid,
  .info-list {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .side-nav button,
  .side-nav a {
    min-width: max-content;
  }
}

@media (max-width: 680px) {
  .page-hero {
    min-height: 300px;
    padding: 92px 18px 46px;
  }

  .page-hero h1 {
    font-size: 40px;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .tabs button,
  .tabs a {
    min-width: max-content;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }
}
