/* theme-gbc.css: Game Boy Color / Neo Geo Pocket Color Translucent Handheld Console */

body[data-theme-layout="gbc"],
[data-theme-layout="gbc"] body {
  background-color: #1a0f2b;
  background-image:
    radial-gradient(ellipse at 50% 20%, rgba(77, 36, 128, 0.45) 0%, transparent 70%),
    radial-gradient(circle at 80% 85%, rgba(61, 26, 105, 0.35) 0%, transparent 50%),
    linear-gradient(#140b22 1px, transparent 1px),
    linear-gradient(90deg, #140b22 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  background-attachment: fixed;
  color: #0f380f;
  min-height: 100vh;
  padding: 1.5rem 0.75rem 3.5rem;
  box-sizing: border-box;
}

body[data-theme-layout="gbc"] .bg,
body[data-theme-layout="gbc"]::before {
  display: none !important;
}

body[data-theme-layout="gbc"] main,
[data-theme-layout="gbc"] body main {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  padding: 1.8rem 1.4rem 230px;
  background:
    radial-gradient(circle at 50% 0%, rgba(145, 85, 220, 0.22) 0%, transparent 60%),
    radial-gradient(circle at 15% 75%, rgba(105, 45, 175, 0.3) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(105, 45, 175, 0.3) 0%, transparent 45%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 18px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 18px),
    #341e54;
  border-radius: 28px 28px 60px 60px;
  border: 4px solid #23123a;
  box-shadow:
    inset 0 3px 6px rgba(255, 255, 255, 0.3),
    inset 0 -6px 12px rgba(0, 0, 0, 0.6),
    inset 4px 0 6px rgba(255, 255, 255, 0.1),
    inset -4px 0 6px rgba(0, 0, 0, 0.4),
    0 16px 40px rgba(10, 4, 18, 0.75);
}

body[data-theme-layout="gbc"] main::after {
  content: "";
  position: absolute;
  right: 2.2rem;
  bottom: 2.2rem;
  width: 68px;
  height: 44px;
  background:
    repeating-linear-gradient(-35deg, #180c29 0px, #180c29 4px, transparent 4px, transparent 11px);
  border-radius: 8px;
  opacity: 0.85;
  pointer-events: none;
}

body[data-theme-layout="gbc"] .player {
  position: static;
  background: #d4f0d4;
  border: 3px solid #0f380f;
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 1.4rem 1rem 0.6rem;
  margin-bottom: 0;
  box-shadow: inset 0 2px 4px rgba(15, 56, 15, 0.12);
}

body[data-theme-layout="gbc"] .player::before {
  content: "BATTERY [■■]  ·  COLOR LCD";
  display: block;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  color: #0f380f;
  text-align: left;
  margin-bottom: 0.8rem;
  padding-left: 1.35rem;
  position: relative;
}

body[data-theme-layout="gbc"] .player::after {
  content: "";
  position: absolute;
  top: 3.25rem;
  left: 2.5rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2222;
  box-shadow: 0 0 6px #ff2222, 0 0 10px rgba(255, 34, 34, 0.85);
}

body[data-theme-layout="gbc"] #sun,
body[data-theme-layout="gbc"] #moon {
  display: none !important;
}

body[data-theme-layout="gbc"] .avatar-slot {
  width: 88px;
  height: 88px;
  background: #d4f0d4;
  border: 3px solid #0f380f;
  box-shadow: 3px 3px 0 #8bac0f;
  margin-bottom: 0.6rem;
  animation: none;
}

body[data-theme-layout="gbc"] .avatar-slot img,
body[data-theme-layout="gbc"] .avatar-slot canvas {
  width: 78px;
  height: 78px;
  filter: contrast(1.15);
}

body[data-theme-layout="gbc"] h1 {
  color: #0f380f;
  font-size: 1.65rem;
  text-shadow: 2px 2px 0 #8bac0f;
  letter-spacing: 0.06em;
  margin: 0.2rem 0;
}

body[data-theme-layout="gbc"] .kana {
  color: #306230;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
}

body[data-theme-layout="gbc"] .tagline {
  color: #0f380f;
  font-size: 0.96rem;
  margin-bottom: 0.75rem;
}

body[data-theme-layout="gbc"] .divider {
  background: #d4f0d4;
  color: #0f380f;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  padding: 0.4rem 0.8rem;
  margin: 0;
  border-left: 3px solid #0f380f;
  border-right: 3px solid #0f380f;
  box-sizing: border-box;
}

body[data-theme-layout="gbc"] .divider::before,
body[data-theme-layout="gbc"] .divider::after {
  border-top: 2px solid #0f380f;
  opacity: 0.9;
}

body[data-theme-layout="gbc"] .worlds {
  background: #d4f0d4;
  border: 3px solid #0f380f;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 0.85rem 0.75rem 1rem;
  gap: 0.75rem;
  position: relative;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(15, 56, 15, 0.035) 0px,
    rgba(15, 56, 15, 0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  box-shadow: inset 0 2px 6px rgba(15, 56, 15, 0.15);
  counter-reset: gbc-cartridge;
}

body[data-theme-layout="gbc"] .world {
  background: #e4f7e4;
  border: 2px solid #0f380f;
  box-shadow: 3px 3px 0 #8bac0f;
  padding: 0.7rem 0.8rem;
  color: #0f380f;
  border-radius: 0;
  animation: none;
  transition: transform 0.05s steps(2, end), background-color 0.05s steps(2, end), color 0.05s steps(2, end);
}

body[data-theme-layout="gbc"] .world:hover,
body[data-theme-layout="gbc"] .world:focus-visible {
  background: #0f380f;
  color: #d4f0d4;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #306230;
}

body[data-theme-layout="gbc"] .world:hover .wname,
body[data-theme-layout="gbc"] .world:focus-visible .wname,
body[data-theme-layout="gbc"] .world:hover .blurb,
body[data-theme-layout="gbc"] .world:focus-visible .blurb {
  color: #d4f0d4;
}

body[data-theme-layout="gbc"] .world:hover .badge,
body[data-theme-layout="gbc"] .world:focus-visible .badge {
  background: #d4f0d4;
  color: #0f380f;
  border-color: #d4f0d4;
}

body[data-theme-layout="gbc"] .world:hover .chip,
body[data-theme-layout="gbc"] .world:focus-visible .chip {
  border-color: #d4f0d4;
  color: #d4f0d4;
  background: rgba(212, 240, 212, 0.15);
}

body[data-theme-layout="gbc"] .world .wname::before {
  counter-increment: gbc-cartridge;
  content: "> [" counter(gbc-cartridge) "] ";
  font-family: 'Press Start 2P', monospace;
  font-size: 0.68rem;
  letter-spacing: 0;
  margin-right: 0.2rem;
}

body[data-theme-layout="gbc"] .icon-slot {
  width: 48px;
  height: 48px;
  background: #d4f0d4;
  border: 2px solid #0f380f;
  box-shadow: none;
}

body[data-theme-layout="gbc"] .icon-slot canvas {
  width: 36px;
  height: 36px;
}

body[data-theme-layout="gbc"] .wname {
  color: #0f380f;
  font-size: 0.74rem;
}

body[data-theme-layout="gbc"] .badge {
  background: #8bac0f;
  color: #0f380f;
  border: 1px solid #0f380f;
  box-shadow: none;
  font-size: 0.48rem;
}

body[data-theme-layout="gbc"] .blurb {
  color: #306230;
  font-size: 0.9rem;
  line-height: 1.35;
}

body[data-theme-layout="gbc"] .chip {
  border: 1px solid #0f380f;
  color: #0f380f;
  background: #c2e2c2;
  box-shadow: none;
  font-size: 0.7rem;
}

body[data-theme-layout="gbc"] .socials {
  position: absolute;
  bottom: 60px;
  left: 1.6rem;
  right: 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
  z-index: 10;
}

body[data-theme-layout="gbc"] .slot-btn {
  background: radial-gradient(circle at 35% 35%, #2c1a45, #1e1330);
  border: 2px solid #10081c;
  box-shadow: 0 4px 0 #0d0617, 0 6px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.06s steps(2, end), box-shadow 0.06s steps(2, end);
}

body[data-theme-layout="gbc"] .slot-btn:hover {
  transform: translateY(1px);
  box-shadow: 0 3px 0 #0d0617, 0 4px 6px rgba(0, 0, 0, 0.5);
}

body[data-theme-layout="gbc"] .slot-btn:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 #0d0617, 0 2px 3px rgba(0, 0, 0, 0.4);
}

body[data-theme-layout="gbc"] .slot-btn[href*="github"] {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #b31e45, #750e28);
  border-color: #3b0613;
  box-shadow: 0 4px 0 #28030b, 0 6px 8px rgba(0, 0, 0, 0.5);
  order: 7;
}

body[data-theme-layout="gbc"] .slot-btn[href*="github"]::after {
  content: "A";
  position: absolute;
  bottom: -18px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #ff4d79;
  font-weight: bold;
}

body[data-theme-layout="gbc"] .slot-btn[data-copy*=".furphy"] {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #9b1937, #600c20);
  border-color: #3b0613;
  box-shadow: 0 4px 0 #28030b, 0 6px 8px rgba(0, 0, 0, 0.5);
  order: 6;
}

body[data-theme-layout="gbc"] .slot-btn[data-copy*=".furphy"]::after {
  content: "B";
  position: absolute;
  bottom: -18px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.65rem;
  color: #ff4d79;
  font-weight: bold;
}

body[data-theme-layout="gbc"] .slot-btn[data-copy*="furphy#1270"] {
  width: 58px;
  height: 26px;
  border-radius: 12px;
  transform: rotate(-25deg);
  background: #1e1330;
  border: 2px solid #0d0617;
  box-shadow: 0 3px 0 #0d0617;
  order: 4;
}

body[data-theme-layout="gbc"] .slot-btn[data-copy*="furphy#1270"]::after {
  content: "START";
  position: absolute;
  bottom: -18px;
  transform: rotate(25deg);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.48rem;
  color: #9d8db8;
}

body[data-theme-layout="gbc"] .slot-btn[href*="instagram"] {
  width: 58px;
  height: 26px;
  border-radius: 12px;
  transform: rotate(-25deg);
  background: #1e1330;
  border: 2px solid #0d0617;
  box-shadow: 0 3px 0 #0d0617;
  order: 3;
}

body[data-theme-layout="gbc"] .slot-btn[href*="instagram"]::after {
  content: "SELECT";
  position: absolute;
  bottom: -18px;
  transform: rotate(25deg);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.48rem;
  color: #9d8db8;
}

body[data-theme-layout="gbc"] .slot-btn[href*="raider.io"] {
  border-radius: 6px;
  background: #1a1226;
  order: 1;
}

body[data-theme-layout="gbc"] .slot-btn[href*="warcraftlogs"] {
  border-radius: 6px;
  background: #1a1226;
  order: 2;
}

body[data-theme-layout="gbc"] .slot-btn[href*="mailto"] {
  border-radius: 6px;
  background: #1a1226;
  order: 5;
}

body[data-theme-layout="gbc"] footer {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  color: #b09ec4;
  font-size: 0.78rem;
}

body[data-theme-layout="gbc"] footer .press {
  color: #ffd166;
  font-size: 0.52rem;
  letter-spacing: 0.15em;
}

/* Dark Mode: Backlit LCD */
@media (prefers-color-scheme: dark) {
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .player,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .divider,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .worlds {
    background-color: #1b2e1b;
    border-color: #385a38;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .player::before {
    color: #a8cc10;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .avatar-slot {
    background: #1b2e1b;
    border-color: #8bac0f;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) h1 {
    color: #a8cc10;
    text-shadow: 2px 2px 0 #102010;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .kana,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .tagline,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .divider {
    color: #8bac0f;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world {
    background: #233a23;
    border-color: #486a48;
    color: #a8cc10;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world .wname {
    color: #a8cc10;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world .blurb {
    color: #90b820;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world:hover,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world:focus-visible {
    background: #8bac0f;
    color: #0f200f;
  }
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world:hover .wname,
  body[data-theme-layout="gbc"]:not([data-theme="light"]) .world:hover .blurb {
    color: #0f200f;
  }
}

body[data-theme-layout="gbc"][data-theme="dark"] .player,
body[data-theme-layout="gbc"][data-theme="dark"] .divider,
body[data-theme-layout="gbc"][data-theme="dark"] .worlds {
  background-color: #1b2e1b;
  border-color: #385a38;
}
body[data-theme-layout="gbc"][data-theme="dark"] .player::before {
  color: #a8cc10;
}
body[data-theme-layout="gbc"][data-theme="dark"] .avatar-slot {
  background: #1b2e1b;
  border-color: #8bac0f;
}
body[data-theme-layout="gbc"][data-theme="dark"] h1 {
  color: #a8cc10;
  text-shadow: 2px 2px 0 #102010;
}
body[data-theme-layout="gbc"][data-theme="dark"] .kana,
body[data-theme-layout="gbc"][data-theme="dark"] .tagline,
body[data-theme-layout="gbc"][data-theme="dark"] .divider {
  color: #8bac0f;
}
body[data-theme-layout="gbc"][data-theme="dark"] .world {
  background: #233a23;
  border-color: #486a48;
  color: #a8cc10;
}
body[data-theme-layout="gbc"][data-theme="dark"] .world .wname {
  color: #a8cc10;
}
body[data-theme-layout="gbc"][data-theme="dark"] .world .blurb {
  color: #90b820;
}
body[data-theme-layout="gbc"][data-theme="dark"] .world:hover,
body[data-theme-layout="gbc"][data-theme="dark"] .world:focus-visible {
  background: #8bac0f;
  color: #0f200f;
}
body[data-theme-layout="gbc"][data-theme="dark"] .world:hover .wname,
body[data-theme-layout="gbc"][data-theme="dark"] .world:hover .blurb {
  color: #0f200f;
}

body[data-theme-layout="gbc"] a:focus-visible,
body[data-theme-layout="gbc"] button:focus-visible {
  outline: 3px solid #ff3366 !important;
  outline-offset: 3px !important;
}

@media (max-width: 480px) {
  body[data-theme-layout="gbc"] .socials {
    position: static;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
  }
  body[data-theme-layout="gbc"] .slot-btn[data-copy*="furphy#1270"],
  body[data-theme-layout="gbc"] .slot-btn[href*="instagram"] {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-theme-layout="gbc"] *,
  body[data-theme-layout="gbc"] *::before,
  body[data-theme-layout="gbc"] *::after {
    animation: none !important;
    transition: none !important;
  }
}
