/* components.css — buttons, cards, forms, class altar, features, download, modal. */

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.btn--primary {
  color: #2a1e06;
  background: linear-gradient(180deg, #f0d081, #d8ad55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn--primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f6dc95, #e2b968);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 24px rgba(240, 200, 80, 0.35);
}
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  color: var(--gold-soft);
  border-color: var(--border-gold);
  background: rgba(8, 18, 46, 0.4);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 16px rgba(240, 200, 80, 0.25);
}

/* ===== glass card (server grid, feature cards) ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border-faint);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-normal), transform var(--duration-normal);
}
.card:hover {
  border-color: var(--border-gold);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45), 0 0 24px rgba(90, 160, 255, 0.12);
  transform: translateY(-3px);
}

.card__title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-light);
}

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
}
.status-pill--online { background: rgba(60, 160, 90, 0.18); color: #7ee8a2; }
.status-pill--maintenance { background: rgba(197, 143, 42, 0.18); color: #eec27a; }
.status-pill--offline { background: rgba(200, 60, 70, 0.18); color: #ff9aa2; }

/* ===== forms (login/register/account pages) ===== */
.form-page {
  width: min(430px, 92%);
  margin: 120px auto var(--section);
  background: linear-gradient(180deg, rgba(8, 18, 46, 0.87), rgba(14, 24, 58, 0.94));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--ring-gold);
  padding: 30px 28px;
}

.form-page h1 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 20px;
}

.form-row { margin-bottom: 14px; }

.form-row label {
  display: block;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  color: var(--text);
  font-size: 14px;
  font-family: var(--sans);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(240, 200, 80, 0.35);
}

.form-error {
  color: #ff9aa2;
  font-size: 13px;
  margin: 8px 0;
  min-height: 1em;
}

.form-page .btn { width: 100%; margin-top: 8px; }

.form-foot {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.form-foot a { color: var(--crystal); text-decoration: none; }
.form-foot a:hover { text-decoration: underline; }

/* ===== legal docs ===== */
.form-page.legal-doc {
  width: min(56rem, 92%);
  margin-top: 40px;
  text-align: left;
}
.form-page.legal-doc h1 { text-align: left; }
.form-page.legal-doc h2 {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--gold-soft);
  margin: 22px 0 8px;
}
.form-page.legal-doc p { color: var(--dim); font-size: 14.5px; margin-bottom: 10px; }
.legal-banner {
  background: rgba(197, 143, 42, 0.14);
  border: 1px solid rgba(197, 143, 42, 0.5);
  color: #eec27a;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}
.legal-meta { font-style: italic; }

/* ===== class altar ===== */
.altar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: center;
}

.altar__stage {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 480px;
}

.altar__glow {
  position: absolute;
  left: 50%; bottom: 28px;
  width: 300px; height: 90px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(90, 160, 255, 0.5), rgba(154, 124, 232, 0.25) 55%, transparent 72%);
  filter: blur(6px);
}
.altar__glow::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 26px;
  width: 200px; height: 34px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(240, 200, 80, 0.5);
  box-shadow: 0 0 24px rgba(240, 200, 80, 0.3);
}

.altar__img {
  position: relative;
  z-index: 2;
  width: min(100%, 380px);
  height: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
  transition: opacity var(--duration-normal) var(--ease-out);
}
.altar__img.is-switching { opacity: 0; }

.altar__info { max-width: 480px; }

.altar__name {
  font-family: var(--serif);
  font-size: var(--type-h3);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.altar__blurb {
  color: var(--dim);
  font-size: 15px;
  line-height: 1.65;
  min-height: 3.4em;
}

.altar__sex {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
}

.altar__sex button {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-faint);
  color: var(--muted);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast);
}
.altar__sex button.is-on {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 12px rgba(240, 200, 80, 0.25);
}
.altar__sex button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.altar__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.altar__tabs button {
  background: rgba(8, 18, 46, 0.6);
  border: 1px solid var(--border-crystal);
  color: var(--dim);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 14px;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: border-color var(--duration-fast), color var(--duration-fast), box-shadow var(--duration-fast);
}
.altar__tabs button:hover { border-color: var(--crystal); color: var(--text); }
.altar__tabs button.is-on {
  border-color: var(--gold);
  color: var(--gold-light);
  box-shadow: 0 0 14px rgba(240, 200, 80, 0.3);
}
.altar__tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ===== features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature {
  text-align: center;
  align-items: center;
}

.feature__icon {
  width: 96px;
  height: 96px;
  object-fit: contain;
  margin: 4px auto 2px;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.5));
}

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

/* ===== download panel ===== */
.download-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.2rem, 3vw, 3rem);
  background: linear-gradient(180deg, rgba(8, 18, 46, 0.87), rgba(14, 24, 58, 0.94));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--ring-gold);
  padding: clamp(1.6rem, 3vw, 3rem);
}

.download-panel__emblem {
  width: clamp(110px, 14vw, 170px);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55));
}

.download-panel__body { flex: 1; min-width: 260px; }

.download-panel__body h2 {
  font-family: var(--serif);
  font-size: var(--type-h3);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}

.download-panel__body > p { color: var(--dim); font-size: 15px; margin-bottom: 16px; }

.download-panel__note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 12px;
}
.download-panel__note a { color: var(--crystal); text-decoration: none; }
.download-panel__note a:hover { text-decoration: underline; }

/* ===== trailer modal ===== */
.trailer-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 7, 22, 0.88);
  padding: 4vmin;
}
.trailer-modal.is-open { display: flex; }

.trailer-modal__box {
  position: relative;
  width: min(960px, 100%);
}

.trailer-modal video {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card), var(--ring-gold);
  display: block;
}

.trailer-modal__close {
  position: absolute;
  top: -44px; right: 0;
  background: none;
  border: 1px solid var(--border-gold);
  color: var(--gold-soft);
  border-radius: var(--radius-pill);
  width: 36px; height: 36px;
  font-size: 17px;
  cursor: pointer;
}
.trailer-modal__close:hover { color: var(--gold-light); border-color: var(--gold); }

/* ===== responsive ===== */
@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .altar { grid-template-columns: 1fr; }
  .altar__stage { min-height: 0; }
  .altar__img { width: min(70vw, 320px); }
  .altar__info { max-width: none; text-align: center; }
  .altar__sex, .altar__tabs { justify-content: center; }
  .download-panel { flex-direction: column; text-align: center; }
}

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