/* Stardust Trails core.css — OVERWRITE SAFE */

/* ===== BASE ===== */
:root{ color-scheme: dark; }
html,body{
  margin:0; padding:0;
  background:
    radial-gradient(circle at 20% 20%, rgba(150,90,255,0.22), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(70,200,255,0.14), transparent 40%),
    radial-gradient(circle at 35% 85%, rgba(255,120,210,0.10), transparent 45%),
    #070611;
  color:#efe8ff;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

a{ color:#e5cdff; text-decoration:none; }
a:hover{ text-decoration:underline; }

/* ===== FRAME ===== */
.site-frame{
  max-width:1200px;
  margin:34px auto;
  padding:18px;
  border-radius:38px;
  border:3px solid rgba(186,133,255,0.72);
  background:rgba(10,6,22,0.84);
  box-shadow:0 0 32px rgba(186,133,255,0.35), inset 0 0 44px rgba(110,55,220,0.22);
}

.content-frame{
  margin-top:22px;
  padding:28px;
  border-radius:30px;
  border:2px solid rgba(202,160,255,0.55);
  background:rgba(18,10,34,0.88);
}

/* ===== HEADER ===== */
.wrap{ max-width:1200px; margin:0 auto; }

.st-headerbox{
  border-radius:32px;
  border:2px solid rgba(202,160,255,0.6);
  background-size:100% auto;
  background-position:center 40%;
  box-shadow:0 0 26px rgba(186,133,255,0.22), inset 0 0 34px rgba(110,55,220,0.2);
}

.st-headertop{
  position:relative;
  display:flex;
  justify-content:center;
  padding:18px 20px 10px;
}

.st-titlewrap{text-align:center;}

.st-title{
  font-size:clamp(44px,5.2vw,78px);
  font-weight:900;
  background:linear-gradient(90deg,#4f22b8,#a56cff,#efe8ff);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.st-tagline{ margin-top:6px; font-weight:700; }

.st-userbox{
  position:absolute;
  top:16px; right:18px;
  background:rgba(30,12,55,0.55);
  border:2px solid rgba(202,160,255,0.55);
  border-radius:16px;
  padding:8px 10px;
}

.st-userboxlink{ display:flex; align-items:center; gap:10px; font-weight:900; }
.st-userpic{ width:34px; height:34px; border-radius:10px; border:2px solid rgba(202,160,255,0.55); }

.st-topmenu{
  text-align:center;
  padding:10px 20px 18px;
  font-weight:900;
}

.st-sep{ margin:0 6px; opacity:.7; }

/* ===== DROPDOWNS (details/summary) ===== */
.st-dd{ position:relative; display:inline-block; }
.st-topmenu > a, .st-topmenu > .st-dd{ white-space:nowrap; }
.st-ddbtn{
  cursor:pointer;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
}
.st-ddbtn::-webkit-details-marker{ display:none; }
.st-ddmenu{
  position:absolute;
  top:calc(100% + 10px);
  left:50%;
  transform:translateX(-50%);
  min-width:300px;
  padding:10px;
  border-radius:16px;
  border:2px solid rgba(202,160,255,0.35);
  background:rgba(18,10,32,0.95);
  box-shadow:0 16px 40px rgba(0,0,0,0.65);
  z-index:120;
}
.st-dd:not([open]) .st-ddmenu{ display:none; }
.st-ddmenu a{
  display:block;
  padding:8px 10px;
  border-radius:12px;
  white-space:normal;
  overflow-wrap:anywhere;
}
.st-ddmenu a:hover{ background:rgba(202,160,255,0.14); }

/* Readable dropdown options on dark themes */
select,
select.input{
  color: #f2ecff;
}

select option,
select optgroup{
  /* When custom CSS applies, force a high-contrast list.
     (Some browsers ignore option styling and use OS colors.) */
  background: #f1f1f1;
  color: #111;
}

/* Try to keep highlighted options readable on browsers that honor option styling */
select option:checked,
select option:hover{
  background: #9ec5ff;
  color: #111;
}

/* ===== Custom select (st_select.js) thumbnail support ===== */
.st-select-btn,
.st-select-item{
  display:flex;
  align-items:center;
  gap:10px;
}
.st-select-thumb{
  width:22px;
  height:22px;
  border-radius:8px;
  object-fit:cover;
  border:1px solid rgba(202,160,255,0.40);
  box-shadow:0 0 10px rgba(186,133,255,0.14);
}
.st-select-label{
  display:inline-block;
}

/* Layout: keep option pills horizontal (wrap) instead of a column */
.st-select-list{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-top:10px;
}
.st-select-item{
  flex:0 0 auto;
  width:auto;
}

/* ===== ADMIN NAV (Pets Admin) ===== */
.st-adminnav{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin:10px 0 18px;
}
.st-adminnav__row{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}
.st-adminnav__section{
  flex:1 1 320px;
  padding:16px 18px;
  border-radius:22px;
  border:2px solid rgba(202,160,255,0.35);
  background:rgba(12,6,24,0.55);
  box-shadow: inset 0 0 28px rgba(110,55,220,0.12);
}
.st-adminnav__title{
  font-weight:1000;
  letter-spacing:.3px;
  margin:0 0 10px;
}
.st-adminnav__links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}
.st-adminnav__links a{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  border:2px solid rgba(202,160,255,0.35);
  background:rgba(30,12,55,0.45);
  font-weight:900;
  text-decoration:none;
}
.st-adminnav__links a:hover{
  background:rgba(202,160,255,0.16);
  text-decoration:none;
}

/* =========================================================
   Stardust Trails – Bubbly UI + Mobile Header Fix
   (drop-in overrides; keeps current theme vibe)
   ========================================================= */

/* Stop header background tiling/repeating (mobile + desktop) */
.st-headerbox{
  background-repeat: no-repeat;
}
@media (max-width: 700px){
  .st-headerbox{
    background-repeat: no-repeat;
    background-position: center 40%;
    background-size: cover;
  }
}

/* Bubbly buttons (titles/links that use .btn) */
.btn,
a.btn,
button,
input[type="submit"],
input[type="button"]{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 14px;
  border-radius:999px;
  border:2px solid rgba(202,160,255,0.38);
  background:rgba(30,12,55,0.45);
  color:inherit;
  font-weight:900;
  text-decoration:none;
  cursor:pointer;
  box-shadow: inset 0 0 18px rgba(110,55,220,0.12);
}
.btn:hover,
a.btn:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover{
  background:rgba(202,160,255,0.16);
}

/* Bubbly inputs everywhere (fixes grey defaults) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="file"],
select,
textarea,
.input{
  width:100%;
  max-width: 560px;
  box-sizing:border-box;
  padding:10px 12px;
  border-radius:14px;
  border:2px solid rgba(202,160,255,0.30);
  background: rgba(12,6,24,0.55);
  color: rgba(255,255,255,0.92);
  outline: none;
  box-shadow: inset 0 0 22px rgba(110,55,220,0.10);
}

/* keep small checkboxes/radios normal-sized */
input[type="checkbox"],
input[type="radio"]{
  width:auto;
  max-width:none;
  padding:0;
  border-radius:6px;
}

/* nice focus ring */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus,
.input:focus{
  border-color: rgba(202,160,255,0.65);
  box-shadow: 0 0 0 3px rgba(202,160,255,0.16), inset 0 0 22px rgba(110,55,220,0.10);
}

/* Dropdown menu options (dark theme friendly) */
select option{
  background: #130a24;
  color: #f2eaff;
}

/* Admin/staff controls panel stays visible at the top */
.st-adminnav{
  position: sticky;
  top: 10px;
  z-index: 50;
}

/* The little admin breadcrumb row under titles */
.panel .nav a,
.panel .nav .btn{
  margin-right: 8px;
}

/* Tables + filters: make filter line match bubbly vibe */
.filters select,
.filters input,
.filters .btn{
  max-width:none;
}


/* Wallet display in header */
.st-currencybar{display:flex;align-items:center;gap:8px;margin-top:6px;font-size:13px;justify-content:flex-start;flex-wrap:wrap;}
.st-cur{display:inline-flex;align-items:center;gap:6px;}
.st-curicon{width:14px;height:14px;object-fit:contain;filter:drop-shadow(0 0 8px rgba(180,220,255,0.25));}
.st-curnum{font-weight:800;}

.st-spotpickgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0;}
.st-spotpick{display:flex;flex-direction:column;gap:6px;}
.st-spotpick select{width:100%;}

/* ===== PET RARITY BADGES ===== */
.st-rarityBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(202,160,255,0.30);
  background:rgba(28,14,54,0.72);
  box-shadow: inset 0 0 16px rgba(110,55,220,0.10);
  font-size:12px;
  line-height:1;
  white-space:nowrap;
}
.st-rarityBadge__img{
  width:20px;
  height:20px;
  object-fit:contain;
  display:block;
}
.st-rarityBadge__text{ font-weight:900; }
.st-rarityBadge__count{ opacity:.78; font-size:11px; }
.st-rarityBadge.rarity-common .st-rarityBadge__text{ color:#f6edff; }
.st-rarityBadge.rarity-uncommon .st-rarityBadge__text{ color:#d7e4ff; }
.st-rarityBadge.rarity-rare .st-rarityBadge__text{ color:#f0b8ff; }
.st-rarityBadge.rarity-super-rare .st-rarityBadge__text{ color:#ffd7a8; }
.st-rarityBadge.rarity-ultra-rare .st-rarityBadge__text{ color:#bfefff; }
.st-rarityBadge.rarity-mythic .st-rarityBadge__text{ color:#ffe79a; }

/* ===== Stardust rarity badges/icons ===== */
.st-rarityBadge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  vertical-align:middle;
  max-width:100%;
}
.st-rarityBadge__badge{
  display:block;
  width:auto;
  max-width:180px;
  height:40px;
  object-fit:contain;
}
.st-rarityBadge__img{
  width:22px;
  height:22px;
  object-fit:contain;
  flex:0 0 auto;
}
.st-rarityBadge__text{
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(19,10,37,.62);
  font-size:12px;
  font-weight:900;
  line-height:1;
  white-space:nowrap;
}
.st-rarityBadge__count{
  font-size:11px;
  opacity:.82;
}
.st-rarityIcon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:28px;
  height:28px;
  border-radius:999px;
  background:rgba(16,8,32,.55);
  border:1px solid rgba(255,255,255,.12);
}
.st-rarityIcon__img{
  width:20px;
  height:20px;
  object-fit:contain;
}
.st-rarityIcon__fallback{
  font-size:15px;
  line-height:1;
}
.st-rarityBadge.rarity-common .st-rarityBadge__text,
.st-rarityIcon.rarity-common .st-rarityIcon__fallback{ color:#f6edff; }
.st-rarityBadge.rarity-uncommon .st-rarityBadge__text,
.st-rarityIcon.rarity-uncommon .st-rarityIcon__fallback{ color:#d7e4ff; }
.st-rarityBadge.rarity-rare .st-rarityBadge__text,
.st-rarityIcon.rarity-rare .st-rarityIcon__fallback{ color:#f0b8ff; }
.st-rarityBadge.rarity-super-rare .st-rarityBadge__text,
.st-rarityIcon.rarity-super-rare .st-rarityIcon__fallback{ color:#ffd7a8; }
.st-rarityBadge.rarity-ultra-rare .st-rarityBadge__text,
.st-rarityIcon.rarity-ultra-rare .st-rarityIcon__fallback{ color:#bfefff; }
.st-rarityBadge.rarity-mythic .st-rarityBadge__text,
.st-rarityIcon.rarity-mythic .st-rarityIcon__fallback{ color:#ffe79a; }

/* ===== AUTH / LOGIN PAGE FIX ===== */
.panel-auth--login,
.panel-auth,
.panel-auth__inner,
.panel-auth__form {
  width: 100%;
}
.panel-auth__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: stretch;
}
.panel-auth__field,
.panel-auth__form label,
.panel-auth__form .field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 8px;
}
.panel-auth__label,
.panel-auth__form label span {
  display: block;
  width: 100%;
  font-weight: 700;
  color: #f3eaff;
  margin: 0;
}
.panel-auth__form input[type="text"],
.panel-auth__form input[type="email"],
.panel-auth__form input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.panel-auth__actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 4px;
}
.panel-auth__actions .btn,
.panel-auth__form button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
}
.panel-auth__form > * {
  float: none !important;
  clear: both;
}
@media (max-width: 700px) {
  .panel-auth__form {
    gap: 14px;
  }
  .panel-auth__actions {
    justify-content: center;
  }
  .panel-auth__actions .btn,
  .panel-auth__form button[type="submit"] {
    width: 100%;
    max-width: 220px;
  }
}

/* ===== REWARD TOAST TOP HARD FIX ===== */
.st-toast-stack{
  position:fixed !important;
  top:18px !important;
  right:18px !important;
  left:auto !important;
  bottom:auto !important;
  z-index:999999 !important;
  display:flex !important;
  flex-direction:column !important;
  gap:12px !important;
  width:min(380px, calc(100vw - 24px)) !important;
  pointer-events:none !important;
}
@media (max-width: 700px){
  .st-toast-stack{
    top:12px !important;
    left:12px !important;
    right:12px !important;
    bottom:auto !important;
    width:auto !important;
  }
}


@media (max-width: 900px){
  .st-topmenu{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 10px;}
  .st-sep{display:none;}
  .st-ddmenu{left:50%;right:auto;transform:translateX(-50%);min-width:min(92vw, 320px);}
}


/* menu fix: give dropdowns a little more elbow room */
.st-topmenu{overflow:visible;}
.st-ddmenu{width:max-content;min-width:300px;max-width:min(94vw,420px);}
@media (max-width:700px){
  .st-ddmenu{left:50%;right:auto;transform:translateX(-50%);width:min(94vw,420px);min-width:0;}
}
