/* Keep user header visible */
header.header-con.main-box{
  position: sticky;
  top: 0;
  z-index: 9999;
}

/* Modal editor for files */
.gh-modal{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  z-index: 10000;
}
.gh-modal-inner{
  width: min(1100px, 70vw);
  max-height: 88vh;
}
.gh-modal .gh-card{
  max-height: 88vh;
  overflow: hidden;
}
.gh-modal textarea{
  max-height: 64vh;
}
:root { --card-bg: rgba(255,255,255,0.04); }
html, body{ width:100%; overflow-x:hidden; }
body { background: #070a12; color: #e5e7eb; }

/* Evita que estilos del tema (float-left en header/main-box) rompan el layout de /user */
header.header-con.main-box{ float: none !important; }
.user-ad-topbar, .user-shell, main.user-main{ clear: both; }
main.user-main{ width: 100%; margin-left: auto !important; margin-right: auto !important; }

/* Container bootstrap a veces hereda floats del tema */
.user-main.container{ float: none !important; }
.gh-card { background: var(--card-bg); border: 1px solid rgba(255,255,255,0.08); border-radius: 16px; padding: 18px; }
.gh-muted { opacity: .8; }
.gh-btn { border-radius: 12px; }
input, select { border-radius: 12px !important; }
.badge-soft { background: rgba(59,130,246,.15); border: 1px solid rgba(59,130,246,.25); color: #bfdbfe; }


/* Ads slots */
.ad-slot{margin:16px 0;}
.ad-slot iframe, .ad-slot img{max-width:100%;height:auto;}

/* Fuerza centrado del contenedor de ads (evita que se vaya a la derecha) */
.ad-wrap{display:flex;justify-content:center !important;align-items:center;}
.ad-slot{margin-left:auto;margin-right:auto;}
.ad-slot > *{margin-left:auto;margin-right:auto;}

/* ===== Planes ===== */
.gh-price-grid{display:flex;flex-wrap:wrap;gap:12px;}
.gh-price-pill{
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 140px;
}
.gh-price-pill .lbl{display:block;opacity:.85;font-size:.9rem;}
.gh-price-pill .val{display:block;font-weight:800;font-size:1.35rem;letter-spacing:.2px;}

.gh-plan-image{
  width: 100%;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px dashed rgba(255,255,255,.18);
  background: rgba(255,255,255,.03);
  overflow: hidden;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 150px;
}
.gh-plan-image img{width:100%;height:auto;display:block;}
.gh-plan-image .hint{opacity:.75;font-size:.95rem;padding:14px;text-align:center;}

/* ===== Servidor (layout tipo panel) ===== */
.gh-server-layout{
  display:flex;
  justify-content:center;
  gap:22px;
  align-items:flex-start;
  /* user asked: sidebar on the RIGHT so the content stays visually centered */
  flex-direction: row-reverse;
}

/* Sidebar (overview / navigation) */
.gh-server-side{
  position: sticky;
  top: 96px;
  z-index: 40;
  width: 270px;
  padding: 14px 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.gh-side-title{display:block; font-weight:900; opacity:.85; letter-spacing:.06em; text-transform:uppercase; font-size:.78rem;}
.gh-side-nav{display:flex;flex-direction:column;gap:10px;align-items:stretch; margin-top:10px;}
.gh-side-link{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;
  background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08);
  color:#e5e7eb; text-decoration:none;}
.gh-side-link:hover{background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.25); text-decoration:none;}
.gh-side-link.active{background: rgba(59,130,246,.14); border-color: rgba(59,130,246,.35);}

/* Main content column inside .gh-server-layout */
.gh-server-layout > section{
  flex: 1;
  max-width: 980px;
  min-width: 0;
}

.gh-panel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.gh-panel-card{background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:14px;}
.gh-panel-card .t{font-weight:800;margin-bottom:8px;}
.gh-panel-card a{color:#bfdbfe;text-decoration:none;}
.gh-panel-card a:hover{text-decoration:underline;}

.gh-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;}
.gh-kpi{background: rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.08); border-radius:16px; padding:14px;}
.gh-kpi .lbl{opacity:.8;font-size:.9rem;}
.gh-kpi .val{font-size:1.4rem;font-weight:900;margin-top:6px;}
.gh-bar{height:10px;border-radius:999px;background: rgba(255,255,255,.08); overflow:hidden;margin-top:10px;}
.gh-bar > i{display:block;height:100%;width:0%;background: rgba(59,130,246,.75);}

.gh-ctrl{display:flex;gap:10px;flex-wrap:wrap;}

/* ===== Server tabs + tables + console ===== */
.gh-tabpane{display:block;}
.gh-tabpane.d-none{display:none !important;}
.gh-table-wrap{overflow:auto;}
.gh-table{width:100%;border-collapse:separate;border-spacing:0;min-width:520px;}
.gh-table th,.gh-table td{padding:10px 12px;border-bottom:1px solid rgba(255,255,255,.08);}
.gh-table th{font-size:.85rem;opacity:.85;text-transform:uppercase;letter-spacing:.06em;}
.gh-table td a{color:#bfdbfe;text-decoration:none;}
.gh-table td a:hover{text-decoration:underline;}
.gh-console{height:360px;overflow:auto;white-space:pre-wrap;word-break:break-word;
  background: rgba(0,0,0,.35);border:1px solid rgba(255,255,255,.10);
  border-radius:14px;padding:12px;margin:0;}

/* Files breadcrumb + form checks */
.gh-files-breadcrumb{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}
.gh-files-breadcrumb a{color:#bfdbfe;text-decoration:none;padding:6px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.03);}
.gh-files-breadcrumb a:hover{background: rgba(59,130,246,.10);border-color: rgba(59,130,246,.25);}
.gh-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.gh-check{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background: rgba(255,255,255,.03);}
.gh-check input{width:18px;height:18px;}
.gh-check span{opacity:.95;}

/* ===== Server configuration (pretty) ===== */
.gh-config-wrap{margin-top: 10px;}
.gh-config-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px;}
.gh-config-head .title{font-weight:900;font-size:1.05rem;}
.gh-config-head .hint{opacity:.8;font-size:.9rem;}

.gh-config-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
@media (max-width: 992px){.gh-config-grid{grid-template-columns:1fr;}}

.gh-config-group{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin-top:6px;}
.gh-config-group .pill{display:inline-flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.25);
  color:#bfdbfe;font-weight:800;font-size:.82rem;letter-spacing:.04em;text-transform:uppercase;
}
.gh-config-group .line{flex:1;height:1px;background: rgba(255,255,255,.10);}

.gh-config-card{background: rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.10);
  border-radius:16px;padding:14px;}
.gh-config-card .form-label{margin-bottom:6px;}
.gh-config-card .form-text{opacity:.8;}

.gh-config-actions{position:sticky;bottom:12px;z-index:30;margin-top:14px;}
.gh-config-actions .bar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  padding:12px 14px;border-radius:16px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);
}
.gh-config-actions .bar .left{opacity:.85;font-size:.9rem;}

@media (max-width: 992px){
  .gh-server-layout{flex-direction:column;}
  .gh-server-side{position:relative;top:auto;width:auto;}
  .gh-panel-grid{grid-template-columns:1fr;}
  .gh-kpis{grid-template-columns:1fr;}
}


/* ===== Ads (freemium) ===== */
.gh-ads-block{margin: 10px 0 18px 0;}
.gh-ads-grid{display:grid;grid-template-columns: 1fr 1fr;gap:14px;align-items:start;margin:14px 0;}
@media (max-width: 992px){
  .gh-ads-grid{grid-template-columns:1fr;}
}
.ad-wrap{width:100%;}
/* tamaños (para que el placeholder reserve espacio) */
.ad-728x90{max-width:728px;min-height:90px;}
.ad-300x250{max-width:300px;min-height:250px;}
.ad-160x600{max-width:160px;min-height:600px;}
.ad-970x250{max-width:970px;min-height:250px;}

/* ===== Integración de Ads en UI /user ===== */
.user-ad-topbar{padding: 16px 0; background: transparent;}
.user-ad-inline{margin: 0 0 18px 0;}

/* Layout con rail (para integrar 300x250 sin romper contenido) */
.user-layout{display:grid;grid-template-columns: 1fr 320px;gap:16px;align-items:start;}
.user-content{min-width:0;}
.user-content-full{min-width:0;width:100%;}
.user-rail{position:sticky;top:90px;}
.user-ad-rail{display:flex;justify-content:center;}

@media (max-width: 992px){
  .user-layout{grid-template-columns:1fr;}
  .user-rail{position:relative;top:auto;}
}



/* ===== Layout shell con 160x600 a izquierda/derecha =====
   Nota: antes se activaba en >=1100px y en pantallas comunes (1366 con zoom/UI)
   se quedaba en modo "stack". Ahora activamos desde >=992px (breakpoint LG).
*/
.user-shell{display:block;width:100%;}
.user-shell-center{min-width:0;width:100%;margin:0 auto;}
.user-sky{display:none;}
@media (min-width: 992px){
  .user-shell{display:flex;justify-content:center;gap:18px;align-items:flex-start;}
  .user-sky{display:block;width:160px;flex:0 0 160px;position:sticky;top:110px;}
  .user-shell-center{flex:1 1 auto;max-width: 1200px;}
  .user-main{max-width: 1200px;}
}
@media (min-width: 1600px){
  .user-shell-center{max-width: 1280px;}
  .user-main{max-width: 1280px;}
}

/* ===== Auth pages (/user/login.php, /user/register.php) ===== */
.auth-wrap{min-height: calc(100vh - 220px); display:flex; align-items:center; justify-content:center; padding: 28px 12px;}
.auth-card{width:100%; max-width: 420px;}
.auth-card .gh-card{padding: 22px;}
.auth-card h3{font-weight: 800;}

/* Ajustes de Ads integrados */
.user-ad-topbar .ad-wrap{display:flex;justify-content:center;}


/* Added controls */
.select, .input, .textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  outline: none;
}
.textarea{ resize: vertical; }
.label{ display:block; font-size:12px; opacity:.8; margin-bottom:6px; }

/* Ensure dropdown options are visible (fix blank/white options on dark UI) */
select.input, select.select, select.form-control, select.form-select{
  background-color: #0f172a;
  color: #e5e7eb;
}
select.input option, select.select option, select.form-control option, select.form-select option{
  background-color: #0f172a;
  color: #e5e7eb;
}

/* --- Servers list filters (user/server.php) --- */
#gh-servers-page .gh-filters-card{
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.03));
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

#gh-servers-page .gh-filters{
  align-items: end;
  row-gap: 12px;
  column-gap: 12px;
  margin: 0;
}

#gh-servers-page .gh-filters .form-label{
  margin-bottom: 6px;
  font-weight: 600;
  color: rgba(255,255,255,.82);
  letter-spacing: .2px;
}

#gh-servers-page .gh-filters .form-select{
  border-radius: 14px;
  padding: 10px 12px;
  background-color: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  color: rgba(255,255,255,.92);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

#gh-servers-page .gh-filters .form-select:focus{
  border-color: rgba(99, 179, 237, .55);
  box-shadow: 0 0 0 .2rem rgba(99,179,237,.15);
}

#gh-servers-page .gh-filters .form-select option{
  background: #0b0f1a;
  color: #fff;
}

#gh-servers-page .gh-filters-actions{
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

#gh-servers-page .gh-filters-actions .btn{
  border-radius: 14px;
  padding: 10px 14px;
}

#gh-servers-page .gh-filters-count{
  margin-left: auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  white-space: nowrap;
}

@media (max-width: 768px){
  #gh-servers-page .gh-filters-actions .btn{
    flex: 1 1 auto;
  }
  #gh-servers-page .gh-filters-count{
    width: 100%;
    margin-left: 0;
    text-align: center;
  }
}

/* -------------------- Cart -------------------- */
#gh-cart .cart-grid{ display: grid; grid-template-columns: 1fr 360px; gap: 16px; }
#gh-cart .cart-table{ width: 100%; border-collapse: collapse; }
#gh-cart .cart-table th, #gh-cart .cart-table td{ padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: middle; }
#gh-cart .cart-table th{ font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); }
#gh-cart .cart-item-title{ font-weight: 800; }
#gh-cart .cart-pill{ display:inline-flex; align-items:center; gap:8px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); font-size:.9rem; }
#gh-cart .cart-actions{ display:flex; gap:10px; flex-wrap: wrap; }
#gh-cart .btn{ border-radius: 14px; }
#gh-cart .cart-summary .h3{ margin: 0; }
#gh-cart .cart-muted{ color: rgba(255,255,255,.68); }
#gh-cart .cart-empty{ padding: 18px; border: 1px dashed rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.04); }

@media (max-width: 992px){
  #gh-cart .cart-grid{ grid-template-columns: 1fr; }
}

/* -------------------- Floating cart button -------------------- */
.cart-fab{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  border: 1px solid rgba(255,255,255,.14);
  color: rgba(255,255,255,.92);
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cart-fab:hover{ text-decoration: none; color: #fff; transform: translateY(-1px); }
.cart-fab-ico{ font-size: 1.1rem; line-height: 1; }
.cart-fab-text{ font-weight: 800; letter-spacing: .01em; }
.cart-fab-badge{
  margin-left: 2px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 900;
  color: #0b0f1a;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

@media (max-width: 420px){
  .cart-fab{ left: 12px; bottom: 12px; padding: 11px 12px; }
  .cart-fab-text{ display:none; }
}


/* --- Cart floating button (force bottom-right) --- */
.cart-fab{
  position: fixed !important;
  right: 18px !important;
  left: auto !important;
  bottom: 18px !important;
  top: auto !important;
  z-index: 99999 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 14px !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, .82) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.95) !important;
  text-decoration: none !important;
  box-shadow: 0 12px 30px rgba(0,0,0,.35) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cart-fab:hover{
  transform: translateY(-1px);
  color: #fff !important;
}
.cart-fab-ico{ font-size: 18px; line-height: 1; }
.cart-fab-text{ font-weight: 600; letter-spacing: .2px; }
.cart-fab-badge{
  margin-left: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: rgba(59,130,246,.95);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
}

/* small nav badge */
.cart-nav-badge{ font-weight: 700; }

/* 17-02-2026 DISEÑO TARJETAS JUEGOS DASHBOARD*/
.gh-card.gh-card--game{
  position: relative;
  overflow: hidden;
  border-radius: 16px;

  background-color: var(--card-bg) !important;
  background-image: var(--card-bg-img) !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;

  /* CLAVE: crea stacking context estable */
  z-index: 0;
}

.gh-card.gh-card--game::before{
  content:"";
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.55);
  z-index: 1; /* overlay arriba del fondo */
  pointer-events:none;
}

.gh-card.gh-card--game > *{
  position: relative;
  z-index: 2; /* contenido arriba del overlay */
}


/* PELCULA OBSCURA PARA PAGINA SERVERS TARJETAS GRANDES)*/
/* ===== Overlay oscuro para portadas de GRUPO (Servers page) ===== */
.gh-game-group{
  position: relative;
  overflow: hidden;
}

/* película */
.gh-game-group::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,.45) 55%, rgba(0,0,0,.65) 100%);
  z-index:0;
}

/* asegura que el contenido quede arriba del overlay */
.gh-game-group > *{
  position: relative;
  z-index:1;
}

/* opcional: mejora legibilidad del título */
.gh-game-group .h5,
.gh-game-group .gh-muted{
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
}