/* Dehşet Games — Ana tema ve layout (header, footer, index) */
:root {
  --bg: #0f0f14;
  --surface: #1a1a22;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f0f0f5;
  --text-muted: #9898a8;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --games: #6366f1;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --header-height: 70px;
  --safe-area-top: env(safe-area-inset-top, 0);
  --safe-area-bottom: env(safe-area-inset-bottom, 0);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Header (index sayfası) */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: max(12px, var(--safe-area-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
}

.header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header .logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  color: var(--text);
  text-decoration: none;
}

.header .tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.header-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Mobil: hamburger menü */
.header-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.header-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.header-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .header-nav-toggle {
    display: flex;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(30, 30, 45, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 100px 24px 30px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
    gap: 12px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1), visibility 0.4s;
    z-index: 1002;
    box-shadow: -15px 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 40px 0 0 40px;
    opacity: 1;
    border-bottom: none;
  }

  body.header-nav-open .header-nav {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1), visibility 0s;
  }

  .header-nav-overlay {
    display: block;
  }

  body.header-nav-open .header-nav-overlay {
    opacity: 1;
    visibility: visible;
  }

  .header-nav a {
    width: 100%;
    padding: 14px 20px;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    min-height: 48px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
  }

  .header-nav a:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
  }
}

/* Footer */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  padding-bottom: max(24px, var(--safe-area-bottom));
}

.footer__inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.footer__nav {
  display: flex;
  gap: 20px;
}

.footer__nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
}

/* User Badges System */
.user-badges-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
  margin: 0 4px;
}

.user-badge {
  position: relative;
  display: inline-block;
  width: 2em;
  height: 2em;
  cursor: help;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.user-badge-yaslikurt img { transform: scale(1.15); }
.user-badge-puankrali img { transform: scale(0.92); }

.user-badge:hover {
  transform: scale(1.3) rotate(5deg);
  z-index: 10;
}

.user-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Badge Tooltip */
[data-badge-tooltip] {
  position: relative;
}

[data-badge-tooltip]::before {
  content: attr(data-badge-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 8px 12px;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 500;
  white-space: normal;
  width: max-content;
  max-width: 180px;
  line-height: 1.3;
  text-align: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1000;
}

[data-badge-tooltip]::after {
  content: '';
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  border: 6px solid transparent;
  border-top-color: rgba(20, 20, 30, 0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
}

[data-badge-tooltip]:hover::before,
[data-badge-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Rainbow animation for puankrali if needed */
@keyframes badge-pulse {
  0% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.3);
  }

  100% {
    filter: brightness(1);
  }
}

.user-badge-puankrali img {
  animation: badge-pulse 2s infinite ease-in-out;
}