/* ============================
   P.R.I.S.M. — main.css
   ============================ */

/* --- Переменные --- */
:root {
  --bg:         #0a0a0f;
  --bg-card:    #111118;
  --bg-card2:   #16161f;
  --accent:     #7c3aed;
  --accent2:    #a855f7;
  --accent-dim: #7c3aed33;
  --cyan:       #22d3ee;
  --cyan-dim:   #22d3ee22;
  --text:       #e4e4f0;
  --text-muted: #7070a0;
  --text-dim:   #404060;
  --border:     #252535;
  --border-acc: #7c3aed55;
  --radius:     10px;
  --radius-lg:  18px;
  --font-head:  'Syne', sans-serif;
  --font-mono:  'Space Mono', monospace;
  --transition: 0.25s ease;
}

/* --- Сброс --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  cursor: none;
}

/* --- Кастомный курсор --- */
.cursor-outer {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease, opacity 0.3s ease;
}

.cursor-inner {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  top: 0; left: 0;
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.04s ease;
}

.cursor-outer svg {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body:has(a:hover) .cursor-outer svg,
body:has(button:hover) .cursor-outer svg {
  transform: scale(1.4);
  opacity: 0.8;
}

body:has(a:hover) .cursor-inner,
body:has(button:hover) .cursor-inner {
  transform: translate(-50%, -50%) scale(2);
  background: var(--accent2);
}

/* --- Частицы / канвас --- */
#particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* --- Фон (убираем сетку, оставляем только глоу) --- */
.bg-grid { display: none; }

.bg-glow {
  position: fixed;
  top: -20vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80vw;
  height: 60vh;
  background: radial-gradient(ellipse, #7c3aed18 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Утилиты --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hidden { display: none !important; }

/* --- Навигация --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: transparent;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(10,10,15,0.92);
  border-bottom-color: var(--border);
  backdrop-filter: blur(12px);
}

.nav-logo {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.08em;
  color: var(--text);
}

.logo-bracket {
  color: var(--accent2);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--cyan); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* --- Герой --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 40px 80px;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-tag {
  font-size: 13px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(56px, 10vw, 110px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

/* Glitch-эффект */
.glitch {
  position: relative;
  color: var(--text);
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.7;
}

.glitch::before {
  color: var(--cyan);
  animation: glitch1 4s infinite;
  clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
}

.glitch::after {
  color: var(--accent2);
  animation: glitch2 4s infinite;
  clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
}

@keyframes glitch1 {
  0%,94%,100% { transform: translate(0); opacity: 0; }
  95% { transform: translate(-3px, 1px); opacity: 0.7; }
  96% { transform: translate(3px, -1px); opacity: 0.7; }
  97% { transform: translate(0); opacity: 0; }
}

@keyframes glitch2 {
  0%,96%,100% { transform: translate(0); opacity: 0; }
  97% { transform: translate(3px, 2px); opacity: 0.7; }
  98% { transform: translate(-2px, -1px); opacity: 0.7; }
  99% { transform: translate(0); opacity: 0; }
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent2);
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.8;
  font-family: var(--font-mono);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Декорация (призма) */
.hero-decoration {
  position: absolute;
  right: 5vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  pointer-events: none;
}

.prism-shape {
  width: 280px;
  height: 280px;
  border: 1px solid var(--border-acc);
  transform: rotate(45deg);
  position: relative;
  animation: prismFloat 6s ease-in-out infinite;
}

.prism-shape::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid var(--cyan-dim);
  transform: rotate(22.5deg);
}

.prism-shape::after {
  content: '';
  position: absolute;
  inset: 36px;
  background: var(--accent-dim);
  animation: prismPulse 3s ease-in-out infinite;
}

@keyframes prismFloat {
  0%,100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(-16px); }
}

@keyframes prismPulse {
  0%,100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* --- Кнопки --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* --- Секции --- */
.section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-dark {
  background: var(--bg-card);
}

.section-label {
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 5vw, 54px);
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.1;
}

.section-desc {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 560px;
  margin-bottom: 48px;
  line-height: 1.8;
}

/* --- О нас --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 15px;
  line-height: 1.9;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--border-acc); }

.stat-number {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  color: var(--accent2);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- Команда --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color var(--transition), transform var(--transition);
}

.team-card:hover {
  border-color: var(--border-acc);
  transform: translateY(-4px);
}

.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--border-acc);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent2);
}

.team-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
}

.team-role {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* --- Контакты --- */
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), transform var(--transition);
  min-width: 180px;
}

.contact-card:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-3px);
}

.contact-icon {
  font-size: 22px;
  line-height: 1;
}

.contact-label {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-head);
  margin-bottom: 2px;
}

.contact-value {
  font-size: 11px;
  color: var(--text-muted);
}

/* --- Футер --- */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-logo {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dim);
  margin-bottom: 12px;
  letter-spacing: 0.1em;
}

.footer-text {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.footer-mono {
  font-family: var(--font-mono);
  color: var(--accent2);
  opacity: 0.4;
}

/* --- Модальное окно --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card2);
  border: 1px solid var(--border-acc);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 620px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s ease;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* --- Скролл-анимации --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Адаптив --- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 120px 24px 80px; }
  .hero-decoration { display: none; }
  .navbar { padding: 16px 24px; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 20px;
  }

  .nav-links.open { display: flex; }

  .nav-toggle { display: flex; }

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

  .section { padding: 72px 0; }
}

/* --- Кнопка наверх --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--border-acc);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 20px var(--accent-dim);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent2);
}

/* --- Карточка игрока (модалка) --- */
.player-modal {
  display: flex;
  gap: 0;
  min-height: 320px;
  margin: -40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.player-modal-left {
  width: 200px;
  flex-shrink: 0;
  background: #070710;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0;
  position: relative;
  overflow: hidden;
}

.player-modal-left::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(transparent, #07071088);
  pointer-events: none;
  z-index: 1;
}

.player-skin-img {
  width: 160px;
  height: 240px;
  object-fit: contain;
  display: block;
  image-rendering: pixelated;
  position: relative;
  z-index: 0;
}

.player-skin-placeholder {
  width: 80px;
  height: 180px;
  background: var(--bg-card2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 20px;
  color: var(--text-dim);
}

.player-modal-right {
  flex: 1;
  padding: 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.player-modal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.player-modal-nick {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.player-modal-nick-prefix {
  color: var(--accent2);
}

.player-modal-role {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-dim);
  border: 1px solid var(--border-acc);
  color: var(--accent2);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}

.player-modal-quote {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 14px;
  line-height: 1.7;
}

.player-modal-divider {
  height: 1px;
  background: var(--border);
}

.player-modal-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.85;
}

.player-modal-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.player-stat {
  text-align: center;
}

.player-stat-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 4px;
}

.player-stat-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .player-modal { flex-direction: column; margin: -24px; }
  .player-modal-left { width: 100%; height: 160px; justify-content: center; align-items: center; flex-direction: row; }
  .player-skin-img { width: 90px; height: 140px; }
}
