/* ========== Базовые ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-dark: #0a0515;
  --bg-card: #130a24;
  --bg-card-hover: #1a0e30;
  --accent: #a855f7;
  --accent2: #c084fc;
  --green: #57cbde;
  --purple: #7c3aed;
  --pink: #e879f9;
  --text: #e5e7eb;
  --text-dim: #9586ab;
  --border: rgba(168, 85, 247, 0.18);
  --glow: 0 0 30px rgba(168, 85, 247, 0.2);
}

html { scroll-behavior: smooth; }

/* ========== Анимированный фон «Тон 618» ========== */
#space-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: -1;
  pointer-events: none;
}

/* Плавающие орбы (CSS) */
.tone-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
  animation: orbFloat linear infinite alternate;
}
.tone-orb:nth-child(1) {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #7b2fbe 0%, transparent 70%);
  top: -10%; left: -5%;
  animation-duration: 14s;
}
.tone-orb:nth-child(2) {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #2d1b69 0%, transparent 70%);
  bottom: -5%; right: -5%;
  animation-duration: 18s;
  animation-delay: -4s;
}
.tone-orb:nth-child(3) {
  width: 350px; height: 350px;
  background: radial-gradient(circle, #4a1a6b 0%, transparent 70%);
  top: 40%; left: 50%;
  animation-duration: 20s;
  animation-delay: -8s;
}
.tone-orb:nth-child(4) {
  width: 300px; height: 300px;
  background: radial-gradient(circle, #1a0a3e 0%, transparent 70%);
  top: 20%; right: 20%;
  animation-duration: 16s;
  animation-delay: -2s;
}
@keyframes orbFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(60px, -40px) scale(1.1); }
  66%  { transform: translate(-30px, 50px) scale(0.95); }
  100% { transform: translate(40px, -20px) scale(1.05); }
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #0a0515;
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; transition: 0.3s; }
a:hover { color: #fff; }

.glass {
  background: rgba(21, 28, 44, 0.7);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* ========== Навбар ========== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(15, 8, 30, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 0.5rem; align-items: center; }

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.95rem;
  transition: 0.3s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(168, 85, 247, 0.12);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}
.hamburger span {
  width: 25px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* ========== Герой ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 2rem;
}

.hero-particles {
  display: none;
}

.particle {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

.hero-content { position: relative; z-index: 2; }

.hero-avatar { margin-bottom: 1.5rem; }
.avatar-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--accent), var(--pink), var(--purple));
  animation: spin-slow 6s linear infinite;
  margin: 0 auto;
}
.avatar-inner {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.gradient-text {
  background: linear-gradient(135deg, var(--accent), var(--pink), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.stat-card {
  padding: 1.2rem 2rem;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid var(--border);
  min-width: 120px;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

.hero-btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  transition: 0.3s;
  box-shadow: 0 4px 25px rgba(168, 85, 247, 0.3);
}
.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 35px rgba(168, 85, 247, 0.5);
  color: #fff;
}

/* ========== Кнопка Minecraft-сервера ========== */
.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.mc-server-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, #2d6b22 0%, #4a8c3f 50%, #6ab04c 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 12px;
  border: 2px solid rgba(106, 176, 76, 0.4);
  transition: 0.3s;
  box-shadow: 0 4px 25px rgba(74, 140, 63, 0.3);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.mc-server-btn::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(255,255,255,0.1) 10%, transparent 20%);
  animation: mc-shine 3s linear infinite;
}
@keyframes mc-shine {
  to { transform: rotate(360deg); }
}
.mc-server-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 40px rgba(74, 140, 63, 0.5);
  color: #fff;
}
.mc-server-btn:active {
  transform: translateY(0) scale(0.98);
}
.mc-icon {
  font-size: 1.4rem;
  position: relative;
  z-index: 1;
  animation: mc-bounce 2s ease-in-out infinite;
}
@keyframes mc-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.mc-label {
  position: relative;
  z-index: 1;
}
.mc-server-btn .mc-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: mc-pulse-ring 2s ease-out infinite;
  pointer-events: none;
}
@keyframes mc-pulse-ring {
  0%   { width: 10px; height: 10px; opacity: 0.5; }
  100% { width: 120px; height: 120px; opacity: 0; }
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.8rem;
  animation: bounce 2s ease infinite;
}
.mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  position: relative;
}
.mouse-wheel {
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  animation: scroll-wheel 1.5s ease infinite;
}
@keyframes scroll-wheel {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(10px); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ========== Секции ========== */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.dark-section {
  max-width: 100%;
  background: rgba(5, 8, 20, 0.6);
  padding-left: 2rem;
  padding-right: 2rem;
}
.dark-section > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
}
.section-desc {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
}

/* ========== About ========== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.about-card {
  padding: 2rem;
  text-align: center;
  transition: 0.3s;
}
.about-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glow);
  border-color: var(--accent);
}
.about-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.about-card h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.about-card p { color: var(--text-dim); font-size: 0.95rem; }

.facts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}
.fact-pill {
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: 0.3s;
}
.fact-pill:hover {
  background: rgba(168, 85, 247, 0.18);
  color: var(--text);
}

/* ========== Фильтр ========== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  transition: 0.3s;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(168, 85, 247, 0.15);
  color: #fff;
  border-color: var(--accent);
}

/* ========== Карточки игр (Steam) ========== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.game-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: 0.35s;
  cursor: pointer;
  position: relative;
}
.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), var(--glow);
  border-color: var(--accent);
}

.game-cover {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
}
.game-cover::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  background: linear-gradient(transparent, var(--bg-card));
}

.game-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  z-index: 2;
}
.badge-fav { background: var(--pink); color: #fff; }
.badge-new { background: #2ecc71; color: #fff; }
.badge-hot { background: #e74c3c; color: #fff; }

.game-info {
  padding: 1rem;
}
.game-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.game-genre {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.game-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.game-platform {
  font-size: 0.75rem;
  color: var(--green);
  font-weight: 600;
}
.game-hours {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.game-progress {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
}
.game-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: 2px;
  transition: width 1s ease;
}

/* ========== Контакты ========== */
.contact-section {
  padding-top: 100px;
  min-height: 100vh;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.contact-card {
  padding: 2rem;
}
.contact-card h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.social-links { display: flex; flex-direction: column; gap: 0.75rem; }
.social-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  transition: 0.3s;
  color: var(--text);
}
.social-item:hover {
  background: rgba(102, 192, 244, 0.08);
  border-color: var(--border);
  transform: translateX(5px);
  color: var(--text);
}
.social-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.discord { background: rgba(88, 101, 242, 0.2); }
.youtube { background: rgba(255, 0, 0, 0.15); }
.telegram { background: rgba(0, 136, 204, 0.2); }
.roblox { background: rgba(226, 35, 26, 0.15); }
.social-item span { font-weight: 600; }
.social-item small { color: var(--text-dim); margin-left: auto; }

/* Форма */
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group label {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(10, 5, 21, 0.7);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: 0.3s;
  outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.12);
}
.form-group select option {
  background: var(--bg-dark);
  color: var(--text);
}

.submit-btn {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.3);
}
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(168, 85, 247, 0.5);
}
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}
.form-success.show { display: block; }
.success-icon { font-size: 3rem; margin-bottom: 0.5rem; }

/* Когда-онлайн */
.contact-tips { padding: 2rem; }
.contact-tips h3 { margin-bottom: 1rem; font-size: 1.15rem; }
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.tip-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
}
.tip-time { font-weight: 600; font-size: 0.9rem; }
.tip-desc { font-size: 0.85rem; color: var(--green); }

/* ========== Футер ========== */
.footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* ========== Анимации появления ========== */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Мобильная навигация ========== */
.nav-links.open {
  display: flex !important;
}

/* ========== Адаптив ========== */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }

  .hero-stats { gap: 0.75rem; }
  .stat-card { padding: 0.8rem 1.2rem; min-width: 90px; }
  .stat-number { font-size: 1.8rem; }

  .contact-grid { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}