:root { --contentMax: 1200px; }

/* ===============================
   Global page basics
   =============================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #0e1a22;
  color: #fff;
  padding: 20px; /* dashboard had padding; keep it global unless you want per-page */
}

h2, h3 { margin-bottom: 10px; }

/* Shared clamp container */
.hc-container{
  max-width: var(--contentMax);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}
/* Dashboard wants "clean parchment", not "dungeon at midnight" */
body.page-dashboard{
  background:#ffffff;
  color:#000000;
}

/* ===============================
   HeroClass World index CSS
   =============================== */

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 18px;
  background:rgba(10,16,22,.85);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.brand a{
  color:#fff;
  text-decoration:none;
  font-weight:600;
  font-size:18px;
}

.nav{
  display:flex;
  gap:18px;
  align-items:center;
}

.nav a{
  color:#fff;
  text-decoration:none;
  opacity:.9;
}

.nav a:hover{
  opacity:1;
}

.dropdown{
  position: relative;
  display: inline-block;
}

/* make the trigger a real box so hover area is solid */
.dropdown > a{
  display: inline-block;
  padding: 10px 12px;
}

/* menu */
.dropdown-content{
  display: none;
  position: absolute;
  top: 100%;        /* ✅ directly below the trigger */
  left: 0;
  margin-top: 0;    /* ✅ no gap */
  background: #12202b;
  min-width: 220px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
  z-index: 9999;    /* ✅ stay above aura/background */
}


/* optional: hover buffer to prevent micro-gaps from rounding/layout */
.dropdown-content::before{
  content:"";
  position:absolute;
  left:0; right:0;
  top:-10px;
  height:10px;
}
/* Dropdown container */
.dropdown{
  position: relative;
}

/* The clickable label */
.dropdown > a{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 10px;
}

/* Dropdown menu panel */
.dropdown-content{
  display: none;               /* hidden until .show */
  position: absolute;
  top: calc(100% + 10px);      /* below the label */
  left: 0;

  min-width: 240px;
  padding: 8px;

  background: rgba(18, 32, 43, 0.96);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);

  z-index: 9999;
}

/* Show when JS toggles it */
.dropdown-content.show{
  display: block;
}

/* Menu items */
.dropdown-content a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;

  font-size: 14px;
  line-height: 1.1;
  white-space: nowrap;

  color: rgba(255,255,255,.92);
  text-decoration: none;
}

/* Hover */
.dropdown-content a:hover{
  background: rgba(255,255,255,.08);
}

/* Optional: keep menu aligned nicely even near edges */
.dropdown:last-child .dropdown-content{
  left: auto;
  right: 0;
}
.dropdown-content{
  opacity:0;
  transform:translateY(-6px);
  transition:opacity .15s ease, transform .15s ease;
}

.dropdown-content.show{
  display:block;
  opacity:1;
  transform:translateY(0);
}
.returnBtn{
  margin-left: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  color: #fff;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(3px);
  transition: .12s ease;
}

.returnBtn:hover{
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.book-intro {
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
  color: white;
}

.book-intro h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.book-intro p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.ascendedIntro p{
  margin: 10px 0;
  color: rgba(255,255,255,.78);
  line-height: 1.55;
}
.ascendedIntro .oath{
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 4px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.22);
  border-radius: 12px;
  color: rgba(255,255,255,.90);
  font-style: italic;
}

.subhead{
  margin: 18px 0 12px;
  font-size: 1.15rem;
}

.milestones{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.mile{
  background: rgba(0,0,0,.32);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 14px;
}

.mile .lvl{
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 1.05rem;
}
.mile .req{
  margin-top: 4px;
  color: rgba(255,255,255,.70);
  font-size: .9rem;
}
.mile .perk{
  margin-top: 10px;
  color: rgba(255,255,255,.86);
  line-height: 1.45;
}

.ascendedGrid{
  margin-top: 18px;
  display: grid;

  /* 6 fixed columns on large screens */
  grid-template-columns: repeat(6, 1fr);

  gap: 16px;
  align-items: start;
}

/* Make cards visually lighter */
.ascCard{
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.12);
  text-align: center;
  transition: transform .2s ease;
}

.ascCard:hover{
  transform: translateY(-4px);
}

/* 👇 20% smaller treatment */
.ascCard img{
  width: 80%;              /* smaller than full width */
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: transparent; /* cleaner look */
}

.ascCard figcaption{
  margin-top: 8px;
  font-size: .9rem;
  color: rgba(255,255,255,.86);
  font-weight: 700;
}

@media (max-width: 1100px){
  .ascendedGrid{
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px){
  .ascendedGrid{
    grid-template-columns: repeat(2, 1fr);
  }
}

.world-page{
  position: relative;
  min-height: 100vh;
  color: #fff;
  overflow-x: hidden;

  /* Create a clean stacking context so ::before can't "win" */
  isolation: isolate;

  background:
    linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.65)),
    url("/images/heroclassbanner.webp");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* 🌌 Subtle animated color aura (always behind UI) */
.world-page::before{
  content: "";
  position: fixed;
  inset: 0;

  pointer-events: none;

  /* ✅ Force it behind everything inside .world-page */
  z-index: 0;

  background:
    radial-gradient(circle at 30% 40%,
      rgba(0, 150, 255, 0.08),
      transparent 60%
    ),
    radial-gradient(circle at 70% 60%,
      rgba(255, 140, 0, 0.06),
      transparent 65%
    );

  animation: drift 30s ease-in-out infinite alternate;
  transform: translateZ(0); /* helps smoothness on some browsers */
}

/* ✅ Make sure your header/nav sit above the aura */
.world-page .topbar{
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* If you have any main content wrapper, keep it above too */
.world-page > *{
  position: relative;
  z-index: 1;
}

/* Slow atmospheric movement */
@keyframes drift{
  0%{
    transform: translate(0, 0) scale(1);
  }
  100%{
    transform: translate(-40px, -30px) scale(1.05);
  }
}

/* ===============================
   Teacher Dashboard Tickertape
   =============================== */

.ticker{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:12px;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.10);
  overflow:hidden;
}
.ticker-label{
  font-weight:800;
  opacity:.95;
  white-space:nowrap;
}
.ticker-track{
  position:relative;
  overflow:hidden;
  flex:1;
}
.ticker-text{
  display:inline-block;
  white-space:nowrap;
  padding-left:100%;
  animation: tickerScroll 90s linear infinite;
  opacity:.95;
}
@keyframes tickerScroll{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-100%); }
}
.ticker-top{
  position: sticky;
  top: 0;
  z-index: 999;
  margin: 0;
  border-radius: 0;
  width: 100%;
}

/* ===============================
   Common layout helpers
   =============================== */

/* Banner */
#banner{
  width: 100%;
  max-width: var(--contentMax);
  height: auto;
  max-height: 300px;
  margin: 90px auto 40px auto;
  display: block;
  object-fit: contain;
}

/* Player area (dashboard) */
#playerArea{
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  max-width: var(--contentMax);
  margin: 0 auto;
  gap: 30px;
}

#playerImageContainer img,
#playerImage{
  width: 600px !important;
  height: auto !important;
  max-height: 1000px;
  border-radius: 15px;
  display: block;
}

#rightPanel{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Power list grid (dashboard) */
#powerList{
  max-width: var(--contentMax);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, 140px);
  justify-content: center;
  gap: 20px;
}

/* If you want headings to align with container */
.hc-container h2,
.hc-container h3{
  margin-left: 0;
  margin-right: 0;
}

/* Make sure these aren’t fighting the container width */
#banner,
#playerArea,
#stats,
#powerList{
  max-width: none !important;
  width: 100%;
}

@keyframes xpPulse {
  from {
    box-shadow: 0 0 6px gold;
  }
  to {
    box-shadow: 0 0 18px orange;
  }
}
/* ===============================
   Dashboard Stats Card Upgrade
   =============================== */

.page-dashboard #stats.stats-card{
  position: relative;
  z-index: 1;
  color: #f3f7ff;
  background:
    linear-gradient(180deg, rgba(8,14,24,.72), rgba(12,20,32,.64));
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow:
    0 16px 40px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.06);
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* subtle glow bits */
.page-dashboard #stats.stats-card::before{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,210,80,.12), transparent 25%),
    radial-gradient(circle at 85% 25%, rgba(60,160,255,.12), transparent 30%);
}

/* top row */
.stats-header{
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.player-title-wrap{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name{
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 900;
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: .2px;
}

.player-subtitle{
  font-size: .95rem;
  font-weight: 700;
  color: #c8d5e6;
  letter-spacing: .3px;
}

.level-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: .95rem;
  font-weight: 900;
  color: #1a1a1a;
  background: linear-gradient(180deg, #ffe27a, #ffb700);
  box-shadow:
    0 6px 18px rgba(255,183,0,.28),
    inset 0 1px 0 rgba(255,255,255,.45);
}

/* meta grid */
.player-meta{
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.meta-card{
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.meta-label{
  display: block;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #9db0c6;
  margin-bottom: 4px;
}

.meta-value{
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
}

/* stat rows */
.stat-block{
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.stat-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.stat-label{
  font-size: 1rem;
  font-weight: 800;
  color: #f3f7ff;
  letter-spacing: .2px;
}

.stat-value{
  font-size: .9rem;
  font-weight: 900;
  color: #161616;
  background: linear-gradient(180deg, #fff5bf, #ffd558);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.stat-bar{
  position: relative;
  height: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.28);
}

.stat-fill{
  position: relative;
  height: 100%;
  border-radius: inherit;
  transition: width .35s ease;
}

.stat-fill::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.22) 45%,
    rgba(255,255,255,0) 72%
  );
  animation: statSheen 2.8s linear infinite;
}

.stat-fill-xp{
  background: linear-gradient(90deg, #ffd000, #ff9e00);
  box-shadow: 0 0 14px rgba(255,190,0,.34);
}

.stat-fill-health{
  background: linear-gradient(90deg, #ff1f1f, #ff6363);
  box-shadow: 0 0 12px rgba(255,60,60,.30);
}

.stat-fill-crystals{
  background: linear-gradient(90deg, #2c8fff, #57d5ff);
  box-shadow: 0 0 12px rgba(70,170,255,.30);
}

/* optional "near level up" glow for XP */
.stat-fill-xp.is-near-level{
  animation: xpNearLevelPulse 1.2s ease-in-out infinite alternate;
}

@keyframes statSheen{
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}

@keyframes xpNearLevelPulse{
  from{
    box-shadow: 0 0 10px rgba(255,190,0,.30), 0 0 18px rgba(255,145,0,.18);
  }
  to{
    box-shadow: 0 0 18px rgba(255,210,0,.55), 0 0 26px rgba(255,145,0,.28);
  }
}

/* hover polish */
.page-dashboard #stats.stats-card:hover{
  border-color: rgba(255,220,120,.18);
  box-shadow:
    0 18px 46px rgba(0,0,0,.25),
    inset 0 1px 0 rgba(255,255,255,.07);
}

/* mobile */
@media (max-width: 640px){
  .page-dashboard #stats.stats-card{
    padding: 14px;
    border-radius: 18px;
  }

  .player-name{
    font-size: 1.25rem;
  }

  .player-meta{
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-bar{
    height: 20px;
  }

  .stat-value{
    font-size: .82rem;
  }
}

/* ===============================
   Tickertape
   =============================== */
#tickertape-container{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  color: #000;
  padding: 6px 10px;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 2px solid #ccc;
  z-index: 9999;
}

#tickertape{
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 90s linear infinite;
}

@keyframes ticker-scroll{
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-100%); }
}

/* ===== Create Class Modal ===== */
.modal-overlay{
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,0.55);
  z-index: 999999; /* bump it so nothing flexes over it */
}

.modal-overlay.show{
  display: flex;
  align-items: center;
  justify-content: center;
}


.modal-panel{
  width: min(520px, 92vw);
  background: rgba(255,255,255,0.94);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
  color: #111;
  font-family: system-ui, Arial, sans-serif;
}

.modal-panel h2{
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 800;
}

.modal-panel label{
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 10px 0 6px;
}

.modal-panel input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  outline: none;
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.modal-actions button{
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.85);
}

.modal-actions button#btnCreateClassConfirm{
  border: none;
  background: rgba(37,99,235,0.92);
  color: white;
}

/* Dashboard “Home Village” panel */
.page-dashboard .home-panel{
  position: relative;
  border-radius: 24px;
  padding: 20px;
  margin: 14px 0 22px;
  overflow: hidden;

  background:
    linear-gradient(rgba(10,18,28,.55), rgba(10,18,28,.65)),
    url("/images/home.webp");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 20px 50px rgba(0,0,0,.28);
}

.page-dashboard .home-panel::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,215,0,.12), transparent 28%),
    radial-gradient(circle at 85% 70%, rgba(0,153,255,.10), transparent 32%);
}

.page-dashboard #stats{
  position: relative;
  z-index: 1;
  color: #f4f7fb;
  background: rgba(9,14,22,.52);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 18px 18px 16px;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}

.page-dashboard #stats strong,
.page-dashboard #stats b{
  color: #ffd86b;
  letter-spacing: .4px;
  text-transform: uppercase;
  font-size: .9rem;
}
.stat-block{
  margin-top: 18px;
}

.stat-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.stat-label{
  font-size: 1rem;
  font-weight: 800;
  color: #f4f7fb;
  letter-spacing: .3px;
}

.stat-value{
  font-size: .95rem;
  font-weight: 900;
  color: #111;
  background: linear-gradient(180deg, #fff6bf, #ffd54a);
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}

.stat-bar{
  height: 22px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.14);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0,0,0,.28);
}

.stat-fill{
  height: 100%;
  border-radius: inherit;
  position: relative;
}

.stat-fill::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,.22) 45%,
    rgba(255,255,255,0) 70%
  );
  animation: sheen 2.8s linear infinite;
}

.xp-fill{
  background: linear-gradient(90deg, #ffd000, #ff9d00);
  box-shadow: 0 0 14px rgba(255,196,0,.45);
}

.health-fill{
  background: linear-gradient(90deg, #ff2a2a, #ff5b5b);
  box-shadow: 0 0 12px rgba(255,60,60,.35);
}

.crystal-fill{
  background: linear-gradient(90deg, #2a8cff, #59d0ff);
  box-shadow: 0 0 12px rgba(64,170,255,.35);
}

@keyframes sheen{
  from { transform: translateX(-120%); }
  to   { transform: translateX(120%); }
}
/* ===============================
   Secret Power theming
   =============================== */
/* Force overlay to cover viewport */
#secretOverlay.modal-overlay{
  position: fixed;
  inset: 0;
  z-index: 9998;
}

/* Force modal to sit centered above everything */
#secretModal.secret-modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
}

.secret-modal{
  width: min(640px, 94vw);
  max-height: min(78vh, 720px);
  overflow: hidden;
  position: relative;

  /* The art */
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.30), rgba(0,0,0,0.55)),
    url("/images/secret.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.secret-header{
  padding: 18px 18px 10px 18px;
}

.secret-header h2{
  margin: 0;
  letter-spacing: 0.2px;
}

.secret-header p{
  margin: 6px 0 0 0;
  opacity: 0.85;
}

/* Scrollable choice area */
.secret-choices{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 18px 18px 18px;
  overflow: auto;
  max-height: calc(78vh - 140px);
}

/* Each choice rendered as a “card row” */
.secret-choice{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(6px);
}

.secret-choice span{
  line-height: 1.25;
  font-size: 15px;
}

/* A small, tasteful pick button */
.secret-pick-btn{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.94);
  cursor: pointer;
  white-space: nowrap;
}
.secret-pick-btn:hover{
  background: rgba(255,255,255,0.20);
}

.secret-actions{
  padding: 0 18px 18px 18px;
  display: flex;
  justify-content: center;
}

/* ===============================
   Modal (generic)
   =============================== */
#modalOverlay{
  background: rgba(0,0,0,.6);
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

#modalNotification{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: #fff;
  color: #000;
  padding: 20px 30px;
  border: 2px solid #444;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
  z-index: 1000;
  display: none;
  max-width: 80%;
  text-align: center;
}

#modalNotification button{
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 16px;
  border: none;
  background: #007BFF;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}

#modalNotification button:hover{
  background: #0056b3;
}

/* ===============================
   Logout
   =============================== */
#logoutBtn{
  margin-top: 20px;
  background: #f44336;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

#logoutBtn:hover{
  background: #da190b;
}
/* ===============================
   Back to Hub button (dashboard & bank)
   =============================== */
.hub-back-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 12px;
  border: 2px solid rgba(255,215,0,0.85);

  background: rgba(0,0,0,0.55);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;

  cursor: pointer;
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  box-shadow: 0 7px #999;
  transition: transform .1s, box-shadow .1s, filter .1s;
}

.hub-back-btn:hover{
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px #666;
}

.hub-back-btn:active{
  transform: translateY(1px);
  box-shadow: 0 5px #333;
  filter: brightness(0.9);
}

/* ===============================
   Universal power button
   =============================== */
.power-button{
  width: 140px;
  height: 140px;
  border-radius: 15px;
  margin: 10px;
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  font-size: 16px;
  font-weight: bold;
  word-wrap: break-word;
  cursor: pointer;
  border: 5px solid gold;
  box-shadow: 0 9px #999;
  transition: transform .1s, box-shadow .1s, filter .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 2px 2px 4px rgba(0,0,0,.7);
}

.power-button:hover{
  filter: brightness(1.2);
  transform: scale(1.05);
  box-shadow: 0 6px #666;
}

.power-button:active{
  transform: scale(0.95);
  box-shadow: 0 5px #333;
  filter: brightness(0.9);
}

.power-button:disabled{
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.2);
}

/* Smaller KCE buttons (safe to keep even if KCE removed from dashboard) */
.kce-button{
  width: 100px;
  height: 100px;
  font-size: 11px;
  margin: 6px;
}

#secondPetImage.second-pet-image{
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 15px;
  border: 5px solid gold;
  box-shadow: 0 9px #999;
  margin: 10px;
  background: white;
  display: block;
}

/* ===============================
   Shared banner divider
   =============================== */
#banner-divider{
  width: 100%;
  clear: both;
  margin: 40px 0 20px 0;
  text-align: center;
  padding: 0 40px;
  box-sizing: border-box;
}

#banner-divider img{
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  display: block;
}

/* ===============================
   Bank buttons layout (safe to keep; only used where bank exists)
   =============================== */
#bank-buttons{
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

#bank-buttons .bank-row{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
  width: 100%;
}

@media (max-width: 900px){
  #bank-buttons .bank-row{
    flex-wrap: wrap;
  }
}

#bank-buttons .store-item{
  display: flex;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* Text overlay for ALL buttons (if you still use it anywhere) */
#bank-buttons .bank-overlay{
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: center;
  border-radius: 8px;
  color: #fff;
  background: rgba(0,0,0,0.65);
  text-shadow: 0 1px 2px rgba(0,0,0,0.9);
  pointer-events: none;
}

/* ===============================
   Caveat Emptor / Store button feel (also used by bank buttons in your build)
   =============================== */
.CaveatEmptor-button{
  box-shadow: 0 9px #999;
  transition: transform .1s, box-shadow .1s, filter .1s;
}

.CaveatEmptor-button:hover{
  filter: brightness(1.15);
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px #666;
}

.CaveatEmptor-button:active{
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 5px #333;
  filter: brightness(0.95);
}

/* Store grid */
.store-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  justify-items: center;
  align-items: start;
}

.store-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.store-label{
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #f9f3d9;
  text-shadow: 0 2px 3px rgba(0,0,0,0.6);
  max-width: 160px;
}

/* ===============================
   Utility
   =============================== */
pre{
  background: #f7f7f7;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
  color: #000; /* pre blocks were dark-text in your old HTML */
}

body.has-layout html {
  overflow: hidden;
}

/* Make the app frame fill the viewport */
body.has-layout .layout {
  height: 100vh;
  overflow: hidden;
}

/* Let only the inner panes scroll */
body.has-layout .layout > aside,
body.has-layout .layout > main {
  min-height: 0;
  overflow: auto;
}


/* Make the app frame fill the viewport */
.layout {
  height: 100vh;
  overflow: hidden;
}

/* Let only the inner panes scroll */
.layout > aside,
.layout > main {
  min-height: 0;     /* important for flex layouts */
  overflow: auto;
}
/* ===============================
   Teacher roster controls
   =============================== */

#teacherStudentSearch,
#teacherStudentSort {
  background: #0f172a;
  color: #e5e7eb !important;
  border: 1px solid rgba(148,163,184,0.35);
}

#teacherStudentSearch::placeholder {
  color: rgba(229,231,235,0.5);
}

/* Style the dropdown options */
#teacherStudentSort option {
  background: #0f172a;
  color: #e5e7eb;
}

/* ===============================
   Teacher Custom Powers
   =============================== */

body.page-custom-powers{
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 205, 93, 0.12), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(63, 157, 255, 0.12), transparent 30%),
    linear-gradient(180deg, #0e1a22, #081018);
  color: #f4f7fb;
}

.customPowersPage{
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 48px;
}

.customPowersShell,
.customPowersList,
#powersByClass{
  display: grid;
  gap: 16px;
}

.customPowersHero{
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 22px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255,255,255,.13);
  background: linear-gradient(135deg, rgba(15,28,42,.94), rgba(22,31,44,.82));
  box-shadow: 0 24px 70px rgba(0,0,0,.36);
}

.customPowersHeroText{
  padding: clamp(22px, 4vw, 42px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.customPowersEyebrow{
  margin: 0 0 8px;
  color: #ffd86b;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .78rem;
}

.customPowersHero h1{
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: .95;
}

.customPowersSubtitle{
  max-width: 620px;
  margin: 14px 0 0;
  color: rgba(244,247,251,.78);
  font-size: 1.05rem;
  line-height: 1.55;
}

.customPowersHeroActions{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.customPowersHeroArt{
  position: relative;
  min-height: 280px;
}

.customPowersHeroArt::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15,28,42,.75), transparent 42%),
    linear-gradient(0deg, rgba(8,16,24,.42), transparent 45%);
  pointer-events: none;
}

.customPowersHeroArt img{
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.customPowersNote,
.customPowersContent{
  border-radius: 20px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.11);
}

.customPowersNote{
  padding: 16px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.customPowersNote strong,
#powersByClass h2,
#powersByClass h3{
  color: #ffd86b;
}

.customPowersNote p{
  margin: 6px 0 0;
  color: rgba(244,247,251,.78);
  line-height: 1.45;
}

.customPowersContent{
  padding: 18px;
}

#powersByClass h2,
#powersByClass h3{
  margin-top: 18px;
}

/* Power cards */

.customPowerRow{
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 112px;
  align-items: start;
  gap: 14px;

  padding: 14px;
  margin: 10px 0;
  border-radius: 18px;

  background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.055));
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.customPowerIcon{
  width: 58px;
  height: 58px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid rgba(255,216,107,.55);
  box-shadow: 0 8px 18px rgba(0,0,0,.24);
}

.customPowerInfo{
  display: grid;
  gap: 7px;
  min-width: 0;
}

.customPowerInfo strong{
  color: #ffffff;
}

.customPowerInfo span{
  color: rgba(244,247,251,.76);
  opacity: 1;
  font-size: .92rem;
}

.customPowerTitle,
.customPowerMeta,
.customPowerCosts{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.customPowerBadge,
.powerChip{
  border-radius: 999px;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
}

.customPowerBadge{
  color: #ffd86b;
  font-size: .74rem;
  font-weight: 900;
}

.powerChip{
  color: rgba(244,247,251,.88);
  font-size: .82rem;
}

.powerChip strong{
  color: #ffd86b;
  margin-right: 4px;
}

.powerChip.reward strong{
  color: #86efac;
}

.customPowerButtons{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customPowerButtons .sideBtn{
  width: 100%;
  margin: 0;
  text-align: center;
}

.deletePowerBtn{
  background: linear-gradient(180deg, #b91c1c, #7f1d1d) !important;
  border-color: rgba(248,113,113,.75) !important;
}

/* Buttons */

.primaryForgeBtn{
  background: linear-gradient(180deg, #ffe27a, #ffb700) !important;
  color: #161616 !important;
  border: 0 !important;
  font-weight: 900;
}

.ghostForgeBtn{
  background: rgba(255,255,255,.10) !important;
  color: #f4f7fb !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}

.primaryForgeBtn:hover,
.ghostForgeBtn:hover{
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* Modal */

#powerModal.modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(4px);
}

#powerModal.hidden{
  display: none;
}

.customPowerModalCard{
  width: min(760px, 94vw);
  max-height: min(88vh, 860px);
  overflow: auto;
  padding: 22px;
  border-radius: 24px;
  color: #f4f7fb;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,216,107,.13), transparent 34%),
    linear-gradient(180deg, rgba(17,30,44,.98), rgba(10,18,28,.98));
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.customPowerModalHeader{
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.customPowerModalHeader h2{
  margin: 0;
  font-size: 1.75rem;
}

.cpFormStack{
  display: grid;
  gap: 14px;
}

.customPowerModalCard label{
  display: grid;
  gap: 7px;
  color: rgba(244,247,251,.86);
  font-weight: 800;
  font-size: .92rem;
}

.customPowerModalCard .textInput{
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(7,14,22,.88);
  color: #f4f7fb;
  border: 1px solid rgba(148,163,184,.38);
  outline: none;
}

.customPowerModalCard .textInput:focus{
  border-color: rgba(255,216,107,.9);
  box-shadow: 0 0 0 3px rgba(255,216,107,.14);
}

.customPowerModalCard textarea.textInput{
  min-height: 92px;
  resize: vertical;
}

.cpGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cpStatGrid{
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.customPowerModalCard h3{
  margin: 8px 0 0;
  padding-top: 6px;
  color: #ffd86b;
  border-top: 1px solid rgba(255,255,255,.10);
}

.cpIconChoices{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 4px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(255,255,255,.10);
}

.cpIconChoice{
  width: 62px;
  height: 62px;
  padding: 3px;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, filter .12s ease;
}

.cpIconChoice:hover{
  transform: translateY(-2px);
  filter: brightness(1.12);
}

.cpIconChoice.selected{
  border-color: #ffd86b;
  box-shadow: 0 0 0 3px rgba(255,216,107,.14);
}

.cpIconChoice img{
  width: 100%;
  height: 100%;
  border-radius: 11px;
  object-fit: cover;
}

.cpIconChoice.disabledIcon{
  opacity: .3;
  filter: grayscale(1);
  cursor: not-allowed;
}

.customPowerModalActions{
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive */

@media (max-width: 820px){
  .customPowersHero{
    grid-template-columns: 1fr;
  }

  .customPowersHeroArt{
    order: -1;
    min-height: 220px;
  }

  .customPowersHeroArt img{
    min-height: 220px;
  }

  .cpStatGrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px){
  .customPowerRow{
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .customPowerButtons{
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

@media (max-width: 560px){
  .customPowersPage{
    width: min(100%, calc(100vw - 20px));
    padding-top: 10px;
  }

  .customPowersHeroText,
  .customPowersContent,
  .customPowerModalCard{
    padding: 16px;
  }

  .cpGrid,
  .cpStatGrid{
    grid-template-columns: 1fr;
  }

  .customPowerModalActions{
    flex-direction: column-reverse;
  }

  .customPowerModalActions .sideBtn{
    width: 100%;
  }
}
/* =====================================
   Teacher Sidebar Button Unification
   ===================================== */

.nav-link,
.sideBtn,
.toolBtn{
    display:block;
    width:100%;
    box-sizing:border-box;

    padding:10px 14px;

    border-radius:12px;
    border:1px solid #3a6af5;

    background:linear-gradient(
        180deg,
        #2f6df3,
        #2356d8
    );

    color:#fff;
    font-weight:700;
    font-size:14px;
    text-decoration:none;
    text-align:left;

    cursor:pointer;

    transition:
        transform .12s,
        filter .12s,
        box-shadow .12s;

    box-shadow:
        0 3px 8px rgba(0,0,0,.18);
}

.nav-link:hover,
.sideBtn:hover,
.toolBtn:hover{
    filter:brightness(1.08);
    transform:translateY(-1px);
}

.nav-link:active,
.sideBtn:active,
.toolBtn:active{
    transform:translateY(1px);
    filter:brightness(.95);
}

.nav-link.primary{
    background:linear-gradient(
        180deg,
        #4f87ff,
        #2f6df3
    );
}
/* ===============================
   Teacher Sidebar Button Cleanup
   =============================== */

.teacher-sidebar{
  gap: 14px;
}

.sidebar-brand{
  padding-bottom: 6px;
}

.sidebar-title{
  font-weight: 800;
  margin-bottom: 4px;
  color: #ffffff;
}

.sidebar-section{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.teacher-sidebar .nav-section-title{
  margin: 4px 0 0;
}

.teacher-sidebar .nav-link,
.teacher-sidebar .sideBtn,
.teacher-sidebar .toolBtn{
  display: block;
  width: 100%;
  box-sizing: border-box;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #3a6af5;

  background: linear-gradient(180deg, #2f6df3, #2356d8);
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;

  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0,0,0,.18);

  transition:
    transform .12s ease,
    filter .12s ease,
    box-shadow .12s ease,
    border-color .12s ease;
}

.teacher-sidebar .nav-link:hover,
.teacher-sidebar .sideBtn:hover,
.teacher-sidebar .toolBtn:hover{
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0,0,0,.24);
}

.teacher-sidebar .nav-link:active,
.teacher-sidebar .sideBtn:active,
.teacher-sidebar .toolBtn:active{
  transform: translateY(1px);
  filter: brightness(.96);
}

.teacher-sidebar .nav-link.primary{
  background: linear-gradient(180deg, #5f91ff, #2f6df3);
  border-color: #7aa6ff;
}

#classList{
  margin-top: 0;
}
/* ===============================
   Teacher Dashboard Sidebar Hierarchy
   =============================== */

.teacher-sidebar{
  gap: 16px;
}

.sidebar-brand{
  padding: 4px 2px 8px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.sidebar-title{
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: .2px;
}

.sidebar-subtitle{
  margin-top: 2px;
  color: #9aa4d4;
  font-size: .82rem;
  font-weight: 700;
}

.teacher-sidebar #userInfo{
  margin-top: 8px;
  font-size: 12px;
  color: #c2c8f0;
}

.sidebar-section{
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-section-heading{
  display: flex;
  align-items: center;
  gap: 8px;

  margin: 4px 0 2px;
  color: #9aa4d4;

  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .11em;
}

.sidebar-section-heading::after{
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(154,164,212,.45),
    rgba(154,164,212,0)
  );
}

.teacher-sidebar .nav-link,
.teacher-sidebar .sideBtn,
.teacher-sidebar .toolBtn{
  display: block;
  width: 100%;
  box-sizing: border-box;

  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #3a6af5;

  background: linear-gradient(180deg, #2f6df3, #2356d8);
  color: #ffffff;

  font-size: 14px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;

  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0,0,0,.18);

  transition:
    transform .12s ease,
    filter .12s ease,
    box-shadow .12s ease,
    border-color .12s ease;
}

.teacher-sidebar .nav-link:hover,
.teacher-sidebar .sideBtn:hover,
.teacher-sidebar .toolBtn:hover{
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0,0,0,.24);
}

.teacher-sidebar .nav-link:active,
.teacher-sidebar .sideBtn:active,
.teacher-sidebar .toolBtn:active{
  transform: translateY(1px);
  filter: brightness(.96);
}

.teacher-sidebar .nav-link.primary{
  background: linear-gradient(180deg, #5f91ff, #2f6df3);
  border-color: #7aa6ff;
}

.sidebar-card{
  margin-top: 0 !important;
  border-radius: 14px;
  background: rgba(15,23,42,.74);
  border: 1px solid rgba(148,163,184,.22);
}

#classList{
  margin-top: 2px;
}
/* Small archive button beside each class */
.class-list-item + button,
button[data-action="archive-class"]{
  width: 34px;
  height: 34px;
  min-width: 34px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  border: 1px solid rgba(248,113,113,.75);

  background: linear-gradient(180deg, #b91c1c, #7f1d1d);
  color: #fff;

  font-size: 15px;
  font-weight: 900;

  cursor: pointer;
  box-shadow: 0 5px 12px rgba(0,0,0,.22);

  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}

.class-list-item + button:hover,
button[data-action="archive-class"]:hover{
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(0,0,0,.28);
}

.class-list-item + button:active,
button[data-action="archive-class"]:active{
  transform: translateY(1px);
}