/* ==========================================================================
   DESIGN SYSTEM: Industrial Modernity (Crimson-Burgundy Palette)
   ========================================================================== */

:root {
  /* Colors */
  --bg-color: #120a0c;
  --surface-0: #120a0c;
  --surface-1: #1a0f12;
  --surface-2: #26141a;
  --surface-bright: #3d2a2e;

  --primary-color: #ffffff;
  --on-primary: #1c1414;
  --accent-color: #ff4d5e; /* Brand crimson red */
  --accent-dim: #e8505f;
  --accent-glow: rgba(255, 77, 94, 0.15);

  --border-color: #341f24;
  --border-glow: rgba(255, 90, 106, 0.1);
  --text-primary: #ffffff;
  --text-secondary: #f0e2e4;
  --text-dim: #b39aa0;
  --grid-dot: #2b1a1e;

  /* Glassmorphism Defaults */
  --glass-bg: rgba(26, 15, 18, 0.6);
  --glass-border: rgba(255, 120, 132, 0.08);
  --glass-glow-bg: rgba(255, 90, 106, 0.03);
  --glass-blur: 14px;

  --font-family: 'Neometric Alt', sans-serif;
}

/* Base resets & typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-secondary);
  overflow-x: hidden;
}

.scroll-reveal {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  font-style: normal;
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.custom-cursor.is-active {
  opacity: 1;
}

.custom-cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.09) 0%,
    rgba(255, 77, 94, 0.05) 28%,
    rgba(255, 77, 94, 0.02) 48%,
    transparent 72%
  );
  will-change: transform;
}

.custom-cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: #ff5a6a;
  box-shadow:
    0 0 10px rgba(255, 90, 106, 0.85),
    0 0 22px rgba(255, 90, 106, 0.35);
  will-change: transform;
  transition: width 0.2s ease, height 0.2s ease, margin 0.2s ease, box-shadow 0.2s ease;
}

.custom-cursor.is-pointer .custom-cursor-dot {
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  box-shadow:
    0 0 14px rgba(255, 90, 106, 1),
    0 0 28px rgba(255, 90, 106, 0.45);
}

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor * {
    cursor: none !important;
  }
}

em,
i {
  font-style: normal;
}

/* ==========================================================================
   AMBIENT BACKGROUNDS
   ========================================================================== */

/* Global Mouse Glow (placed behind all elements) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    600px circle at var(--global-x, 50%) var(--global-y, 50%),
    rgba(255, 77, 94, 0.035) 0%,
    rgba(255, 77, 94, 0.01) 40%,
    transparent 80%
  );
  transition: background 0.1s ease;
}

/* Dot Matrix Grid Overlay */
.dot-matrix {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1.2px);
  background-size: 24px 24px;
  opacity: 0.85;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(13, 13, 13, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 64px;
}

.logo {
  font-family: var(--font-family);
  font-weight: 800;
  font-size: 24px;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
}

button.nav-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--text-primary);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link:hover::after {
  width: 100%;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  z-index: 2;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(13, 13, 13, 0.2) 0%, var(--bg-color) 80%),
              url('images/hero-bg.jpg') no-repeat center center / cover;
}

/* Overlay for the hero image to keep the text readable and void style */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0.4) 0%, var(--bg-color) 95%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

/* Active dev badge */
.status-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  padding: 8px 16px;
  border-radius: 9999px;
  margin-bottom: 32px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(255, 77, 94, 0.08);
}

.status-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-color);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-color);
  animation: pulse 2s infinite;
}

.status-badge-text {
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent-dim);
}

.hero-title {
  font-family: 'Neometric Alt Black', var(--font-family);
  font-size: 72px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-subtitle {
  font-family: var(--font-family);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 650px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ==========================================================================
   BUTTONS (with advanced Glassmorphism & Mouse Tracking)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-family);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: 16px; /* rounded-xl */
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

/* Primary Glass Button: Solid feel but with glass details */
.btn-primary {
  background: var(--text-primary);
  color: var(--on-primary);
  border: 1px solid var(--text-primary);
}

.btn-primary:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 24px rgba(255, 77, 94, 0.4);
  transform: translateY(-2px);
}

/* Secondary Glass Border Button */
.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.btn-secondary:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 77, 94, 0.1);
  transform: translateY(-2px);
}

/* CTA Glassmorphic Button (Enlarged with Pure Glass Effect) */
.btn-glass-cta {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  padding: 18px 40px; /* Increased padding */
  font-size: 19px; /* Increased font size */
  border-radius: 18px; /* Slightly larger radius */
}

.btn-glass-cta:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 25px rgba(255, 77, 94, 0.15);
  transform: translateY(-2px);
}

/* Card primary — solid white CTA */
.btn-card-play {
  background: #ffffff;
  color: #141414;
  border: 1px solid #ffffff;
  padding: 18px 24px;
  min-height: 52px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  font-style: normal;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.btn-card-play:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 25px rgba(255, 77, 94, 0.15);
  transform: translateY(-2px);
}

.flex-1 {
  flex: 1;
}

/* Card glass buttons — compact variant of hero CTA */
.btn-card-glass {
  gap: 8px;
  padding: 0 18px;
  min-height: 52px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 14px;
  min-width: 0;
}

.btn-card-glass-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  border-radius: 14px;
  flex-shrink: 0;
}

.btn-discord-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.btn-card-video:hover {
  border-color: rgba(210, 125, 120, 0.52);
  background: rgba(185, 85, 80, 0.1);
  color: #e8b4af;
  box-shadow: 0 0 22px rgba(200, 105, 100, 0.16);
  transform: translateY(-2px);
}

.btn-card-video.btn-glass-border:hover::before {
  background: radial-gradient(
    80px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(215, 130, 125, 0.22) 0%,
    transparent 100%
  );
}

.btn-card-video:hover svg {
  color: #e8b4af;
}

/* Icon button style (glass container) */
.btn-icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-dim);
  backdrop-filter: blur(var(--glass-blur));
  transition: all 0.25s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Glass Glow Overlay on Button (Mouse Tracking Spot) */
.btn-glass-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    80px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.25) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.btn-glass-glow:hover::before {
  opacity: 1;
}

/* For secondary / outline glass buttons */
.btn-glass-border::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    80px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 77, 94, 0.2) 0%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.btn-glass-border:hover::before {
  opacity: 1;
}

.w-full {
  width: 100%;
}

/* ==========================================================================
   PROJECTS SECTION & CARDS (with Border Mouse Glow)
   ========================================================================== */

.projects-section {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 96px 24px 96px;
  box-sizing: border-box;
}

.projects-section .section-container {
  width: 100%;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-family);
  font-size: 42px;
  font-weight: 600;
  font-style: normal;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
}

.project-card {
  position: relative;
  border-radius: 24px;
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.card-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 45%, #181818 100%);
  pointer-events: none;
  z-index: 1;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-tag {
  position: absolute;
  top: 16px;
  left: 16px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(15, 15, 15, 0.32);
  color: #ffffff;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 2;
}

.card-body {
  padding: 32px 32px 36px;
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-top: -8px;
  position: relative;
  z-index: 2;
}

.card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.card-description {
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 26px;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-box {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.stat-val {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-val--online {
  font-variant-numeric: tabular-nums;
  transition: opacity 0.25s ease;
}

.stat-max {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 500;
}

.card-actions-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: auto;
}

.card-sub-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.card-requirements {
  margin-top: 32px;
  padding: 20px 22px 22px;
  background: #0c0c0c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.requirements-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.requirements-heading {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  margin-bottom: 0;
  padding-bottom: 12px;
  line-height: 1.2;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.requirements-heading span {
  font-weight: 700;
  letter-spacing: 0.08em;
}

.requirements-heading--min {
  color: #ff5a6a;
}

.requirements-heading--rec {
  color: #f2f2f2;
}

.requirements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 14px;
}

.requirements-list li {
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.req-label {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 600;
  flex-shrink: 0;
}

.req-value {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.margin-right-xs {
  margin-right: 6px;
}

.margin-right-xxs {
  margin-right: 4px;
}

/* Rust Video Guide button style — base; overridden in community section */

/* ==========================================================================
   COMMUNITY & STATISTICS SECTION
   ========================================================================== */

.community-section {
  position: relative;
  z-index: 2;
  margin-top: 120px;
  padding: 72px 24px 96px;
}

.community-panel {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.community-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 368px;
  gap: 0;
  align-items: stretch;
  min-height: 432px;
}

.community-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px 56px 60px;
}

.community-title {
  font-family: var(--font-family);
  font-size: 46px;
  font-weight: 600;
  font-style: normal;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.community-description {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 50px;
  max-width: 460px;
}

.community-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  width: 100%;
  max-width: 640px;
}

.metric-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.metric-number {
  font-family: var(--font-family);
  font-size: 52px;
  font-weight: 700;
  color: #ff5a6a;
  line-height: 1;
  letter-spacing: -0.03em;
}

.metric-label {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.38);
  text-transform: uppercase;
  margin-top: 8px;
  margin-bottom: 22px;
}

.btn-metric-action {
  gap: 10px;
  width: auto;
  max-width: none;
  padding: 12px 22px !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px !important;
  color: #ff5a6a;
  border-color: rgba(255, 90, 106, 0.35);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
}

.btn-metric-action svg {
  width: 16px;
  height: 16px;
  color: #ff5a6a;
  opacity: 1;
  flex-shrink: 0;
}

.btn-metric-action:hover {
  border-color: rgba(255, 90, 106, 0.55);
  background: rgba(255, 90, 106, 0.08);
  color: #ff7d8a;
  box-shadow: none;
  transform: none;
}

.btn-metric-action:hover svg {
  color: #ff7d8a;
}

.community-right {
  display: flex;
  align-items: stretch;
  background: #1a1d23;
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}

.cta-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 48px 32px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  min-height: 100%;
  box-shadow: none;
}

.cta-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(255, 90, 106, 0.08);
  border: 1px solid rgba(255, 90, 106, 0.16);
  color: #ff8a95;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.cta-card-icon svg {
  width: 20px;
  height: 20px;
}

.cta-card-title {
  font-family: var(--font-family);
  font-size: 34px;
  font-weight: 600;
  font-style: normal;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.1;
}

.cta-card-subtitle {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.42);
  margin-bottom: 26px;
  max-width: 228px;
}

.cta-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 252px;
}

.community-panel-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
}

.status-dot {
  width: 7px;
  height: 7px;
  background-color: #ff4d5e;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 77, 94, 0.75);
  animation: pulse 3s infinite;
  flex-shrink: 0;
}

.status-text {
  font-family: var(--font-family);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(255, 77, 94, 0.62);
  text-transform: uppercase;
}

/* ==========================================================================
   SITE MODAL
   ========================================================================== */

.site-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.site-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.site-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.site-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: min(90vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: rgba(17, 17, 17, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 32px 28px 28px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-modal-dialog--download {
  max-width: 640px;
  max-height: 94vh;
  padding: 36px 34px 34px;
}

.site-modal-dialog--download #modalContent {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  margin-right: -6px;
  padding-right: 6px;
  padding-bottom: 2px;
}

.site-modal-dialog--download .site-modal-body-scroll {
  overflow: visible;
  flex: none;
  margin: 0;
  padding: 0;
}

.site-modal-dialog--download .site-modal-subtitle {
  margin-bottom: 18px;
}

.site-modal-body-scroll {
  overflow-y: auto;
  margin-right: -8px;
  padding-right: 8px;
  flex: 1;
  min-height: 0;
}

.site-modal.is-open .site-modal-dialog {
  transform: translateY(0) scale(1);
}

.site-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}

.site-modal-title {
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  padding-right: 40px;
  letter-spacing: -0.02em;
}

.site-modal-subtitle {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 22px;
}

.site-modal-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.site-modal-item-info {
  min-width: 0;
}

.site-modal-item-name {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.site-modal-item-tag {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 90, 106, 0.75);
}

.site-modal-item .btn {
  flex-shrink: 0;
  padding: 10px 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 10px;
  white-space: nowrap;
  font-family: var(--font-family);
  cursor: pointer;
}

.site-modal-item .btn-modal-action {
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.site-modal-item .btn-modal-action:hover {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 77, 94, 0.12);
  transform: translateY(-1px);
}

.site-modal-item .btn-modal-download {
  background: #ffffff;
  color: #141414;
  border: 1px solid #ffffff;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.site-modal-item .btn-modal-download:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 25px rgba(255, 77, 94, 0.15);
  transform: translateY(-2px);
}

.site-modal-download-group {
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.site-modal-download-group + .site-modal-download-group {
  margin-top: 16px;
}

.site-modal-download-project {
  padding: 4px 2px 2px;
}

.site-modal-download-project + .site-modal-download-group,
.site-modal-download-group + .site-modal-download-project {
  margin-top: 8px;
}

.site-modal-download-project .site-modal-item-name {
  font-family: var(--font-family);
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}

.site-modal-download-project .site-modal-item-tag {
  font-family: var(--font-family);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 90, 106, 0.75);
  margin-bottom: 10px;
}

.site-modal-download-heading {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.site-modal-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.site-modal-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 11px 12px;
  font-family: var(--font-family);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-align: center;
  color: #141414;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 10px;
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.site-modal-link-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent-color);
  color: var(--text-primary);
  box-shadow: 0 0 25px rgba(255, 77, 94, 0.15);
  transform: translateY(-2px);
}

.site-modal-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.58);
}

.site-modal-note strong {
  color: rgba(255, 200, 120, 0.95);
  font-weight: 600;
}

.site-modal-note a {
  color: #ff5a6a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-modal-note a:hover {
  color: #ff7d8a;
}

body.modal-open {
  overflow: hidden;
}

/* Ссылки-пустышки (# / пусто): показываем как неактивные */
.is-disabled-link {
  opacity: 0.4;
  cursor: not-allowed !important;
  pointer-events: none;
}

/* ==========================================================================
   SEO / FAQ SECTION
   ========================================================================== */

.seo-section {
  position: relative;
  z-index: 2;
  padding: 48px 24px 72px;
}

.seo-section-lead {
  max-width: 820px;
  margin: 0 auto 32px;
  text-align: center;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.5);
}

.seo-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.seo-faq-item {
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-faq-question {
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.35;
}

.seo-faq-answer {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.52);
}

.site-footer {
  position: relative;
  z-index: 2;
  padding: 28px 24px 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer-inner {
  text-align: center;
}

.site-footer-text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 8px;
}

.site-footer-meta {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 900px) {
  .seo-faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   INTERACTIVE TOAST & UTILS
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--surface-2);
  border: 1px solid var(--accent-color);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 15px;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 77, 94, 0.15);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Keyframe animations */
@keyframes pulse {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 56px;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .community-panel {
    border-radius: 22px;
  }

  .community-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .community-left {
    text-align: center;
    padding: 44px 36px 40px;
    align-items: center;
  }

  .community-description {
    margin: 0 auto 40px;
  }

  .community-stats-grid {
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    gap: 24px;
  }

  .metric-box {
    align-items: flex-start;
    text-align: left;
  }

  .community-right {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
  }

  .cta-card {
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 32px 36px;
  }

  .cta-card-actions {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 16px 20px;
  }
  
  .nav {
    gap: 16px;
  }
  
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 16px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
  
  .community-left {
    padding: 32px 24px 28px;
  }

  .community-title {
    font-size: 36px;
  }

  .community-description {
    margin-bottom: 32px;
  }

  .metric-number {
    font-size: 44px;
  }

  .metric-label {
    margin-bottom: 18px;
  }

  .community-stats-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-modal-link-grid {
    grid-template-columns: 1fr;
  }

  .site-modal-dialog--download {
    max-width: 100%;
    max-height: 96vh;
    padding: 28px 22px 24px;
  }
  
  .toast {
    left: 20px;
    right: 20px;
    bottom: 20px;
    text-align: center;
  }
}

/* ==========================================================================
   ADMIN PANEL
   ========================================================================== */

.admin-page {
  min-height: 100vh;
  padding: 96px 24px 48px;
  position: relative;
  z-index: 2;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.admin-card {
  background: rgba(20, 20, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.admin-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.admin-subtitle {
  color: var(--text-dim);
  margin-bottom: 24px;
}

.admin-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
}

.admin-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-family: var(--font-family);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.admin-stat-box {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-color);
  margin-bottom: 6px;
}

.admin-stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.admin-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 28px 0 14px;
}

.admin-table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.admin-table th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.02);
}

.admin-download-editor {
  display: grid;
  gap: 18px;
}

.admin-project-block {
  padding: 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-project-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.admin-group-block {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-link-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 10px;
  margin-bottom: 10px;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.admin-discord-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.admin-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .admin-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-link-row {
    grid-template-columns: 1fr;
  }
}
