:root {
  --bg-main: #060607;
  --bg-panel: rgba(16, 16, 18, 0.92);
  --bg-panel-alt: rgba(24, 24, 28, 0.94);
  --border: rgba(159, 28, 46, 0.4);
  --text-main: #ece9e9;
  --text-muted: #aba1a1;
  --rose: #9f1c2e;
  --rose-soft: #b53a4f;
  --danger: #e06464;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: Inter, Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% -5%, rgba(159, 28, 46, 0.17), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(150, 0, 0, 0.12), transparent 42%),
    linear-gradient(180deg, #040405 0%, #0a0a0c 35%, #070708 100%);
  position: relative;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      125deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 8px
    );
  pointer-events: none;
  opacity: 0.5;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2.5rem 1rem 1rem;
}

.brand-wrap h1 {
  font-family: Cinzel, serif;
  font-weight: 900;
  letter-spacing: 0.06rem;
  margin: 0.1rem 0;
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 20px rgba(159, 28, 46, 0.38);
}

.tagline {
  color: var(--rose-soft);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.18rem;
  margin: 0;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.4rem;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
}

.hero-panel,
.status-card,
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.hero-panel h2,
.panel h2 {
  margin-top: 0;
  font-family: Cinzel, serif;
  letter-spacing: 0.03rem;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.btn {
  display: inline-block;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  padding: 0.67rem 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #b12a40 0%, #8e1a2c 100%);
  border-color: #ba3b4f;
}

.btn-secondary {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.status-card h3 {
  margin-top: 0;
}

.status-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-card li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.status-card li:last-child {
  border-bottom: 0;
}

.panel {
  margin-top: 1rem;
}

.section-intro {
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.portal-form {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.portal-form label {
  font-size: 0.92rem;
}

.portal-form input {
  padding: 0.68rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--bg-panel-alt);
  color: var(--text-main);
}

.portal-form input:focus {
  outline: 2px solid rgba(181, 58, 79, 0.45);
  border-color: rgba(181, 58, 79, 0.9);
}

.form-note {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-message {
  margin-top: 0.8rem;
  min-height: 1.2rem;
}

.form-message.error {
  color: var(--danger);
}

.form-message.success {
  color: #79c96f;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.download-card {
  background: var(--bg-panel-alt);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
}

.realmlist {
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem;
}

.realmlist code {
  color: #ffd3da;
}

.rules-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.rules-list li {
  margin-bottom: 0.5rem;
}

.site-footer {
  max-width: 1080px;
  margin: 2rem auto 1rem;
  padding: 0 1rem;
  color: #8f8686;
  font-size: 0.9rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  margin: 0;
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border-radius: 6px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--rose-soft);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

}
