/* PixelVault — Main Styles */

:root {
  --bg:         #0d0d1a;
  --bg-alt:     #12122a;
  --card:       #1a1a35;
  --border:     #2a2a4a;
  --accent:     #7c3aed;
  --accent2:    #06b6d4;
  --text:       #e2e8f0;
  --text-muted: #94a3b8;
  --radius:     12px;
  --font-pixel: 'Press Start 2P', monospace;
  --font-main:  'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER ── */
.site-header {
  background: rgba(13,13,26,0.95);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--accent2);
  letter-spacing: 1px;
}

.logo-pixel {
  color: var(--accent);
  margin-right: 6px;
}

.main-nav { display: flex; gap: 32px; }

.main-nav a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover { color: var(--accent2); }

/* ── HERO ── */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-family: var(--font-pixel);
  font-size: clamp(18px, 3vw, 28px);
  line-height: 1.8;
  margin-bottom: 20px;
}

.hero h1 .accent { color: var(--accent2); }

.hero-sub {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

.hero-pixels {
  position: absolute;
  top: 20px; right: 40px;
  font-size: 32px;
  opacity: 0.06;
  display: flex;
  flex-wrap: wrap;
  width: 140px;
  gap: 8px;
  pointer-events: none;
}

/* ── SECTIONS ── */
.section { padding: 72px 0; }

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

.section-title {
  font-family: var(--font-pixel);
  font-size: 16px;
  color: var(--accent2);
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* ── GAMES GRID ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
  display: block;
}

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

.game-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
}

.pacman-thumb  { background: linear-gradient(135deg, #1c1c00, #2a2a00); }
.invaders-thumb { background: linear-gradient(135deg, #001a0d, #002a12); }
.tetris-thumb  { background: linear-gradient(135deg, #00001a, #00002a); }

/* Pac-Man pixel art */
.pacman-icon {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pac {
  width: 48px; height: 48px;
  background: #facc15;
  border-radius: 50% 50% 50% 50%;
  clip-path: polygon(0% 50%, 50% 20%, 100% 0%, 100% 100%, 50% 80%);
}

.dot {
  width: 10px; height: 10px;
  background: #facc15;
  border-radius: 50%;
}

/* Invader icon */
.invader-icon { font-size: 56px; }

/* Tetro block */
.tetro {
  width: 48px; height: 16px;
  background: var(--accent2);
  box-shadow: 16px 0 0 var(--accent2), 32px 0 0 var(--accent2), -16px 0 0 var(--accent);
}

.game-info { padding: 20px; }

.game-info h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.game-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  background: var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-right: 6px;
  font-weight: 500;
}

/* ── GUIDES ── */
.guides-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.guide-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: block;
  transition: border-color 0.2s;
}

.guide-card:hover { border-color: var(--accent2); }

.guide-date {
  font-size: 12px;
  color: var(--accent2);
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.guide-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.guide-card p { color: var(--text-muted); font-size: 14px; }

/* ── VIDEOS ── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}

.video-card { display: block; }

.video-thumb {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}

.video-card:hover .video-thumb { border-color: var(--accent); }

.play-btn {
  font-size: 40px;
  color: var(--accent);
  opacity: 0.8;
}

.video-duration {
  position: absolute;
  bottom: 10px; right: 12px;
  background: rgba(0,0,0,0.7);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.video-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/* ── LINKS ── */
.link-more {
  color: var(--accent2);
  font-weight: 500;
  font-size: 14px;
  transition: opacity 0.2s;
}

.link-more:hover { opacity: 0.7; }

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer p { color: var(--text-muted); font-size: 14px; }

.site-footer nav { display: flex; gap: 24px; }

.site-footer nav a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.site-footer nav a:hover { color: var(--accent2); }

/* ── GAME PAGE ── */
.game-page { padding: 40px 0 72px; }

.game-page h1 {
  font-family: var(--font-pixel);
  font-size: 18px;
  color: var(--accent2);
  margin-bottom: 8px;
}

.game-page .game-desc {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.game-canvas-wrap {
  background: #000;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: inline-block;
  margin-bottom: 32px;
}

.game-controls {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.game-controls h3 {
  font-size: 14px;
  color: var(--accent2);
  margin-bottom: 12px;
  font-family: var(--font-pixel);
}

.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}

.ctrl-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

kbd {
  background: var(--border);
  border: 1px solid #3a3a5a;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: monospace;
  color: var(--text);
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .hero { padding: 60px 0 50px; }
  .hero h1 { font-size: 16px; }
  .main-nav { gap: 20px; }
  .site-footer .container { flex-direction: column; text-align: center; }
}

/* ── Переключатель языка ── */
.lang-switch {
  display: inline-flex;
  gap: 4px;
  margin-left: 24px;
}
.lang-btn {
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1;
  padding: 7px 9px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.lang-btn:hover {
  color: var(--accent2);
  border-color: var(--accent2);
}
.lang-btn.active {
  color: var(--bg);
  background: var(--accent2);
  border-color: var(--accent2);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* ── Статья-гайд ── */
.guide-article { padding: 48px 0 72px; }
.guide-article .container { max-width: 760px; }

.article-eyebrow {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 1px;
  display: block;
  margin-bottom: 16px;
}

.guide-article h1 {
  font-family: var(--font-pixel);
  font-size: clamp(16px, 2.4vw, 22px);
  line-height: 1.6;
  margin-bottom: 14px;
}

.article-meta {
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.article-meta .dot-sep { margin: 0 8px; opacity: .5; }

.guide-article h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent2);
  margin: 40px 0 14px;
}

.guide-article p {
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
  margin-bottom: 18px;
}

.guide-article ul,
.guide-article ol {
  margin: 0 0 18px 0;
  padding-left: 24px;
  color: var(--text);
}
.guide-article li { margin-bottom: 10px; line-height: 1.7; }
.guide-article strong { color: #fff; font-weight: 600; }

.guide-article .lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* Иллюстрации */
.article-figure { margin: 32px 0; }
.article-figure svg {
  width: 100%;
  height: auto;
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article-figure figcaption {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
}

/* Врезка-совет */
.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin: 24px 0;
}
.callout p { margin: 0; color: var(--text-muted); font-size: 15px; }

.back-link {
  display: inline-block;
  margin-top: 40px;
  color: var(--accent2);
  font-weight: 500;
  font-size: 14px;
}
.back-link:hover { opacity: .7; }

@media (max-width: 640px) {
  .lang-switch { margin-left: 12px; }
  .lang-btn { font-size: 8px; padding: 6px 7px; }
}
