/* =========================================================
   FunGame — "Candy Pop" theme
   A bright, light and playful skin — completely different from
   the dark neon-glass and dark retro-arcade versions:
   cream background, white rounded cards, coral / teal / sunny
   yellow accents, soft coloured shadows and bouncy type.
   ========================================================= */

:root {
  --bg: #fff6ec;
  --bg-soft: #fffdf9;
  --surface: #ffffff;
  --surface-2: #fff1e0;
  --border: #ffe0c2;
  --text: #2b2350;
  --muted: #6f6789;
  --coral: #ff5d5d;
  --teal: #12b5a4;
  --sun: #ffc93c;
  --violet: #7c5cff;
  --cyan: #12b5a4;
  --grad: linear-gradient(135deg, #ff7a5c 0%, #ff4d8d 55%, #ffb03a 100%);
  --grad-cool: linear-gradient(135deg, #12b5a4 0%, #7c5cff 100%);
  --shadow: 0 12px 26px rgba(120, 80, 40, .14);
  --shadow-sm: 0 6px 14px rgba(120, 80, 40, .12);
  --radius: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", "Trebuchet MS", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Soft confetti backdrop behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 34% at 10% -6%, rgba(255, 92, 122, .18), transparent 62%),
    radial-gradient(42% 32% at 92% 0%, rgba(18, 181, 164, .18), transparent 60%),
    radial-gradient(58% 40% at 50% 108%, rgba(255, 201, 60, .22), transparent 62%);
}

.app-container {
  position: relative;
  z-index: 1;
  background: transparent;
}

#app {
  background: transparent;
}

.content {
  background: transparent;
}

.main-section {
  position: relative;
}

/* Keep text above the decorative backdrop overlay */
.legal-page, .content, header.main, footer.main {
  position: relative;
  z-index: 1;
}

/* ---------- Typography ---------- */

h1, .h1 {
  color: var(--text);
  letter-spacing: .3px;
}

h1 a, .h1 a,
h2 a, .h2 a,
h3 a, .h3 a,
h4 a, .h4 a {
  color: var(--coral);
}

h2, .h2 {
  color: var(--text);
}

p a {
  color: var(--teal);
}

p a.highlight {
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  padding: 5px 16px;
  font-weight: 700;
}

/* ---------- Header ---------- */

header.main {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 4px solid var(--sun);
  box-shadow: 0 8px 24px rgba(120, 80, 40, .12);
  position: sticky;
  top: 0;
  z-index: 60;
}

header.main .main-section {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

header.main .menuHolder {
  left: 20px;
  top: 50%;
  margin-top: -18px;
}

header.main .menuHolder label[for="navigationTrigger"] {
  background: var(--surface-2);
  border: 3px solid #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

header.main .menuHolder label[for="navigationTrigger"] svg {
  fill: var(--text);
}

header.main .menuHolder label[for="navigationTrigger"]:hover {
  background: var(--grad);
  transform: translateY(-3px);
  box-shadow: 0 12px 22px rgba(255, 92, 122, .35);
}

header.main .menuHolder label[for="navigationTrigger"]:hover svg {
  fill: #fff;
}

header.main .menuHolder nav.main {
  background: #ffffff;
  border: 3px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

header.main .menuHolder nav.main ul:after {
  border-bottom-color: #ffffff;
}

header.main .logo {
  text-align: center;
}

/* Wordmark logo */
header.main .logo.brand,
a.logo.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: transform .15s ease;
}

header.main .logo.brand:hover,
a.logo.brand:hover {
  transform: translateY(-2px);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--grad);
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: .5px;
  box-shadow: 0 8px 18px rgba(255, 92, 122, .35);
  transform: rotate(-4deg);
}

header.main .logo.brand .brand-name,
a.logo.brand .brand-name {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: .5px;
  color: var(--text);
  text-transform: uppercase;
  line-height: 1;
}

header.main .logo.brand .brand-name b,
a.logo.brand .brand-name b {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}

header.main .logo.brand .brand-tag,
a.logo.brand .brand-tag {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 4px;
}

/* ---------- Language switch ---------- */

.language-select {
  border-radius: 16px;
  border: 2px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.language-select .value {
  background: transparent;
  color: var(--text);
  font-weight: 800;
}

.language-select .value:before {
  border-top-color: var(--coral);
}

/* ---------- Slide-out nav ---------- */

nav.main {
  background: #ffffff;
  border-right: 3px solid var(--border);
}

nav.main ul > li a {
  color: var(--muted);
  border-bottom: 1px dashed rgba(43, 35, 80, .12);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .4px;
}

nav.main ul > li a:hover {
  color: var(--text);
  background: var(--surface-2);
}

nav.main ul > li a:hover:before {
  background: var(--coral);
}

nav.main ul > li a.active {
  color: var(--coral);
}

nav.main ul > li a.active:before {
  background: var(--coral);
}

nav.main .tile-list li .tile-neutral {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 16px;
}

nav.main .tile-list li .teaser header {
  color: var(--text);
}

nav.main .tile-list li .teaser p {
  color: var(--muted);
}

/* ---------- Buttons ---------- */

.btn, .btn-highlight, .btn-primary, .btn-neutral, .btn-transparent {
  border-radius: 999px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 0;
  box-shadow: 0 10px 22px rgba(255, 92, 122, .28);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-highlight {
  background: var(--grad);
  color: #fff;
}

.btn-primary {
  background: var(--grad);
  color: #fff;
}

.btn-primary:hover, .btn-highlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 28px rgba(255, 92, 122, .35);
}

.btn-neutral {
  background: var(--surface-2);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}

.btn-container .btn, .btn-container .btn-primary {
  padding: 13px 46px;
}

/* ---------- Game tiles ---------- */

ul.games {
  margin-left: -14px;
  margin-top: -14px;
}

ul.games li {
  width: 25%;
  padding-left: 14px;
  margin-top: 14px;
}

ul.games li a {
  display: block;
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

ul.games li a:hover {
  transform: translateY(-6px);
  border-color: var(--coral);
  box-shadow: 0 18px 34px rgba(255, 92, 122, .22);
}

ul.games li .icon {
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
  aspect-ratio: 1 / 1;
  padding-bottom: 0;
}

ul.games li .icon .clamp {
  display: none;
}

ul.games li .icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

ul.games li .name-container {
  height: auto;
  padding: 12px 4px 6px;
}

ul.games li .name {
  color: var(--text);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .3px;
  font-size: 15px;
}

ul.games li .btn-block {
  height: 42px;
  border-radius: 999px;
}

/* ---------- Section headings ---------- */

.content .main-section > h1,
.content .main-section > h2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 26px;
}

.content .main-section > h1 img,
.content .main-section > h2 img {
  height: 28px !important;
}

/* ---------- Game detail page ---------- */

.game header .background {
  border-radius: 0 0 28px 28px;
  overflow: hidden;
  border-bottom: 4px solid var(--sun);
}

.game header .background .backgroundDarken {
  background: linear-gradient(180deg, rgba(43, 35, 80, .45), rgba(43, 35, 80, .82));
  padding: 56px 0;
}

.game header .icon {
  border: 4px solid #ffffff;
  border-radius: 20px;
  box-shadow: 0 16px 34px rgba(43, 35, 80, .3);
}

.game header h1 {
  color: #ffffff;
}

.game .play-btn-container .play-btn {
  background: var(--grad);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(255, 92, 122, .35);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game .game-categories ul li {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.game .game-categories ul li a {
  color: var(--teal);
  padding: 6px 16px 4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.game .game-description p {
  color: var(--muted);
}

.game .similarGames h2 {
  color: var(--text);
}

/* ---------- Tiles / teasers ---------- */

.tile, .tile-highlight, .tile-primary, .tile-info, .tile-neutral {
  border-radius: 18px;
  background: var(--surface);
  border: 3px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.tile-highlight {
  background: var(--grad);
  color: #fff;
}

.tile-primary {
  background: var(--grad);
  color: #fff;
}

.tile-info {
  background: var(--grad-cool);
  color: #fff;
}

.tile-neutral {
  background: var(--surface-2);
  color: var(--teal);
}

/* ---------- Footer ---------- */

footer.main {
  margin-top: 70px;
  background: #ffffff;
  border-top: 5px solid var(--sun);
  color: var(--muted);
  box-shadow: 0 -10px 30px rgba(120, 80, 40, .08);
}

footer.main a {
  color: var(--muted);
}

footer.main .footer-content section.tags nav.main ul li a {
  background: var(--surface-2);
  border: 2px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .4px;
}

footer.main .footer-content section.tags nav.main ul li a:hover {
  background: var(--grad);
  border-color: transparent;
  color: #fff;
}

footer.main .copyright a {
  color: var(--teal) !important;
}

/* ---------- Consent / cookie box ---------- */

.consent-box {
  background: #ffffff !important;
  border: 3px solid var(--border);
  border-radius: 24px;
  color: var(--text);
  box-shadow: 0 24px 60px rgba(43, 35, 80, .28);
}

.consent-box-logo {
  background: var(--grad);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(255, 92, 122, .35);
}

.consent-box-message {
  color: var(--muted);
}

.consent-box-message strong {
  color: var(--text);
}

.consent-box-button {
  background: var(--grad) !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 10px 24px rgba(255, 92, 122, .35);
}

.consent-box-links a {
  color: var(--teal) !important;
}

/* ---------- Misc ---------- */

.backToTop {
  filter: drop-shadow(0 6px 14px rgba(43, 35, 80, .35));
}

.section.externalTeaser {
  background: var(--surface);
  border-top: 3px solid var(--border);
  border-bottom: 3px solid var(--border);
}

section.previewTeaser {
  border: 3px solid var(--border);
  border-radius: var(--radius);
}

section.previewTeaser a {
  background: var(--surface-2);
  color: var(--text);
}

.static .content ul {
  color: var(--muted);
}

.static .content a {
  color: var(--teal);
}

/* ---------- Fullscreen game frame ---------- */

.app-module {
  background: var(--bg);
}

.app-module .setting {
  filter: drop-shadow(0 6px 16px rgba(43, 35, 80, .3));
}

/* ---------- Compact game list (mobile layout) ---------- */

.game_box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 -6px 24px;
  padding: 0;
}

.game_box .game_item {
  display: block;
  width: calc(25% - 9px);
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.game_box .game_item:hover {
  transform: translateY(-5px);
  border-color: var(--coral);
  box-shadow: 0 16px 30px rgba(255, 92, 122, .22);
}

.game_box .game_item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.game_box .game_name {
  display: block;
  padding: 9px 8px 11px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .3px;
}

/* ---------- Responsive ---------- */

@media only screen and (max-width: 1000px) {
  ul.games li {
    width: 33.3333%;
  }

  .game_box .game_item {
    width: calc(33.333% - 8px);
  }
}

@media only screen and (max-width: 750px) {
  ul.games li {
    width: 50%;
  }

  header.main .main-section {
    min-height: 68px;
  }

  header.main .logo.brand .brand-name,
  a.logo.brand .brand-name {
    font-size: 21px;
  }

  header.main .logo.brand .brand-badge,
  a.logo.brand .brand-badge {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 15px;
  }

  header.main .logo.brand .brand-tag,
  a.logo.brand .brand-tag {
    font-size: 9px;
    letter-spacing: 2px;
  }
}

@media only screen and (max-width: 560px) {
  header.main .logo.brand .brand-tag,
  a.logo.brand .brand-tag {
    display: none;
  }

  header.main .logo.brand,
  a.logo.brand {
    gap: 9px;
  }
}

@media only screen and (max-width: 400px) {
  ul.games li {
    width: 50%;
  }
}
