body {
    background-color: black;
    color: #d400ff;
}

h1 {
    color: #d400ff;
    text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}

p {
    font-size: 25px;
    color: #d400ff;
    text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}

p:hover.link {
    color: #1eff00;
    text-shadow: 0 0 10px #1eff00, 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
}

.front {
    margin-top: -20px;
    margin-bottom: -20px;
}

.img {
    border-style: hidden;
    background-color: #000436;
    width: 15%;
    left: -5px;
    bottom: -5px;
}

.img:hover {
    border-style: hidden;
    background-color: #000436;
}

.update {
    color: #d400ff;
    font-size: 18px;
    border-style: hidden;
    width: 14%;
}

.update:hover {
    color: #1eff00;
    font-size: 18px;
    text-shadow: 0 0 10px #1eff00, 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
    border-style: hidden;
}

a {
    color: #d400ff;
    font-size: small;
    background-color: black;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    border-color: #4400ff;
    border-style: solid;
    position: relative;
    width: 24%;
}

 a:hover {
    color: #1eff00;
    border: #1eff00;
    border-style: solid;
    text-shadow: 0 0 10px #1eff00, 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
} */

@keyframes flicker {
    from {
        text-shadow:
            0 0 5px blue, 0 0 10px blue,
            0 0 20px blue, 0 0 40px blue;
    }
    to {
        text-shadow:
            0 0 5px blue, 0 0 10px blue,
            0 0 20px rgb(0, 183, 255), 0 0 40px rgb(0, 162, 255);
    }
}

.flick {
    animation: flicker 1s ease-in-out infinite alternate;
}

.alert {
    padding: 20px;
    background-color: #000000;
    color: rgb(9, 255, 0);
    margin-bottom: 15px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    border: #1eff00;
    border-style: solid;
}

.closebtn {
    margin-left: 15px;
    color: rgb(0, 255, 21);
    font-weight: bold;
    float: right;
    font-size: 22px;
    line-height: 15px;
    cursor: pointer;
    transition: 0.3s;
}

.closebtn:hover {
    color: rgb(255, 255, 255);
}

.callout {
    position: fixed;
    bottom: 25px;
    right: 15px;
    margin-left: 20px;
    max-width: 300px;
}

.callout-header {
    padding: 5px 10px;
    background: #000436;
    font-size: 30px;
    color: white;
    border-style: solid;
    border-color: #4400ff;
}

.callout-container {
    padding: 10px;
    background-color: #000000;
    color: lime;
    border-style: solid;
    border-color: #000436;
}

.closebtn {
    position: absolute;
    top: 10px;
    right: 10px;
    color: lime;
    font-size: 30px;
    cursor: pointer;
}

.closebtn:hover {
    color: white;
}

.webApp {
    font-size: large;
}

main h1 {
  text-align: center;
  font-size: 2.25rem;
  margin-bottom: 0.5em;
  color: #d400ff;
  text-shadow:
    0 0 10px #003cff,
    0 0 20px #0066ff,
    0 0 30px #0064e6;
}

main .divider {
  border: none;
  height: 2px;
  background: var(--text-hover-color);
  width: 60%;
  margin: 0 auto 2rem;
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 4rem;
}

@media (max-width: 800px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .partners-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  perspective: 1000px;
  cursor: pointer;
}
.card:focus-visible {
  outline: 3px solid var(--text-hover-color);
  outline-offset: 4px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.card:hover .card-inner,
.card:focus-within .card-inner {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(30, 255, 0, 0.3);
  backface-visibility: hidden;
  background: #000436;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-front img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}
.card-front h2 {
  padding: 1rem;
  font-size: 1.1rem;
  color: #d400ff;
}

.card-back {
  transform: rotateY(180deg);
  padding: 1.5rem;
  text-align: center;
}
.card-back p {
  margin: 0;
  font-size: 1rem;
  color: #d400ff;
  text-shadow: none;
}
:root {
  --mw-tab: 22px;
}

.music-widget {
  position: fixed;
  bottom: 16px;
  right: 0;
  width: 300px;
  max-width: 85vw;
  background: #000436;                 /* your deep blue panel */
  border: 1px solid #4400ff;           /* blue border from theme */
  border-right: none;                   /* edge meets screen side */
  border-radius: 12px 0 0 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  z-index: 10000;                       /* over everything */
  transform: translateX(calc(100% - var(--mw-tab)));
  transition: transform .35s ease;
  color: #d400ff;                       /* magenta text */
  overflow: visible;
}

.music-widget.open {
  transform: translateX(8%);
}

.music-widget__tab {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--mw-tab);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  user-select: none;
  cursor: pointer;
  background: linear-gradient(180deg, #00083d 0%, #000000 100%);
  border-left: 1px solid #4400ff;
  text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}

.music-widget__tab span {
  transform: rotate(-90deg);
  letter-spacing: 1px;
}

.music-widget__inner {
  padding: 12px 14px 12px 14px;
  padding-right: calc(14px + var(--mw-tab));
}

.music-widget__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: #d400ff;
  text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}

.music-widget__row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.music-widget input[type="url"],
.music-widget select {
  flex: 1;
  min-width: 0;
  background: #000;
  color: #d400ff;
  border: 1px solid #4400ff;
  border-radius: 8px;
  padding: 8px 10px;
  outline: none;
}

.music-widget input::placeholder {
  color: #4400ff;
}

.music-widget button {
  background: #000;
  color: #d400ff;
  border: 1px solid #4400ff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, color .5s ease, border-color .25s ease;
}

.music-widget button:hover {
  color: #1eff00;
  border-color: #1eff00;
  box-shadow: 0 0 10px #1eff00, 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
  transform: translateY(-1px) scale(1.05);
}

.music-widget__now {
  font-size: 12px;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#musicWidget .kofi-tab{
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);           /* sits just above the widget */
  width: var(--mw-tab);               /* same thin handle width */
  height: 84px;                       /* tall enough to tap on mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #00083d 0%, #000000 100%);
  border-left: 1px solid #4400ff;     /* match your widget chrome */
  border-radius: 12px 0 0 12px;
  text-decoration: none;
  font-weight: 800;
  color: #ffb3ae;                     /* Ko-fi-ish tint */
  text-shadow: 0 0 10px rgba(255,94,91,.75);
  z-index: 10001;                     /* above the panel body */
  user-select: none;
  cursor: pointer;
}
#musicWidget .kofi-tab span{
  transform: rotate(-90deg);
  letter-spacing: .5px;
}
#musicWidget .kofi-tab:hover{
  filter: brightness(1.2);
}


@media (max-width: 480px) {
  .music-widget { bottom: 64px; }
}

:root {
  --cn-bg: #000436;
  --cn-border: #4400ff;
  --cn-text: #d400ff;
  --cn-accent: #1eff00;
}

#cn-settings-btn {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10020; /* above header(9999) and music(10000) */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #000;
  color: var(--cn-text);
  border: 1px solid var(--cn-border);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
  transition: transform .25s ease, box-shadow .25s ease, color .5s ease, border-color .25s ease, background .25s ease;
}
#cn-settings-btn:hover {
  color: var(--cn-accent);
  border-color: var(--cn-accent);
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 0 10px var(--cn-accent), 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
}
#cn-settings-btn:active { transform: translateY(0) scale(0.98); }

#cn-settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
  z-index: 10010;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

#cn-settings-panel {
  position: fixed;
  top: 70px;
  right: 12px;
  width: 340px;
  max-width: calc(100vw - 24px);
  border-radius: 16px;
  background: var(--cn-bg);
  border: 1px solid var(--cn-border);
  color: var(--cn-text);
  box-shadow: 0 12px 30px rgba(0,0,0,.6);
  z-index: 10020;
  transform: translateY(-10px) scale(.98);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
#cn-settings-backdrop.open { opacity: 1; pointer-events: auto; }
#cn-settings-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }

.cn-sp__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--cn-border);
}
.cn-sp__title {
  margin: 0; font-size: 16px; color: var(--cn-text);
  text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}
.cn-sp__close {
  background: #000; color: var(--cn-text); border: 1px solid var(--cn-border);
  border-radius: 10px; padding: 6px 10px; font-weight: 700; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, color .5s ease, border-color .25s ease;
}
.cn-sp__close:hover {
  color: var(--cn-accent); border-color: var(--cn-accent);
  box-shadow: 0 0 10px var(--cn-accent), 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
  transform: translateY(-1px) scale(1.05);
}

.cn-sp__body { padding: 14px; display: grid; gap: 14px; }
.cn-card {
  background: #000; border: 1px solid var(--cn-border); border-radius: 12px; padding: 12px;
  box-shadow: 0 4px 12px rgba(30,255,0,.08);
}
.cn-card h4 { margin: 0 0 10px 0; font-size: 14px; color: var(--cn-text); }

.cn-field { display: grid; gap: 8px; margin-bottom: 10px; }
.cn-label { font-size: 12px; opacity: .9; }
.cn-input, .cn-input-url {
  width: 100%; background: #000; color: var(--cn-text);
  border: 1px solid var(--cn-border); border-radius: 10px; padding: 10px 12px; outline: none;
}
.cn-input::placeholder, .cn-input-url::placeholder { color: #4400ff; }

.cn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cn-btn {
  background: #000; color: var(--cn-text); border: 1px solid var(--cn-border);
  border-radius: 10px; padding: 10px 12px; font-weight: 700; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, color .5s ease, border-color .25s ease;
}
.cn-btn:hover {
  color: var(--cn-accent); border-color: var(--cn-accent);
  box-shadow: 0 0 10px var(--cn-accent), 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
  transform: translateY(-1px) scale(1.05);
}
.cn-btn:active { transform: translateY(0) scale(.98); }

.cn-hint { font-size: 12px; opacity: .85; }

.cn-card { overflow: hidden; }

.cn-input,
.cn-input-url,
.cn-select {
  box-sizing: border-box; /* <- stops overhang */
  max-width: 100%;
}

.cn-select {
  width: 100%;
  background: #000;
  color: var(--cn-text);
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.cn-preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cn-mini { font-size: 12px; opacity: .85; }

details.cn-manage {
  margin-top: 8px;
  border-top: 1px dashed var(--cn-border);
  padding-top: 10px;
}
details.cn-manage summary {
  cursor: pointer;
  list-style: none;
  padding: 6px 0;
  color: var(--cn-text);
}
details.cn-manage[open] summary {
  color: var(--cn-accent);
  text-shadow: 0 0 10px var(--cn-accent);
}

#cn-io-mini #cnIoMiniFullscreen { display: none !important; }

:root {
  --motd-bg: #000436;
  --motd-border: #4400ff;
  --motd-text: #d400ff;
  --motd-accent: #1eff00;
  --motd-anim-in: 420ms cubic-bezier(.2,.8,.2,1);
  --motd-anim-out: 320ms cubic-bezier(.4,0,.2,1);
}

.motd {
  width: min(1000px, 92vw);
  margin: 10px auto 12px;
  position: relative;
  z-index: 9998; /* header(9999), music(10000) */
}

.motd__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--motd-bg);
  border: 1px solid var(--motd-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);

  transform: scaleX(0);
  transform-origin: 50% 50%;
  opacity: 0;
  will-change: transform, opacity;
}

.motd.is-open .motd__inner {
  animation: motd-expand var(--motd-anim-in) forwards;
}

.motd.is-closing .motd__inner {
  animation: motd-collapse var(--motd-anim-out) forwards;
}

@keyframes motd-expand {
  0%   { transform: scaleX(0.05); opacity: 0; filter: saturate(0.8); }
  60%  { transform: scaleX(1.02); opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; filter: none; }
}
@keyframes motd-collapse {
  0%   { transform: scaleX(1); opacity: 1; }
  40%  { transform: scaleX(1.02); }
  100% { transform: scaleX(0.05); opacity: 0; }
}

.motd__label {
  font-weight: 900;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #000;
  border: 1px solid var(--motd-border);
  color: var(--motd-text);
  text-shadow: 0 0 10px #003cff, 0 0 20px #0066ff, 0 0 30px #0064e6;
}

.motd__text {
  font-size: 14px;
  color: var(--motd-text);
  min-height: 1.2em;     /* avoid layout shift while typing */
  white-space: nowrap;   /* classic ticker feel; remove if you want wrapping */
  overflow: hidden;
  border-right: 0.12em solid transparent; /* caret slot, toggled via JS */
}

.motd__text.is-typing {
  border-right-color: var(--motd-accent);
  animation: caret-blink 900ms steps(1, end) infinite;
}
@keyframes caret-blink {
  50% { border-right-color: transparent; }
}

.motd__close {
  appearance: none;
  background: #000;
  color: var(--motd-text);
  border: 1px solid var(--motd-border);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .25s ease, color .4s ease, border-color .25s ease;
}
.motd__close:hover {
  color: var(--motd-accent);
  border-color: var(--motd-accent);
  box-shadow: 0 0 10px var(--motd-accent), 0 0 20px #37ff00, 0 0 30px #0ce600, 0 0 40px #11ee01;
  transform: translateY(-1px) scale(1.05);
}

.motd--toast {
  position: fixed;
  bottom: 90px;     /* clears your footer + music widget */
  right: 16px;
  margin: 0;
  z-index: 10001;   /* above music(10000) */
  width: min(420px, 92vw);
}
.motd--toast .motd__inner {
  grid-template-columns: 1fr auto auto;
}

@media (prefers-reduced-motion: reduce){
  html.force-motion .motd__inner,
  html.force-motion .motd.is-open .motd__inner,
  html.force-motion .motd.is-closing .motd__inner,
  html.force-motion .flick,
  html.force-motion header.site-header.animated-in,
  html.force-motion .game-list a,
  html.force-motion .emu-list a,
  html.force-motion .recent-list a {
  }

  html:not(.force-motion) .motd__inner,
  html:not(.force-motion) .motd.is-open .motd__inner,
  html:not(.force-motion) .motd.is-closing .motd__inner {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }

  html:not(.force-motion) .motd__text,
  html:not(.force-motion) .motd__text.is-typing {
    animation: none !important;
    border-right-color: transparent !important;
  }

  html:not(.force-motion) .game-list a,
  html:not(.force-motion) .emu-list a,
  html:not(.force-motion) .recent-list a,
  html:not(.force-motion) .link,
  html:not(.force-motion) .cn-btn {
    transition-duration: .08s !important;
  }
}

/* === Side Ad Overlays (160x600) ===================================== */
/* Robust Y-centering using CSS variable for horizontal slide so transform
   isn't clobbered by multiple rules. Uses 50vh + translateY(-50%) for
   consistent viewport centering. */
.ad-side {
  position: fixed;
  top: 50vh;                    /* center relative to viewport */
  width: 160px;
  height: 800px;
  z-index: 12000;
  opacity: .98;
  /* Use CSS var for X-offset so we don't overwrite entire transform in other rules */
  --ad-x: 0;
  transform: translateY(-50%) translateX(var(--ad-x));
  transition: transform .55s ease, opacity .35s ease;
  will-change: transform;
  pointer-events: auto;
  -webkit-font-smoothing: antialiased;
}

/* start hidden off-canvas horizontally; keep vertical centering */
.ad-side--left  { left: 8px;  --ad-x: -120%; }
.ad-side--right { right: 8px; --ad-x:  120%;  }

/* open state = on-screen */
.ad-side.open { --ad-x: 0; }

/* explicit hidden classes if you use them */
.ad-side.hidden-left  { --ad-x: -120%; }
.ad-side.hidden-right { --ad-x:  120%; }

/* panel chrome */
.ad-side__inner {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  border: 1px solid #4400ff;
  border-radius: 14px;
  box-shadow:
    0 0 12px #d400ff,
    0 0 24px rgba(212,0,255,.55),
    0 0 36px rgba(0,100,230,.35);
  overflow: hidden;
}

/* close button */
.ad-side__close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #000;
  color: #d400ff;
  border: 1px solid #4400ff;
  border-radius: 10px;
  padding: 2px 8px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, color .5s ease, border-color .25s ease;
}
.ad-side__close:hover {
  color: #1eff00;
  border-color: #1eff00;
  box-shadow: 0 0 10px #1eff00, 0 0 20px #37ff00;
  transform: translateY(-1px) scale(1.05);
}

/* slot + fallback */
/* slot + fallback */
/* Side-rail ad size only */
.ad-side .ad-slot    { width: 160px; height: 600px; }

.ad-fallback {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  height: 100%;
  color: #d400ff;
  font-size: 14px;
}


/* ensure sandboxed ad fills the panel */
.ad-slot-frame { display:block; width:160px; height:600px; border:0; }

/* Constrain on small viewports */
/* Constrain on small viewports */
@media (max-height: 820px) {
  .ad-side { max-height: 80vh; height: auto; }
  .ad-side .ad-slot-frame,
  .ad-side .ad-slot {
    height: calc(80vh - 40px);
  }
}

@media (max-width: 900px) {
  .ad-side { display: none !important; }
}

/* ========= Native banner ad styling (paste to end of css.css) ========= */

/* Primary class to use when you can edit the ad container in HTML:
   <div class="native-banner" aria-label="Advertisement"> ...ad code... </div>
*/
.native-banner,
.native-banner .ad-slot,
.native-banner .ad-fallback,
.native-banner .ad-slot-frame {
  position: relative;
  display: block;
  box-sizing: border-box;
  background: linear-gradient(180deg,#0b0220 0%, #040006 100%); /* subtle dark backdrop */
  border-radius: 12px;
  padding: 8px;
  border: 2px solid rgba(148, 0, 255, 0.35); /* soft purple border */
  outline: 3px solid rgba(148,0,255,0.12);
  transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s ease, filter .28s ease;
  will-change: transform, box-shadow, filter;
  overflow: hidden;
  z-index: 12000;
}

/* Purple neon outline (stronger) */
.native-banner::after{
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 14px;
  pointer-events: none;
  box-shadow:
    0 0 18px rgba(148,0,255,0.18),
    0 0 40px rgba(100,25,255,0.08);
  opacity: 0.9;
}

/* Prevent site-wide anchor rules from overriding ad links.
   Use high-specificity selectors and !important so ad creatives control their own link colors.
*/
.native-banner a,
.native-banner a:visited,
.native-banner a:active,
.native-banner a:focus {
  color: inherit !important;
  text-decoration: none !important;
  background: transparent !important;
  font-weight: 600;              /* ad text stays readable */
  outline: none;
}

/* Keep ad links clickable but don't apply your default hover neon on them.
   Instead, let the container show the hover “game” effect. */

/* Game-like hover: lift + scale + slight tilt + purple glow */


/* Optional micro animation while hovering (subtle bounce) */


/* Focus-visible for keyboard users (strong accessible outline) */
.native-banner:focus-within,
.native-banner:focus {
  outline: 3px solid rgba(148,0,255,0.42);
  outline-offset: 4px;
}

/* ====== Fallback selectors for vendor-injected ads =====
   If you can't edit the HTML to add .native-banner, these selectors try to catch
   common ad container classes (ad-slot, ad-fallback, ezoic, ez-*, native-banner-like names).
   They intentionally are LESS specific than .native-banner above, so if you can add
   .native-banner to your container, that will take precedence.
*/
.ad-banner, .native-ad, .native-banner, .ad-native,
.ezoic-ad, .ez-native, .ad-slot, .ad-fallback, .ad-slot-frame {
  /* gentle baseline styling so vendor creatives remain readable */
  border-radius: 10px;
  padding: 6px;
}

/* When vendor elements get inserted inside .ad-slot or .ad-fallback,
   try to apply the purple chrome to their nearest wrapper */
.ad-slot > iframe,
.ad-slot-frame,
.ad-fallback > iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Make sure small-screen doesn't break layout */
@media (max-width: 900px) {
  .native-banner, .ad-banner, .ad-slot, .ad-fallback {
    transform: none !important;
    margin: 6px auto;
    width: calc(100% - 12px);
  }
}

/* =========================
   Ads: disable site anchor chrome on ad containers
   (Keeps game/nav anchors intact while removing invisible-click
   outlines / borders for vendor-injected ad elements)
   ========================= */

/* 1) Common vendor/ad container selectors — override any site-wide anchor rules */
.ad-slot a,
.ad-fallback a,
.ad-side a,
.ad-side__inner a,
.ad-banner a,
.native-ad a,
.native-banner a,
.ezoic-ad a,
.ez-native a,
.ez-creative a,
#adLeft a,
#adRight a,
#container-579862c43d3f51f18ccc0b36028d5de2 a,
.ad-slot-frame,
.ad-slot-frame:focus,
.ad-slot iframe,
.ad-fallback iframe,
.ad-slot > * {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
  color: inherit !important;
}

/* 2) Defensive: prevent focus rings on wrapper containers */
.ad-slot:focus,
.ad-fallback:focus,
.ad-side:focus,
.ad-side__inner:focus,
.native-banner:focus,
.ezoic-ad:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* 3) Ensure ad iframes themselves show no border/outline in the parent document */
iframe.ad-slot-frame,
iframe[src*="recentlathe"],
iframe[src*="ezoic"],
iframe[src*="doubleclick"] {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 4) Preserve keyboard/focus accessibility on your site/game links:
     keep existing styles for .game-list / cards etc. (reinforce them) */
.game-list a:focus-visible,
.recent-list a:focus-visible,
.emu-list a:focus-visible,
.card:focus-visible,
.card:focus {
  outline: 3px solid var(--text-hover-color);
  outline-offset: 4px;
  box-shadow: 0 0 12px 4px var(--text-hover-color);
}

/* 5) Optional: if some vendor injects a top-level <a> covering the ad (transparent),
     this hides any border/outline while still allowing click. */
.ad-side a,
.ad-fallback a,
.ad-slot a {
  -webkit-tap-highlight-color: transparent;
  tap-highlight-color: transparent;
}


/* Main in-content banner wrapper for EffectiveGate unit */
.ad-banner-primary {
  max-width: 728px;           /* looks good for 300x250 / 320x50 / 728x90 formats */
  margin: 24px auto 32px;     /* center it with breathing room */
}

/* Slightly tighter on small screens */
@media (max-width: 768px) {
  .ad-banner-primary {
    max-width: 100%;
    margin: 18px auto 24px;
  }
}

/* Final override: neutralize site-wide link chrome INSIDE ad containers
   so your global `a { width:24%; border:... }` doesn't wreck the creative.
   This does NOT touch your normal game/emu links. */
.ad-slot a,
.ad-fallback a,
.ad-side a,
.ad-side__inner a,
.ad-banner a,
.native-ad a,
.native-banner a,
.ezoic-ad a,
.ez-native a,
.ez-creative a,
#adLeft a,
#adRight a,
#container-0a0cfcfd7f3996311df0bd0ec4fdb091 a {
  display: block !important;
  width: 100% !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  text-decoration: none !important;
  color: inherit !important;
  font-size: inherit !important;
  text-align: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Main in-content banner: allow vendor to control size */
#container-0a0cfcfd7f3996311df0bd0ec4fdb091 {
  width: 100% !important;
  height: auto !important;
  overflow: visible;
}

/* ========= Account / Sync UI ========= */

.cn-account-btn,
.cn-sync-btn {
  position: fixed;
  left: 12px;
  z-index: 10030;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #000000;
  color: var(--cn-text);
  border: 1px solid var(--cn-border);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition:
    transform .25s ease,
    box-shadow .25s ease,
    color .5s ease,
    border-color .25s ease,
    background .25s ease;
}

.cn-account-btn { top: 12px; }
.cn-sync-btn    { top: 56px; }

.cn-account-btn:hover,
.cn-sync-btn:hover:enabled {
  color: var(--cn-accent);
  border-color: var(--cn-accent);
  box-shadow:
    0 0 10px var(--cn-accent),
    0 0 20px #37ff00,
    0 0 30px #0ce600;
  transform: translateY(-1px) scale(1.05);
}

.cn-sync-btn:disabled {
  opacity: .4;
  cursor: default;
  box-shadow: none;
  transform: none;
}

/* Token toast (slides from top-left) */

.cn-toast {
  position: fixed;
  top: 12px;
  left: 140px;
  z-index: 13000;
  transform: translateX(-120%);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}

.cn-toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.cn-toast__inner {
  background: var(--motd-bg, #000436);
  border: 1px solid var(--motd-border, #4400ff);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--motd-text, #d400ff);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  font-size: 14px;
  max-width: 260px;
}

/* Sync lock overlay (blocks games while syncing) */

#cn-sync-lock {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 15000;
}

#cn-sync-lock.cn-sync-lock--show {
  display: flex;
}

.cn-sync-lock__inner {
  background: #000000;
  border: 1px solid var(--cn-border);
  border-radius: 14px;
  padding: 16px 20px;
  color: var(--cn-accent);
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .8);
}

/* Logout confirm bubble */

#cn-logout-confirm {
  position: fixed;
  top: 96px;
  left: 12px;
  z-index: 10040;
  display: none;
}

#cn-logout-confirm.cn-logout-confirm--show {
  display: block;
}

.cn-logout-confirm__inner {
  background: var(--cn-bg);
  border: 1px solid var(--cn-border);
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
  color: var(--cn-text);
  min-width: 220px;
}

.cn-logout-confirm__text {
  margin-bottom: 8px;
  font-size: 14px;
}

.cn-logout-confirm__buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.cn-logout-confirm__btn {
  background: #000000;
  color: var(--cn-text);
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    color .3s ease,
    border-color .2s ease;
}

.cn-logout-confirm__btn:hover {
  color: var(--cn-accent);
  border-color: var(--cn-accent);
  box-shadow: 0 0 10px var(--cn-accent);
  transform: translateY(-1px) scale(1.03);
}

.cn-logout-confirm__btn--danger {
  border-color: #ff3b3b;
  color: #ffb3b3;
}

.cn-logout-confirm__btn--danger:hover {
  color: #ffffff;
  border-color: #ff3b3b;
  box-shadow: 0 0 12px #ff3b3b;
}

/* Account modal */

#cn-account-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  z-index: 14000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

#cn-account-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

#cn-account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  z-index: 14010;
  background: var(--cn-bg);
  border-radius: 16px;
  border: 1px solid var(--cn-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .8);
  width: min(360px, 92vw);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}

#cn-account-modal.open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.cn-acc__inner {
  display: flex;
  flex-direction: column;
}

.cn-acc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cn-border);
}

.cn-acc__title {
  margin: 0;
  font-size: 16px;
  color: var(--cn-text);
}

.cn-acc__close {
  background: #000000;
  border: 1px solid var(--cn-border);
  border-radius: 10px;
  padding: 4px 8px;
  color: var(--cn-text);
  font-weight: 700;
  cursor: pointer;
}

.cn-acc__body {
  padding: 12px 14px 14px 14px;
}

.cn-acc__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.cn-acc__tab {
  flex: 1;
  background: #000000;
  border-radius: 10px;
  border: 1px solid var(--cn-border);
  color: var(--cn-text);
  padding: 6px 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.cn-acc__tab--active {
  border-color: var(--cn-accent);
  color: var(--cn-accent);
  box-shadow: 0 0 10px var(--cn-accent);
}

.cn-acc__form {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.cn-acc__form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.cn-acc__form input[type="text"],
.cn-acc__form input[type="password"] {
  background: #000000;
  border-radius: 10px;
  border: 1px solid var(--cn-border);
  padding: 8px 10px;
  color: var(--cn-text);
  font-size: 14px;
  outline: none;
}

.cn-acc__form input::placeholder {
  color: #4400ff;
}

.cn-acc__primary {
  margin-top: 4px;
  background: linear-gradient(135deg, #d400ff, #1eff00);
  border: 1px solid #1eff00;
  border-radius: 12px;
  padding: 8px 10px;
  font-weight: 800;
  color: #000000;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.cn-acc__primary:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow:
    0 0 12px #1eff00,
    0 0 24px #d400ff;
  filter: brightness(1.05);
}

.cn-acc__primary:disabled {
  opacity: .6;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.cn-acc__status {
  margin: 6px 0 0 0;
  min-height: 1.2em;
  font-size: 12px;
  color: var(--cn-accent);
}

.cn-sync-countdown {
  position: fixed;
  left: 12px;
  bottom: 20px; /* bottom-left now */
  z-index: 10035;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(68, 0, 255, 0.8);
  color: var(--cn-text, #d400ff);
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.9;
}

.cn-sync-countdown__line {
  white-space: nowrap;
}

.cn-sync-countdown__line + .cn-sync-countdown__line {
  margin-top: 2px;
}

.cn-sync-countdown strong {
  font-weight: 700;
}

