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

html, body {
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #1e293b;
  min-height: 100vh;
  line-height: 1.6;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #ec5f92;
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #d94e82;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Fredoka', -apple-system, sans-serif;
  margin: 0;
  color: #1e293b;
}

::selection {
  background: #FFD166;
}

@keyframes tkm-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

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

@keyframes tkm-pop {
  0% { transform: scale(.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Glass Panels - High Opacity for Maximum Text Legibility */
.glass {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 18px 50px rgba(31, 41, 55, 0.12);
  border-radius: 28px;
  padding: 26px;
  contain: content;
}

.glassStrong {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 24px 60px rgba(31, 41, 55, 0.16);
  border-radius: 34px;
  padding: 34px;
  contain: content;
}

/* Buttons - Original Design */
.btn-primary {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  padding: 14px 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FF9EBB, #FFB4A2);
  box-shadow: 0 12px 30px rgba(255, 158, 187, 0.5);
  text-align: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 14px 35px rgba(255, 158, 187, 0.65);
}

.btn-pill {
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: 'Fredoka', sans-serif;
  font-weight: 500;
  font-size: 13.5px;
  color: #475569;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.btn-pill:hover, .btn-pill.active {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(135deg, #FF9EBB, #FFB4A2);
  box-shadow: 0 6px 16px rgba(255, 158, 187, 0.45);
}

.btn-secondary {
  display: inline-block;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  color: #0b6b8a;
  background: rgba(76, 201, 240, 0.22);
  padding: 7px 16px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
  background: rgba(76, 201, 240, 0.35);
  color: #085169;
}

.btn-coins {
  background: linear-gradient(135deg, #FFD166, #FFB4A2);
  color: #1e293b;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(255, 209, 102, 0.4);
}

.btn-coins:hover {
  color: #1e293b;
  transform: translateY(-2px);
}

/* Header & Floating Navigation */
.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: calc(100% - 32px);
  max-width: 1140px;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 40px rgba(31, 41, 55, 0.14);
  border-radius: 999px;
}

.brand-logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #1e293b;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 3px;
  align-items: center;
}

.user-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #FFD166;
  padding: 5px 12px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #7a5a00;
  box-shadow: 0 4px 12px rgba(255, 209, 102, 0.35);
  white-space: nowrap;
}

/* Layout Main Container */
.main-wrapper {
  padding: 110px 20px 40px;
  max-width: 1120px;
  margin: 0 auto;
}

/* Warning Box */
.warnStyle {
  margin-top: 18px;
  padding: 16px 20px;
  background: rgba(255, 209, 102, 0.35);
  border: 1.5px solid rgba(255, 209, 102, 0.8);
  border-radius: 18px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.55;
  color: #7a5a00;
  text-align: center;
}

/* Input Style */
.inputStyle {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 13px 16px;
  border-radius: 16px;
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.9);
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: #1e293b;
  outline: none;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.game-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 14px 32px rgba(31, 41, 55, 0.1);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  content-visibility: auto;
  contain-intrinsic-size: 300px;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(31, 41, 55, 0.15);
}

.game-thumb {
  width: 100%;
  height: 180px;
  background: #f1f5f9;
  position: relative;
  overflow: hidden;
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.game-info {
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
  color: #1e293b;
}

.game-desc {
  color: #64748b;
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
  flex-grow: 1;
}

/* Age Gate & Modals */
.age-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(76, 201, 240, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-modal {
  max-width: 440px;
  width: 100%;
  text-align: center;
  padding: 44px 36px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 30px 70px rgba(31, 41, 55, 0.22);
  border-radius: 32px;
  animation: tkm-pop .35s ease;
}

/* Footer */
.site-footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 64px 20px 32px;
  position: relative;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  margin-top: 60px;
  overflow: hidden;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-badge {
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  box-shadow: 0 3px 10px rgba(31, 41, 55, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

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

.org-card-link {
  padding: 16px 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 4px 14px rgba(31, 41, 55, 0.08);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  max-width: 240px;
  text-align: center;
}

.org-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.12);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-nav a {
  color: #475569;
}

.footer-nav a:hover {
  color: #ec5f92;
}

.footer-warning-box {
  max-width: 900px;
  margin: 0 auto;
  padding: 22px 26px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  text-align: center;
  color: #334155;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.6;
}

.footer-giant-title {
  font-size: clamp(24px, 7vw, 88px);
  line-height: 1;
  font-weight: 900;
  color: #1e293b;
  text-align: center;
  width: 100%;
  max-width: 100%;
  text-transform: uppercase;
  margin: 36px 0 16px;
  user-select: none;
  font-family: 'Fredoka', sans-serif;
  filter: drop-shadow(0 2px 3px rgba(31, 41, 55, 0.12));
  letter-spacing: -0.02em;
  overflow: hidden;
  box-sizing: border-box;
}

/* Burger Button & Mobile Menu Styles */
.burger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  padding: 0;
  z-index: 160;
}

.burger-bar {
  width: 100%;
  height: 3px;
  background-color: #1e293b;
  border-radius: 99px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  box-shadow: -10px 0 40px rgba(31, 41, 55, 0.2);
  z-index: 250;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px 20px;
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 20px;
}

.close-drawer-btn {
  background: rgba(241, 245, 249, 0.8);
  border: none;
  font-size: 20px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  cursor: pointer;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-nav-links a {
  display: block;
  font-family: 'Fredoka', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  padding: 10px 16px;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.9);
  transition: background 0.15s ease, color 0.15s ease;
}

.mobile-nav-links a.active, .mobile-nav-links a:hover {
  background: linear-gradient(135deg, #FF9EBB, #FFB4A2);
  color: #fff;
}

.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 240;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Media Queries for Desktop & Mobile Adaptations */
@media (min-width: 1021px) {
  .mobile-only {
    display: none !important;
  }
}

@media (max-width: 1020px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }

  .site-header {
    top: 12px;
    width: calc(100% - 20px);
  }

  .header-container {
    padding: 8px 16px;
    border-radius: 999px;
  }

  .main-wrapper {
    padding: 85px 14px 30px;
  }

  .glass {
    padding: 18px 16px;
    border-radius: 20px;
  }

  .glassStrong {
    padding: 22px 16px;
    border-radius: 24px;
  }

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

  .game-thumb {
    height: 140px;
  }

  .game-info {
    padding: 14px 12px;
  }

  .game-title {
    font-size: 16px;
  }

  .game-desc {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .btn-primary {
    padding: 12px 22px;
    font-size: 15px;
  }

  .btn-secondary {
    padding: 8px 14px;
    font-size: 13px;
  }
}
