/* ==========================================================
   Gothic Crypto Princess — Cyberpunk Theme
   main.css  |  PHP 7.4 project
   ========================================================== */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600&family=Share+Tech+Mono&display=swap');

/* ── Переменные ───────────────────────────────────────────── */
:root {
  --cyan:       #00f0ff;
  --pink:       #ff006e;
  --yellow:     #f5e642;
  --purple:     #9b00ff;
  --dark:       #05030f;
  --dark2:      #0d0820;
  --dark3:      #120a25;
  --glass:      rgba(8, 4, 28, 0.72);
  --glass-border: rgba(0, 240, 255, 0.18);
  --text:       #d4ccf5;
  --text-dim:   #7a72a8;
  --glow-cyan:  0 0 12px rgba(0,240,255,0.6), 0 0 30px rgba(0,240,255,0.25);
  --glow-pink:  0 0 12px rgba(255,0,110,0.6), 0 0 30px rgba(255,0,110,0.25);
  --glow-purple:0 0 12px rgba(155,0,255,0.5), 0 0 24px rgba(155,0,255,0.2);
  --radius:     6px;
  --max-w:      1200px;
  --font-head:  'Orbitron', sans-serif;
  --font-body:  'Rajdhani', sans-serif;
  --font-mono:  'Share Tech Mono', monospace;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── Base ─────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: clamp(15px, 2vw, 17px);
  font-weight: 400;
  color: var(--text);
  background-color: var(--dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Фоновые картинки по типу страницы ───────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.8;
  transition: opacity 0.4s;
}

/* Затемнение краёв (виньетка) */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 100% at 50% 50%, transparent 40%, rgba(5,3,15,0.92) 100%),
    linear-gradient(to right, rgba(5,3,15,0.85) 0%, transparent 12%, transparent 88%, rgba(5,3,15,0.85) 100%),
    linear-gradient(to bottom, rgba(5,3,15,0.6) 0%, transparent 8%, transparent 90%, rgba(5,3,15,0.75) 100%);
  pointer-events: none;
}

body.page-home::before   { background-image: url('/assets/img/1.png'); }
body.page-news::before   { background-image: url('/assets/img/3.png'); }
body.page-faucets::before,
body.page-games::before  { background-image: url('/assets/img/2.png'); }

/* ── Враппер ─────────────────────────────────────────────── */
.content,
.main-content {
  max-width: var(--max-w);
  margin: 220px auto;
  padding: 20px 16px 60px;
  position: relative;
  z-index: 1;
}

/* ── Header / Навигация ──────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 3, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0 16px;
}

.site-header .main-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 54px;
  flex-wrap: wrap;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius);
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: rgba(0,240,255,0.07);
  border-color: rgba(0,240,255,0.2);
  box-shadow: var(--glow-cyan);
}

.nav-icon { font-size: 14px; }

/* ── Переключатель языков ────────────────────────────────── */
.lang-switcher {
  position: fixed;
  top: 64px;
  right: 16px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: rgba(8,4,28,0.82);
  border: 1px solid var(--glass-border);
  color: var(--text-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  transition: all 0.2s;
  backdrop-filter: blur(8px);
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  background: rgba(0,240,255,0.06);
}

/* ── Принцесса ────────────────────────────────────────────── */
.princess {
  position: fixed;
  bottom: 24px;
  left: 16px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 130px;
  pointer-events: none;
}

.princess-img {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 0 14px rgba(155,0,255,0.7));
  animation: princess-float 4s ease-in-out infinite;
}

@keyframes princess-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.princess-text {
  background: rgba(8,4,28,0.88);
  border: 1px solid rgba(155,0,255,0.35);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
  backdrop-filter: blur(8px);
  pointer-events: auto;
}

/* ── Стеклянные блоки ────────────────────────────────────── */
.glass-block,
article,
.faucet-card,
.news-card,
.game-card,
.news-detail,
.faucet-detail {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Заголовки ────────────────────────────────────────────── */
h1, h2, h3 {
  font-family: var(--font-head);
  letter-spacing: 0.04em;
  line-height: 1.25;
}

h1 {
  font-size: clamp(20px, 4vw, 32px);
  font-weight: 700;
  color: var(--cyan);
  text-shadow: var(--glow-cyan);
  margin-bottom: 8px;
}

h2 {
  font-size: clamp(16px, 3vw, 22px);
  color: var(--pink);
  text-shadow: var(--glow-pink);
  margin-bottom: 6px;
}

h3 {
  font-size: clamp(14px, 2.5vw, 18px);
  color: var(--text);
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

/* ── Ссылки ───────────────────────────────────────────────── */
a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}
a:hover { color: #fff; text-shadow: var(--glow-cyan); }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  margin-bottom: 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,240,255,0.2);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan);
  transition: all 0.2s;
}
.back-link:hover {
  background: rgba(0,240,255,0.08);
  box-shadow: var(--glow-cyan);
}

/* ── Кнопки ──────────────────────────────────────────────── */
.btn-neon,
.btn,
button.btn-neon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--pink);
  background: rgba(255,0,110,0.08);
  color: var(--pink);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-neon:hover,
button.btn-neon:hover {
  background: rgba(255,0,110,0.18);
  box-shadow: var(--glow-pink);
  color: #fff;
  border-color: #fff;
}

/* ── Hero (главная) ──────────────────────────────────────── */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(26px, 6vw, 52px);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}

.hero .subtitle {
  font-size: clamp(13px, 2vw, 16px);
  margin-bottom: 40px;
}

.hero .main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

.hero .main-nav .nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  border-radius: 8px;
  background: rgba(8,4,28,0.35);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s;
  
}

.hero .main-nav .nav-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

/* ── Список новостей ─────────────────────────────────────── */
.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.news-card {
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,240,255,0.15), var(--glow-cyan);
  border-color: rgba(0,240,255,0.35);
}

.news-card a {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 16px;
}

.news-img,
.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
  opacity: 0.9;
  filter: saturate(0.85);
  transition: opacity 0.2s, filter 0.2s;
}

.news-card:hover .news-img,
.news-card:hover img {
  opacity: 1;
  filter: saturate(1.1);
}

.news-card h3 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  display: block;
  margin-bottom: 8px;
}

.news-card .read {
  font-size: 12px;
  color: var(--cyan);
  font-family: var(--font-mono);
}

/* ── Детальная страница новости ─────────────────────────── */
.news-detail {
  padding: 28px 28px 32px;
  margin-top: 12px;
}

.news-hero-img {
  width: 100%;
  margin-bottom: 24px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.news-hero-img img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.news-date {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin: 10px 0 18px;
  letter-spacing: 0.05em;
}

/* Теги */
.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(155,0,255,0.12);
  border: 1px solid rgba(155,0,255,0.3);
  color: #c47fff;
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s;
}

.tag:hover {
  background: rgba(155,0,255,0.25);
  box-shadow: var(--glow-purple);
  color: #fff;
}

/* Тело статьи (содержит <p> от Groq) */
.news-body {
  line-height: 1.8;
  color: var(--text);
}

.news-body p {
  margin-bottom: 18px;
  font-size: clamp(14px, 2vw, 16px);
}

.news-body p:last-child { margin-bottom: 0; }

.news-source {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.source-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  border: 1px solid var(--glass-border);
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.source-link:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ── Краны — список ──────────────────────────────────────── */
.faucets-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.faucet-card {
  padding: 20px;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.faucet-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,0,110,0.04), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.faucet-card:hover::before { opacity: 1; }

.faucet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,0,110,0.4);
  box-shadow: 0 8px 32px rgba(255,0,110,0.12), var(--glow-pink);
}

.faucet-card h3 {
  color: var(--pink);
  margin-bottom: 10px;
}

.faucet-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 14px;
}

.faucet-card img {
  max-width: 80px;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
  opacity: 0.85;
}

/* ── Кран — детальная ────────────────────────────────────── */
.faucet-detail {
  padding: 28px 28px 32px;
  margin-top: 12px;
}

.faucet-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.faucet-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  padding: 8px;
  border: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.faucet-desc {
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 28px;
}

.faucet-desc p { margin-bottom: 14px; }

.faucet-cta {
  padding-top: 20px;
  border-top: 1px solid var(--glass-border);
}

.disclaimer-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Игры ─────────────────────────────────────────────────── */
.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.game-card {
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  padding: 16px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245,230,66,0.4);
  box-shadow: 0 0 20px rgba(245,230,66,0.15), 0 0 40px rgba(245,230,66,0.08);
  color: var(--yellow);
}

.game-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 12px;
}

.game-card h3 {
  font-size: 14px;
  margin-bottom: 8px;
}

.game-card .play {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--yellow);
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state,
p.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 15px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  margin-top: 24px;
  backdrop-filter: blur(16px);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  margin-top: 60px;
  padding: 28px 16px;
  text-align: center;
  border-top: 1px solid var(--glass-border);
  background: rgba(5,3,15,0.3);
  
}

.site-footer .copyright {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.site-footer .disclaimer {
  font-size: 11px;
  color: rgba(122,114,168,0.6);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ── Утилиты ─────────────────────────────────────────────── */
img { max-width: 100%; height: auto; display: block; }

/* Горизонтальный сканлайн-эффект (лёгкий) */
body.page-home .hero::before,
body.page-news .news-detail::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.04) 2px,
    rgba(0,0,0,0.04) 4px
  );
  pointer-events: none;
  border-radius: inherit;
}

/* ── АДАПТИВ ─────────────────────────────────────────────── */

/* Планшет */
@media (max-width: 900px) {
  .lang-switcher {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 6px 12px;
    background: rgba(5,3,15,0.82);
    border-bottom: 1px solid var(--glass-border);
  }

  .princess {
    bottom: 12px;
    left: 8px;
    max-width: 90px;
  }

  .princess-img { width: 70px; }
  .princess-text { font-size: 10px; display: none; } /* скрываем текст на мобилке */
}

/* Телефон */
@media (max-width: 600px) {
  .site-header .main-nav { height: auto; padding: 8px 0; gap: 2px; }
  .nav-link { padding: 6px 10px; font-size: 10px; }
  .nav-text { display: none; } /* только иконки */
  .nav-icon { font-size: 18px; }

  .content, .main-content { padding: 12px 10px 80px; }

  .news-list,
  .faucets-list { grid-template-columns: 1fr; }

  .games-list { grid-template-columns: repeat(2, 1fr); }

  .hero { padding: 30px 0 20px; }
  .hero .main-nav { gap: 10px; }
  .hero .main-nav .nav-btn { padding: 10px 18px; font-size: 12px; }

  .news-detail,
  .faucet-detail { padding: 16px; }

  .faucet-hero { flex-direction: column; text-align: center; }

  .lang-switcher { gap: 4px; padding: 4px 8px; }
  .lang-btn { padding: 4px 8px; font-size: 10px; }

  .princess { display: none; } /* убираем на маленьких экранах */

  h1 { font-size: clamp(18px, 5vw, 24px); }
}

/* Очень маленький экран */
@media (max-width: 360px) {
  .games-list { grid-template-columns: 1fr; }
  .lang-btn .lang-code { display: none; }
}

/* ── Скроллбар ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: rgba(0,240,255,0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,240,255,0.5); }

/* ── Анимация появления карточек ────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.news-card,
.faucet-card,
.game-card {
  animation: fade-up 0.4s ease both;
}

.news-card:nth-child(1)  { animation-delay: 0.05s; }
.news-card:nth-child(2)  { animation-delay: 0.10s; }
.news-card:nth-child(3)  { animation-delay: 0.15s; }
.news-card:nth-child(4)  { animation-delay: 0.20s; }
.news-card:nth-child(5)  { animation-delay: 0.25s; }
.news-card:nth-child(6)  { animation-delay: 0.30s; }
.news-card:nth-child(n+7){ animation-delay: 0.35s; }
