/* ============================
   GLOBAL RESET + BACKGROUND
============================ */
body {
  margin: 0;
  height: 100vh;
  background: url("assets/hub_bg.png") center center / cover no-repeat;
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
}

button {
  font-family: monospace;
}


/* ============================
   TOP BAR (LOGO + NAV)
============================ */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(0,0,0,0.25));
}

/* SWEETAS LOGO TOP LEFT */
#sweetas-header {
  text-align: left;
}

#sweetas-logo {
  width: 160px;
  filter: drop-shadow(0 0 10px #ff00ff) drop-shadow(0 0 20px #00ffff);
}

#sweetas-text {
  margin-top: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 8px #ff00ff, 0 0 12px #00ffff;
  font-family: monospace;
}


/* ============================
   HUB MENU BUTTONS (TOP)
=========================== */
#hub-menu {
  text-align: right;
}

.hub-btn {
  background: rgba(0,0,0,0.6);
  border: 2px solid #fff;
  padding: 12px 24px;
  margin: 10px;
  font-size: 20px;
  color: #fff;
  cursor: pointer;
  border-radius: 6px;
  text-shadow: 0 0 6px #ff00ff;
}

.hub-btn:hover {
  background: rgba(255,0,255,0.4);
}


/* ============================
   PANELS
============================ */
.hub-panel {
  display: none;
  margin-top: 120px;
  text-align: center;
  color: #fff;
}

.h2 {
  font-size: 32px;
  text-shadow: 0 0 8px #00ffff;
}


/* ============================
   CAROUSEL CONTAINER
============================ */
#carouselContainer {
  width: 100vw;
  overflow: visible;
  margin-top: 40px;
}

#carousel {
  display: flex;
  gap: 40px;
  align-items: stretch;   /* every card the same height, whatever its text needs */
  transition: transform 0.3s ease-out;
}


/* ============================
   CAROUSEL ITEMS
   ============================ */
.carousel-item {
  width: 180px;
  /* was a fixed 180px, which pushed the title and the stats block
     straight out through the bottom of the card. Grow to fit instead. */
  min-height: 180px;
  background: rgba(0,0,0,0.5);
  border: 2px solid #fff;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  padding: 10px;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carousel-item img {
  width: 100%;
  height: auto;
  flex: 0 0 auto;   /* never squashed when the card grows */
}

.carousel-item-title {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.15;
  color: #fff;
  max-width: 100%;
  overflow-wrap: anywhere;   /* long names wrap instead of bleeding sideways */
}

/* Plays / Hi-Score / Champ — was completely unstyled, so it rendered in
   the default body font at 16px and ran out of the card. */
.carousel-stats {
  margin-top: 6px;
  font-family: monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #9aa8cc;
  max-width: 100%;
  overflow-wrap: anywhere;
}


.carousel-item.selected {
  transform: scale(1.2);
  border-color: #00ffff;
  box-shadow: 0 0 12px #00ffff;
}


/* ============================
   FALLBACK THUMB GRID
============================ */
.thumb-grid {
  display: none;
}

/* ============================
   COPYRIGHT (one per game card)
============================ */
.card-copy {
  margin-top: 8px;
  text-align: center;
  font-family: monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(255,255,255,0.32);
}

.thumb-item {
  width: 180px;
  background: rgba(0,0,0,0.5);
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 10px;
  margin: 10px;
  text-align: center;
  cursor: pointer;
}

.thumb-item img {
  width: 100%;
}

.thumb-title {
  margin-top: 8px;
  color: #fff;
  line-height: 1.15;
  overflow-wrap: anywhere;
}


/* ============================
   STATS PANEL — ARCADE BOARD
============================ */
.stats-board {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 20px 50px;
}

.stats-title {
  font-size: 26px;
  letter-spacing: 6px;
  color: #fff;
  font-family: monospace;
  text-shadow: 0 0 8px #00ffff, 0 0 16px #00ffff, 0 0 24px #ff00ff;
  margin-bottom: 10px;
}

.stats-title-deco {
  color: #ff00ff;
  text-shadow: 0 0 8px #ff00ff;
  margin: 0 14px;
}

.stat-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.stat-card {
  width: 320px;
  background: linear-gradient(160deg, rgba(20,20,40,0.9), rgba(5,5,20,0.95));
  border: 2px solid #00ffff;
  border-radius: 14px;
  padding: 20px;
  position: relative;
  font-family: monospace;
  text-align: left;
  box-shadow: 0 0 18px rgba(0,255,255,0.35), inset 0 0 24px rgba(0,0,0,0.7);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  animation: cardIn 0.5s ease-out both;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(0,255,255,0.55), inset 0 0 30px rgba(0,0,0,0.8);
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

.stat-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;   /* long titles were butting straight into the rank */
  border-bottom: 1px dashed rgba(255,255,255,0.3);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.stat-rank {
  font-size: 22px;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 0 0 8px #ffd700, 0 0 16px #ff8800;
  flex: 0 0 auto;
}

.stat-card-name {
  font-size: 20px;
  letter-spacing: 3px;
  min-width: 0;              /* let it shrink + wrap instead of pushing out */
  overflow-wrap: anywhere;
  text-align: right;
}

.glow-0 { color: #00ffff; text-shadow: 0 0 8px #00ffff, 0 0 16px #00ffff; }
.glow-1 { color: #ff00ff; text-shadow: 0 0 8px #ff00ff, 0 0 16px #ff00ff; }
.glow-2 { color: #ffff00; text-shadow: 0 0 8px #ffff00, 0 0 16px #ff8800; }

.stat-meter {
  margin-bottom: 12px;
}

.stat-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  letter-spacing: 2px;
  color: #9fe8ff;
  margin-bottom: 5px;
}

.stat-value {
  color: #fff;
  text-shadow: 0 0 6px #00ffff;
}

.meter-bg {
  height: 9px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 5px;
  overflow: hidden;
}

.meter-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s ease;
}

.meter-score {
  background: linear-gradient(90deg, #00ffff, #ff00ff);
  box-shadow: 0 0 8px #00ffff;
}

.meter-plays {
  background: linear-gradient(90deg, #ffff00, #ff8800);
  box-shadow: 0 0 8px #ffff00;
}

.meter-stage {
  background: linear-gradient(90deg, #00ff88, #00ffff);
  box-shadow: 0 0 8px #00ff88;
}

.stat-lines {
  margin-top: 12px;
  font-size: 12px;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.stat-line span:first-child {
  color: #9fe8ff;
  letter-spacing: 1px;
}

.stat-line span:last-child {
  color: #fff;
  text-align: right;
  text-shadow: 0 0 5px rgba(0,255,255,0.5);
}


/* ============================
   HALL OF FAME PANEL
============================ */

/* backdrop only exists while the tab is open (the panel is display:none
   otherwise), so the hall-of-fame art never shows behind the other tabs */
#panel-halloffame {
  position: relative;
  min-height: calc(100vh - 150px);
}

#panel-halloffame::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2,4,12,0.62), rgba(2,4,12,0.80) 45%, rgba(2,4,12,0.92)),
    url("assets/halloffame.png") center center / cover no-repeat;
  animation: hofBgIn 0.6s ease-out both;
}

@keyframes hofBgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #panel-halloffame::before { animation: none; }
}

.hof-sub {
  text-align: center;
  font-family: monospace;
  font-size: 12px;
  letter-spacing: 3px;
  color: #9fe8ff;
  margin-top: -4px;
  margin-bottom: 10px;
}

.hof-boards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 26px;
}

.hof-card {
  width: 340px;
  background: linear-gradient(160deg, rgba(20,20,40,0.9), rgba(5,5,20,0.95));
  border: 2px solid #ff00ff;
  border-radius: 14px;
  padding: 18px;
  font-family: monospace;
  text-align: left;
  box-shadow: 0 0 18px rgba(255,0,255,0.35), inset 0 0 24px rgba(0,0,0,0.7);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  animation: cardIn 0.5s ease-out both;
}

.hof-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 30px rgba(255,0,255,0.55), inset 0 0 30px rgba(0,0,0,0.8);
}

.hof-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px dashed rgba(255,255,255,0.3);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.hof-card-name {
  font-size: 18px;
  letter-spacing: 2px;
}

.hof-card-best {
  font-size: 12px;
  letter-spacing: 1px;
  color: #ffd700;
  text-shadow: 0 0 6px #ffd700;
  white-space: nowrap;
}

.hof-empty {
  font-size: 12px;
  letter-spacing: 1px;
  color: #8894b8;
  padding: 18px 0;
  text-align: center;
}

.hof-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hof-row {
  display: grid;
  grid-template-columns: 40px 78px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

.hof-row.champ {
  background: rgba(255,215,0,0.10);
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255,215,0,0.35);
}

.hof-place {
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #9fe8ff;
}

.hof-row.champ .hof-place {
  color: #ffd700;
  text-shadow: 0 0 6px #ffd700;
}

.hof-name {
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 8px #00ffff, 0 0 16px #00ffff;
  white-space: nowrap;
  overflow: hidden;
}

.hof-row.champ .hof-name {
  color: #ffd700;
  text-shadow: 0 0 10px #ffd700, 0 0 20px #ff8800;
}

.hof-score {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  text-align: right;
  text-shadow: 0 0 6px #00ff88;
}

.hof-date {
  font-size: 10px;
  color: #8894b8;
  letter-spacing: 1px;
}


/* ============================
   CHATCLOUD BANNER
============================ */
#chatcloud-banner {
  max-width: 720px;
  margin: 60px auto 0;
  padding: 50px 40px;
  cursor: pointer;
  border: 2px solid #00ffff;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(0,40,60,0.92), rgba(10,10,30,0.96));
  font-family: monospace;
  color: #fff;
  box-shadow: 0 0 24px rgba(0,255,255,0.45), inset 0 0 40px rgba(0,0,0,0.6);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: cardIn 0.5s ease-out both;
}

#chatcloud-banner:hover {
  transform: scale(1.03);
  box-shadow: 0 0 40px rgba(0,255,255,0.75), inset 0 0 50px rgba(0,0,0,0.6);
}

.cc-title {
  font-size: 40px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 10px #00ffff, 0 0 24px #00ffff, 0 0 40px #ff00ff;
  margin-bottom: 12px;
}

.cc-subtitle {
  font-size: 20px;
  letter-spacing: 3px;
  color: #ff00ff;
  text-shadow: 0 0 8px #ff00ff;
  margin-bottom: 24px;
}

.cc-text {
  font-size: 16px;
  line-height: 1.7;
  color: #9fe8ff;
  margin-bottom: 28px;
}

.cc-welcome {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 5px;
  color: #ffd700;
  text-shadow: 0 0 8px #ffd700, 0 0 16px #ff8800;
  animation: welcomePulse 2s ease-in-out infinite;
}

@keyframes welcomePulse {
  0%, 100% { text-shadow: 0 0 8px #ffd700, 0 0 16px #ff8800; }
  50%      { text-shadow: 0 0 16px #ffd700, 0 0 32px #ff8800; }
}
/* ============================
   STICKMAN BANNER
   ============================ */
.stickman-banner {
  position: fixed;
  top: 180px;
  left: 0;
  right: 0;
  z-index: 2000;
  background: linear-gradient(160deg, rgba(20,20,40,0.96), rgba(10,10,30,0.98));
  border: 2px solid #ff00ff;
  border-radius: 18px;
  padding: 24px 36px;
  max-width: 600px;
  margin: 0 auto;
  color: #fff;
  font-family: monospace;
  box-shadow: 0 0 30px rgba(255,0,255,0.5), inset 0 0 30px rgba(0,0,0,0.8);
  animation: bannerIn 0.5s ease-out both;
  display: none;
}

.stickman-banner.show {
  display: block;
}

@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: none; }
}

.stickman-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-direction: column;
  text-align: center;
}

.stickman-banner-title {
  font-size: 28px;
  font-weight: bold;
  letter-spacing: 4px;
  color: #ff00ff;
  text-shadow: 0 0 10px #ff00ff, 0 0 20px #ff8800;
  margin-bottom: 8px;
}

.stickman-banner-message {
  font-size: 18px;
  letter-spacing: 2px;
  color: #9fe8ff;
  margin-bottom: 20px;
}

.stickman-banner-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
}

.stickman-banner-close:hover {
  color: #fff;
  text-shadow: none;
}

/* ============================
   INPUT / CONTROLLER STATUS
   ============================ */
#input-status {
  margin: 56px auto 40px;
  max-width: 900px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-family: monospace;
  color: #9aa8cc;
}

.is-label {
  color: #00eaff;
  text-shadow: 0 0 8px #00eaff;
  font-weight: bold;
  letter-spacing: 2px;
  align-self: center;
  font-size: 13px;
}

.is-slot {
  background: rgba(5, 10, 25, 0.7);
  border: 1px solid rgba(0, 234, 255, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
}

.is-slot.active {
  border-color: #00eaff;
  color: #00eaff;
  box-shadow: 0 0 12px rgba(0, 234, 255, 0.35);
}
