:root{
  --page: #000000;
  --bg:   #000000;

  --panel: #000000;
  --panel-2: #000000;

  --text: #e9eef6;
  --muted: rgba(233,238,246,.70);

  --border: rgba(255,255,255,.12);
  --shadow: 0 10px 30px rgba(0,0,0,.85);

  --accent: #2fe6a6;
  --accent-2: #52a7ff;

  --game-width: 1200px;
  --banner-h: 130px;

  --hud-bg: rgba(0,0,0,.28);
  --hud-border: rgba(255,255,255,.16);

  --dt-blue: #3914ff;

  /* ✅ colonnes (Pro) */
  --left-w: 150px;
  --right-w: 220px;
  --gap: 12px;
}

*{ box-sizing:border-box; }

html, body{
  min-height: 100%;
  height: auto;
  overflow-y: auto;
}

body{
  margin:0;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(82,167,255,.10), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(47,230,166,.10), transparent 55%),
    var(--page);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.35;
}

a{ color: var(--accent-2); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  max-width: var(--game-width);
  width: calc(100% - 24px);
  margin: 20px auto;
  padding: 0;
}

.banner{
  width: min(var(--game-width), calc(100% - 24px));
  margin: 20px auto 10px auto;

  background:#000;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow:hidden;
  box-shadow: var(--shadow);

  aspect-ratio: 10 / 1; /* force la bannière à 10:1 */
}

.banner img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill; /* ✅ déforme pour remplir, donc aucune coupe */
}

.card{
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border:1px solid var(--border);
  border-radius: 14px;
  padding:12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

h1,h2,h3{
  margin:0 0 10px 0;
  font-weight: 800;
  letter-spacing:.2px;
}

.muted{ color: var(--muted); }

/* =========================
   GLOBAL INPUTS
   - utilisé par options.php (class="input")
   ========================= */

.input{
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.65);
  border: 1px solid var(--dt-blue);
  color: #ffffff;
  outline: none;
  appearance: none;
}

.input:focus{
  border-color: rgba(57,20,255,.90);
  box-shadow: 0 0 0 3px rgba(57,20,255,.20);
}

/* ✅ Disabled = reste noir + bordure bleue + texte blanc */
.input:disabled,
select.input:disabled,
textarea.input:disabled{
  background-color: #000000 !important;
  border: 1px solid rgba(57,20,255,.85) !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: not-allowed;
}

/* ✅ Autofill (Chrome/Edge) pour .input aussi */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus,
.input:-webkit-autofill:active{
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  box-shadow: 0 0 0px 1000px #000 inset;
  border: 1px solid var(--dt-blue);
  transition: background-color 9999s ease-in-out 0s;
}

/* =========================
   Buttons
   ========================= */

.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(82,167,255,.22);
  color: var(--text);
  font-weight:900;
  cursor:pointer;
  text-decoration:none;
}

.btn:hover{
  background: rgba(82,167,255,.32);
  border-color: rgba(82,167,255,.45);
}

.btn.secondary{
  background: rgba(0,0,0,.35);
}

.btn.secondary:hover{
  background: rgba(0,0,0,.45);
}

.btn.ghost{
  width: 100%;
  background: rgba(0,0,0,.28);
  border-color: rgba(57,20,255,.35);
}

.btn.ghost:hover{
  background: rgba(0,0,0,.40);
  border-color: rgba(57,20,255,.60);
}

/* =========================
   Messages
   ========================= */

.ok{
  padding:8px 10px;
  border-radius:10px;
  border: 1px solid rgba(47,230,166,.35);
  background: rgba(47,230,166,.12);
  font-weight: 800;
}

.error{
  padding:8px 10px;
  border-radius:10px;
  border: 1px solid rgba(255,107,107,.35);
  background: rgba(255,107,107,.12);
  font-weight: 800;
}

/* =========================
   GAME LAYOUT
   ========================= */

.layout{
  display: grid;
  grid-template-columns: var(--left-w) 1fr var(--right-w);
  gap: var(--gap);
  align-items: start;
}

/* assure que les colonnes restent dans leur cellule */
.left, .right, .main{ min-width: 0; }

.left{ grid-column: 1; }
.main{ grid-column: 2; }
.right{ grid-column: 3; }

@media (max-width: 1100px){
  :root{ --right-w: 280px; }
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .left, .main, .right{ grid-column: auto; }
}

/* Footer */
.footer{
  margin-top: 12px;
  padding: 10px 0 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

/* =========================
   HUD / MENU shared styles
   ========================= */

.hud{
  background: rgba(0,0,0,.25);
  border: 1px solid var(--hud-border);
}

.hud-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.hud-title{
  font-weight: 950;
  letter-spacing: .2px;
}

.hud-subtitle{
  font-weight: 150;
  letter-spacing: .2px;
}

.hud-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.hud-block{
  width: 100%;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 10px;
}

.hud-block:last-child{ margin-bottom: 0; }

.hud-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top: 6px;
}

.hud-muted{
  color: var(--muted);
  font-size: 13px;
}

.hud-warn{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,107,107,.35);
  background: rgba(255,107,107,.12);
  font-weight: 800;
}

.hud-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
}

.hud-link:hover{
  background: rgba(0,0,0,.32);
  text-decoration:none;
}

/* Bars */
.hud-bar{
  margin-top: 6px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.10);
}

.hud-bar-fill{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--bar-color, rgba(82,167,255,.80));
  transition: width .25s ease, background-color .25s ease;
}

/* =========================
   AUTH layout — ajustement UX
   ========================= */

.auth-wrap{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.auth-card{
  padding: 18px;
  border-radius: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.auth-block{
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}

.auth-block:last-child{ margin-bottom: 0; }

.auth-head{
  display:flex;
  flex-direction:column;
  gap: 6px;
}

.auth-title{
  font-size: 24px;
  font-weight: 950;
}

.auth-subtitle{
  color: var(--muted);
  font-size: 13px;
}

/* Intro */
.auth-intro{
  border-color: rgba(57,20,255,.25);
  background: rgba(0,0,0,.35);
}

.auth-intro-line{ margin: 6px 0; }

/* Form */
.auth-form{
  display:flex;
  flex-direction:column;
  gap: 14px;
}

.field{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

/* Labels */
.auth-label{
  padding: 8px 10px;
  border-radius: 12px;
  background: #000;
  color: rgba(233,238,246,.82);
  font-weight: 900;
}

/* Inputs */
.auth-input{
  padding: 12px;
  border-radius: 12px;
  background: rgba(0,0,0,.65);
  border: 1px solid var(--dt-blue);
  color: var(--text);
}

.auth-input:focus{
  border-color: rgba(57,20,255,.85);
  box-shadow: 0 0 0 3px rgba(57,20,255,.20);
}

/* ✅ Fix autofill (Chrome/Edge) */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active{
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  box-shadow: 0 0 0px 1000px #000 inset;
  border: 1px solid var(--dt-blue);
  transition: background-color 9999s ease-in-out 0s;
}

/* ✅ AIDE + ASTUCE */
.auth-help,
.auth-tip{
  font-size: 14px;
  color: rgba(107, 106, 255, 1);
  letter-spacing: .15px;
  padding-left: 6px;
  margin-top: 2px;
}

.auth-actions{
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}

/* =========================
   Center splash (Under construction)
   ========================= */

.center-splash{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px;
}

.construction-img{
  width: 100%;
  max-width: 500px;
  height: auto;
  display:block;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* =========================
   HUD links — image support
   ========================= */

.hud-link-img{
  display: inline-block;
  height: 37px;
  width: auto;
  image-rendering: auto;
}

/* =========================
   HUD — Compact global (override)
   ========================= */

.hud,
.hud strong,
.hud #hudCash,
.hud #hudBank,
.hud #hudPremium{
  font-variant-numeric: tabular-nums;
}

.hud-title{
  font-size: 13px;
  line-height: 1.2;
}

.hud-block{
  padding: 8px 9px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.hud-row{
  margin-top: 4px;
  gap: 8px;
}

.hud-muted{
  font-size: 11px;
}

.hud-row strong{
  font-size: 12.5px;
  font-weight: 900;
}

.hud-bar{
  height: 8px;
  margin-top: 5px;
}

.hud-link{
  display: block;
  width: 100%;
  text-align: center;
  padding: 5px 7px;
  border-radius: 10px;
}

.hud .btn{
  padding: 8px 10px;
  border-radius: 12px;
}

/* =========================
   Popover (global)
   ========================= */

.dt-pop{
  position: relative;
  display: inline-block;
}

.dt-pop__panel{
  position:absolute;
  top: calc(100% + 10px);
  width: min(360px, 78vw);
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(10, 12, 16, 0.92);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55);
  backdrop-filter: blur(10px);

  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;

  z-index: 9999;
  max-height: 45vh;
  overflow: auto;
}

.dt-pop:hover .dt-pop__panel,
.dt-pop:focus-within .dt-pop__panel{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dt-pop__title{
  display:block;
  font-weight: 800;
  margin-bottom: 6px;
}

.dt-pop__text{
  display:block;
  opacity: .9;
  line-height: 1.35;
  font-size: 13px;
}

/* Positions */
.dt-pop--right .dt-pop__panel{ right: 0; }
.dt-pop--left  .dt-pop__panel{ left: 0; }
.dt-pop--center .dt-pop__panel{
  left: 50%;
  right: auto;
  transform: translate(-50%, -6px);
}
.dt-pop--center:hover .dt-pop__panel,
.dt-pop--center:focus-within .dt-pop__panel{
  transform: translate(-50%, 0);
}

/* =========================
   Legal Pages (Terms / Privacy)
   ========================= */

.legal-card{
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.65;
}

.legal-card h1{
  color: rgba(255, 255, 255, 0.92);
  font-weight: 800;
  letter-spacing: 0.3px;
}

.legal-card h2{
  color: rgba(255, 255, 255, 0.88);
  margin-top: 28px;
  font-weight: 700;
}

.legal-card p{
  color: rgba(255, 255, 255, 0.75);
}

.legal-card .muted{
  color: rgba(255, 255, 255, 0.45);
}

.legal-card hr{
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* =========================
   DT UI — Global Badge (Instructions)
   ========================= */

.dt-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  font-weight: 950;
  letter-spacing: .6px;
  font-size: 12px;
  background: rgba(0,0,0,.35);
  user-select: none;
  cursor: help;
}

.dt-badge--neon{
  border-color: rgba(47,230,166,.35);
  box-shadow: 0 0 0 3px rgba(47,230,166,.12);
}

/* =========================================================
   GLOBAL – Background helper pour pages center-xxx-bg
   (permet de sortir City/Market du global sans casser d’autres pages)
   ========================================================= */

main[class^="center-"][class$="-bg"],
div[class^="center-"][class$="-bg"]{
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

main[class^="center-"][class$="-bg"] img[class$="-bg-img"],
div[class^="center-"][class$="-bg"] img[class$="-bg-img"]{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}

main[class^="center-"][class$="-bg"] .hud-head,
main[class^="center-"][class$="-bg"] [class^="center-"][class$="-body"],
div[class^="center-"][class$="-bg"] .hud-head,
div[class^="center-"][class$="-bg"] [class^="center-"][class$="-body"]{
  position: relative;
  z-index: 10;
}
/* =========================================================
   DRUGTOWN – Instruction Badge Popover (GLOBAL STANDARD)
   Used by: ui_instruction_badge.php
   ========================================================= */

.dt-pop__text{
  display:block;
  margin-top:10px;
  line-height:1.6;
}

.dt-pop__line{
  display:block;
  position:relative;
  margin-bottom:10px;
  padding:8px 10px 8px 18px;
  background:rgba(255,255,255,.04);
  border-radius:6px;
}

.dt-pop__line::before{
  content:"•";
  position:absolute;
  left:8px;
  top:8px;
  color:var(--accent,#52a7ff);
  font-weight:bold;
}

.dt-pop__line:last-child{
  margin-bottom:0;
}

.travel-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255,255,255,0.08);
}

.travel-status__city {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.travel-status__money {
  font-size: 16px;
  font-weight: 700;
  color: #00ff6a;
}

.travel-status__travel {
  font-size: 14px;
  font-weight: 700;
  color: #ffd34d;
}

.travel-status__travel span {
  display: block;
  font-size: 13px;
  opacity: 0.8;
  margin-top: 2px;
}