/* =============================================
   TG-GAMES — Main Stylesheet
   Theme: Clean Black/White + Cyan Accents
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg:         #0a0a0c;
  --bg2:        #111114;
  --bg3:        #18181d;
  --surface:    #1e1e24;
  --border:     rgba(255,255,255,0.07);
  --text:       #e8e8f0;
  --text-muted: #6b6b7e;
  --accent:     #00d4ff;
  --accent2:    #0099cc;
  --accent-glow:rgba(0,212,255,0.15);
  --white:      #ffffff;
  --danger:     #ff4466;
  --success:    #00ffaa;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Outfit', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;

  --radius:  8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::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-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent2); border-radius: 3px; }

/* =============================================
   NOISE TEXTURE OVERLAY
   ============================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.4;
}

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 2rem); }

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--white); }

p { color: var(--text-muted); line-height: 1.8; }

/* =============================================
   LAYOUT
   ============================================= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* =============================================
   NAVIGATION
   ============================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,12,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav__logo img {
  height: 44px;
  width: auto;
  display: block;
}

.nav__links {
  display: flex;
  gap: 8px;
  list-style: none;
  align-items: center;
}

.nav__links a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
  position: relative;
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--accent);
  background: var(--accent-glow);
}

.nav__lang {
  display: flex;
  gap: 4px;
}

.nav__lang a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  transition: all var(--transition);
}

.nav__lang a:hover,
.nav__lang a.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}

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

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute;
    top: 70px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg2);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .nav__links.open { display: flex; }
  .nav__links a { width: 100%; }
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding-top: 70px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 30%, rgba(0,212,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(0,150,200,0.04) 0%, transparent 60%);
}

/* Pixel grid decoration */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero__eyebrow::before,
.hero__eyebrow::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.hero__logo {
  width: min(400px, 80vw);
  margin: 0 auto 32px;
  animation: floatLogo 6s ease-in-out infinite;
}

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

.hero__title {
  font-size: clamp(1rem, 3vw, 1.5rem);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
}

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

.btn--primary:hover {
  background: var(--white);
  color: #000;
  box-shadow: 0 0 30px rgba(0,212,255,0.3);
  transform: translateY(-2px);
}

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

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
  transform: translateY(-2px);
}

.btn--sm { padding: 8px 18px; font-size: 0.8rem; }
.btn--lg { padding: 16px 40px; font-size: 1rem; }

/* =============================================
   SECTIONS
   ============================================= */
.section {
  padding: 100px 0;
}

.section__header {
  margin-bottom: 64px;
}

.section__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section__tag::before {
  content: '//';
  opacity: 0.5;
}

.section__title {
  color: var(--white);
  margin-bottom: 16px;
}

.section__desc {
  font-size: 1.1rem;
  max-width: 600px;
}

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}

.card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.1);
}

.card__img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.card__img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--border);
}

.card__body { padding: 24px; }

.card__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.card__title {
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 10px;
}

.card__desc { font-size: 0.9rem; margin-bottom: 20px; }

.card__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

/* =============================================
   GAME GRID
   ============================================= */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

/* =============================================
   BLOG GRID
   ============================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
}

/* =============================================
   DOWNLOAD CARDS
   ============================================= */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
}

.download-card:hover {
  border-color: rgba(0,212,255,0.3);
  transform: translateY(-3px);
}

.download-card__platform {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 4px;
  padding: 4px 10px;
  display: inline-block;
  text-transform: uppercase;
}

.download-card__title { color: var(--white); font-size: 1.1rem; font-family: var(--font-display); letter-spacing: 0.05em; }
.download-card__desc { font-size: 0.88rem; flex: 1; }
.download-card__meta { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
  margin-top: 80px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer__logo { height: 48px; width: auto; margin-bottom: 16px; }
.footer__tagline { font-size: 0.9rem; }
.footer__heading { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; color: var(--accent); text-transform: uppercase; margin-bottom: 16px; }
.footer__links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__links a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--accent); }
.footer__bottom { border-top: 1px solid var(--border); padding-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer__copy { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }

/* =============================================
   PIXEL / RETRO DECORATIONS
   ============================================= */
.pixel-corner {
  position: relative;
}

.pixel-corner::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 12px; height: 12px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.pixel-corner::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-bottom: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

/* Glitch text effect */
.glitch {
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  font-family: inherit;
  font-size: inherit;
}

.glitch::before {
  animation: glitch1 3s infinite;
  color: var(--accent);
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
  animation: glitch2 3s infinite;
  color: #ff4466;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch1 {
  0%, 90%, 100% { transform: translateX(0); opacity: 0; }
  92% { transform: translateX(-3px); opacity: 0.8; }
  94% { transform: translateX(3px); opacity: 0.8; }
  96% { transform: translateX(0); opacity: 0; }
}

@keyframes glitch2 {
  0%, 88%, 100% { transform: translateX(0); opacity: 0; }
  90% { transform: translateX(3px); opacity: 0.8; }
  93% { transform: translateX(-3px); opacity: 0.8; }
  95% { transform: translateX(0); opacity: 0; }
}

/* =============================================
   STATUS BADGE
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge--dev {
  background: rgba(255,165,0,0.1);
  color: orange;
  border: 1px solid rgba(255,165,0,0.3);
}

.badge--released {
  background: rgba(0,255,170,0.1);
  color: var(--success);
  border: 1px solid rgba(0,255,170,0.3);
}

.badge--soon {
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(0,212,255,0.3);
}

.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  opacity: 0;
  animation: fadeUp 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-up:nth-child(1) { animation-delay: 0.1s; }
.fade-up:nth-child(2) { animation-delay: 0.2s; }
.fade-up:nth-child(3) { animation-delay: 0.3s; }
.fade-up:nth-child(4) { animation-delay: 0.4s; }
.fade-up:nth-child(5) { animation-delay: 0.5s; }
.fade-up:nth-child(6) { animation-delay: 0.6s; }

/* =============================================
   UTILITY
   ============================================= */
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-muted); }
.text-white  { color: var(--white); }
.text-center { text-align: center; }
.mono        { font-family: var(--font-mono); }
.mt-auto     { margin-top: auto; }
.w-full      { width: 100%; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 64px 0;
}

/* Alert */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.alert--success { background: rgba(0,255,170,0.08); color: var(--success); border: 1px solid rgba(0,255,170,0.2); }
.alert--error   { background: rgba(255,68,102,0.08); color: var(--danger); border: 1px solid rgba(255,68,102,0.2); }

/* Page wrapper */
main { padding-top: 70px; min-height: calc(100vh - 70px); }
