:root{
  --bg1:#071018;
  --bg2:#0c1823;
  --bg3:#13212e;
  --bg4:#1b2a36;

  --card:rgba(8,14,20,.92);
  --card-soft:rgba(255,255,255,.03);
  --card-soft-2:rgba(255,255,255,.05);

  --text:#f5efe3;
  --muted:#c8bea9;
  --muted-2:rgba(245,239,227,.68);

  --gold:#c8a96b;
  --gold-2:#e2c792;
  --gold-3:#f4e7c7;
  --gold-soft:rgba(200,169,107,.18);

  --free:#4c8d66;
  --free-2:#68b17f;
  --mine:#c8a96b;
  --mine-2:#e2c792;
  --taken:#5a2f31;
  --taken-2:#7b4448;

  --border:1px solid rgba(200,169,107,.18);
  --border-soft:1px solid rgba(255,255,255,.08);

  --shadow-xl:0 28px 80px rgba(0,0,0,.42);
  --shadow-lg:0 16px 38px rgba(0,0,0,.28);

  --radius-xl:28px;
  --radius-lg:22px;
  --radius-md:18px;
  --radius-sm:14px;
}

*{
  box-sizing:border-box;
}

html, body{
  height:100%;
}

body{
  margin:0;
  color:var(--text);
  font-family:"Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(1200px 700px at 15% 10%, rgba(200,169,107,.10), transparent 55%),
    radial-gradient(900px 700px at 90% 20%, rgba(226,199,146,.06), transparent 55%),
    linear-gradient(135deg, var(--bg1), var(--bg2), var(--bg3), var(--bg4));
  background-attachment:fixed;
}

/* CONTENEDOR GENERAL */
.page{
  min-height:100vh;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:34px 22px;
}

.tarjeta{
  width:min(1280px, 100%);
  position:relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)),
    var(--card);
  border:var(--border);
  border-radius:var(--radius-xl);
  padding:28px;
  box-shadow:var(--shadow-xl);
  backdrop-filter:blur(14px);
  overflow:hidden;
}

.tarjeta::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:100%;
  height:4px;
  background:linear-gradient(90deg, transparent, var(--gold), var(--gold-2), transparent);
  opacity:.9;
}

.tarjeta::after{
  content:"";
  position:absolute;
  inset:14px;
  border-radius:calc(var(--radius-xl) - 8px);
  border:1px solid rgba(255,255,255,.04);
  pointer-events:none;
}

/* HEADER */
.top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
  margin-bottom:22px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(200,169,107,.12);
}

.eyebrow{
  display:inline-block;
  margin-bottom:8px;
  font-size:12px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold-2);
  opacity:.95;
}

.title h1{
  margin:0;
  font-family:Georgia, "Times New Roman", serif;
  font-size:40px;
  line-height:1.1;
  letter-spacing:.4px;
  color:var(--gold-3);
  text-shadow:0 1px 0 rgba(255,255,255,.03);
}

.title p{
  margin:10px 0 0;
  max-width:650px;
  color:var(--muted);
  font-size:15px;
  line-height:1.6;
}

.accent{
  color:var(--gold);
}

/* BOX USUARIO */
.usuarioBox{
  min-width:min(380px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-radius:22px;
  border:var(--border);
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.userLeft{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.avatar{
  width:54px;
  height:54px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-weight:900;
  font-size:18px;
  color:var(--gold-3);
  background:
    linear-gradient(135deg, rgba(200,169,107,.24), rgba(226,199,146,.08));
  border:1px solid rgba(226,199,146,.25);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06);
}

.userInfo{
  min-width:0;
}

.userLabel{
  font-size:12px;
  color:var(--muted);
  margin-bottom:4px;
}

#nombreMostrado{
  display:block;
  max-width:230px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:18px;
  font-weight:800;
  color:var(--gold-3);
  margin-bottom:4px;
}

.userMeta{
  max-width:230px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1.35;
  color:var(--muted-2);
}

/* LAYOUT */
.row{
  display:grid;
  grid-template-columns:1.45fr .62fr;
  gap:18px;
  align-items:start;
}

@media (max-width: 1024px){
  .row{
    grid-template-columns:1fr;
  }
}

/* PANELES */
.panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.018));
  border:var(--border);
  border-radius:var(--radius-lg);
  padding:18px;
  box-shadow:var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.04);
}

.panel-main{
  min-height:100%;
}

.panel-side{
  position:sticky;
  top:22px;
}

@media (max-width: 1024px){
  .panel-side{
    position:static;
  }
}

.panelHeader{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  margin-bottom:14px;
}

.panel h3{
  margin:0;
  font-family:Georgia, "Times New Roman", serif;
  font-size:22px;
  font-weight:700;
  color:var(--gold-3);
  letter-spacing:.2px;
}

.hint{
  font-size:12px;
  color:var(--muted-2);
  text-align:right;
}

/* FORMULARIO */
.formGrid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

@media (max-width: 920px){
  .formGrid{
    grid-template-columns:1fr;
  }
}

.field{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
}

.field label{
  display:block;
  width:100%;
  font-size:13px;
  font-weight:700;
  color:var(--gold-2);
  letter-spacing:.2px;
}

.field input{
  width:100%;
  height:48px;
  padding:0 15px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.24);
  color:var(--text);
  font-size:14px;
  outline:none;
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.field input::placeholder{
  color:rgba(245,239,227,.34);
}

.field input:focus{
  border-color:rgba(200,169,107,.42);
  box-shadow:0 0 0 4px rgba(200,169,107,.10);
  transform:translateY(-1px);
}

.field input:disabled{
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.80);
  cursor:not-allowed;
  opacity:.86;
}

.actionsRow{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-top:16px;
}

/* LEYENDA */
.leyenda{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
  margin-bottom:6px;
}

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:9px 14px;
  border-radius:999px;
  border:var(--border-soft);
  background:rgba(255,255,255,.035);
  font-size:13px;
  color:var(--text);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  display:inline-block;
}

.dot.free{ background:var(--free-2); }
.dot.mine{ background:var(--mine); }
.dot.taken{ background:#c16060; }

/* GRID NUMEROS */
.gridWrap{
  margin-top:18px;
  padding:16px;
  border-radius:22px;
  border:1px solid rgba(200,169,107,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(60px, 1fr));
  gap:10px;
}

@media (max-width: 560px){
  .page{
    padding:14px;
  }

  .tarjeta{
    padding:16px;
    border-radius:20px;
  }

  .top{
    margin-bottom:14px;
    padding-bottom:14px;
  }

  .title h1{
    font-size:30px;
  }

  .usuarioBox{
    min-width:100%;
  }

  .grid{
    grid-template-columns:repeat(auto-fill, minmax(58px, 1fr));
    gap:8px;
  }
}

/* BOTONES NUMEROS */
.numero{
  min-height:46px;
  border:none;
  border-radius:16px;
  font-size:15px;
  font-weight:900;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease, border-color .12s ease;
  user-select:none;
  letter-spacing:.2px;
}

.numero:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(0,0,0,.22);
  filter:brightness(1.04);
}

.numero:active{
  transform:scale(.98);
}

.numero.libre{
  color:#08150d;
  background:linear-gradient(180deg, var(--free-2), var(--free));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);
}

.numero.seleccionado{
  color:#2f2207;
  background:linear-gradient(180deg, var(--mine-2), var(--mine));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}

.numero.ocupado{
  color:#f4dede;
  background:linear-gradient(180deg, rgba(123,68,72,.48), rgba(90,47,49,.55));
  border:1px solid rgba(219,127,127,.18);
}

.numero.locked{
  cursor:not-allowed;
  opacity:.78;
  transform:none !important;
  filter:none !important;
  box-shadow:none !important;
}

/* BOTONES GENERALES */
.btn{
  border:none;
  border-radius:16px;
  padding:12px 16px;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  transition:transform .14s ease, box-shadow .14s ease, opacity .14s ease;
  color:#fff;
}

.btn:hover{
  transform:translateY(-1px);
}

.btn:active{
  transform:scale(.99);
}

.btn-secondary{
  color:var(--gold-3);
  border:1px solid rgba(200,169,107,.32);
  background:linear-gradient(180deg, rgba(200,169,107,.22), rgba(200,169,107,.14));
  box-shadow:0 10px 22px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.06);
}

.btn-secondary:disabled{
  opacity:.76;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:none !important;
}

.btn-primary{
  color:var(--gold-3);
  border:1px solid rgba(200,169,107,.32);
  background:linear-gradient(180deg, rgba(200,169,107,.24), rgba(200,169,107,.15));
  box-shadow:0 12px 24px rgba(0,0,0,.14), inset 0 1px 0 rgba(255,255,255,.05);
}

.btn-primary:hover{
  box-shadow:0 16px 30px rgba(0,0,0,.20);
}

.btn-primary:disabled{
  opacity:.72;
  cursor:not-allowed;
  transform:none !important;
  box-shadow:none !important;
}

.btn-danger{
  color:#ffe6e6;
  padding:10px 12px;
  border:1px solid rgba(197,113,113,.26);
  background:linear-gradient(180deg, rgba(123,68,72,.40), rgba(90,47,49,.35));
}

.btn-block{
  width:100%;
  margin-top:16px;
  min-height:50px;
  border-radius:18px;
  font-size:17px;
}

/* RESUMEN */
.resumenBox{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(200,169,107,.15);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
}

.resumenTitle{
  margin-bottom:8px;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1px;
  color:var(--muted-2);
}

.resumen{
  min-height:28px;
  font-size:17px;
  line-height:1.5;
  font-weight:900;
  color:var(--gold-2);
  word-break:break-word;
}

.tip{
  margin-top:16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

/* TOAST */
.toast{
  position:fixed;
  left:50%;
  bottom:22px;
  transform:translateX(-50%);
  z-index:9999;
  display:none;
  max-width:min(560px, 92vw);
  padding:12px 16px;
  border-radius:16px;
  color:var(--text);
  background:rgba(9,14,19,.96);
  border:1px solid rgba(200,169,107,.24);
  box-shadow:var(--shadow-xl);
  backdrop-filter:blur(10px);
}

.toast strong{
  color:var(--gold-2);
}

/* KEYWORDS: IMAGEN PREMIO SIMPLE / HERO / PREMIUM */
.heroPremioSimple{
  margin-bottom:18px;
  border-radius:24px;
  overflow:hidden;
  border:1px solid rgba(200,169,107,.18);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:0 16px 38px rgba(0,0,0,.28);
}

.heroPremioSimple img{
  width:100%;
  height:420px;
  object-fit:cover;
  display:block;
}

@media (max-width: 900px){
  .heroPremioSimple img{
    height:320px;
  }
}

@media (max-width: 560px){
  .heroPremioSimple img{
    height:240px;
  }
}

/* =========================================================
   PREMIO DE LA RIFA (foto completa a la izquierda + detalle)
   Usa los mismos colores y variables del resto del diseno
   ========================================================= */
.premioRifa{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr);
  margin-bottom:18px;
  border-radius:var(--radius-lg);
  overflow:hidden;
  border:var(--border);
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow:var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.04);
}

/* VISOR DE LA FOTO (cuadrado: se ve completa) */
.premioVisor{
  position:relative;
  aspect-ratio:1 / 1;
  background:#05090e;
  overflow:hidden;
}

.premioPrincipal{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:center;
  transition:opacity .25s ease;
}

.premioPrincipal.cambiando{
  opacity:0;
}

.premioVisor::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg, rgba(5,9,14,.28) 0%, transparent 22%);
  pointer-events:none;
}

.premioBadge{
  position:absolute;
  top:16px;
  left:16px;
  z-index:2;
  padding:8px 16px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold-3);
  background:rgba(8,14,20,.82);
  border:1px solid rgba(226,199,146,.45);
  backdrop-filter:blur(8px);
  box-shadow:0 8px 20px rgba(0,0,0,.35);
}

/* DETALLE (lado derecho) */
.premioDetalle{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:14px;
  padding:34px 36px;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(200,169,107,.10), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}

.premioEyebrow{
  font-size:12px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--gold-2);
}

.premioDetalle h2{
  margin:0;
  font-family:Georgia, "Times New Roman", serif;
  font-size:38px;
  line-height:1.12;
  color:var(--gold-3);
}

.premioDetalle p{
  margin:0;
  font-size:15px;
  line-height:1.65;
  color:var(--muted);
  max-width:440px;
}

.premioLinea{
  width:72px;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--gold), var(--gold-2), transparent);
}

.premioGaleriaTitulo{
  margin-top:6px;
  font-size:12px;
  letter-spacing:1px;
  text-transform:uppercase;
  color:var(--muted-2);
}

.premioMiniaturas{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

.premioMiniaturas img{
  width:104px;
  height:104px;
  object-fit:cover;
  border-radius:16px;
  cursor:pointer;
  opacity:.6;
  border:2px solid rgba(255,255,255,.14);
  box-shadow:0 8px 18px rgba(0,0,0,.35);
  transition:opacity .18s ease, border-color .18s ease, transform .18s ease;
}

.premioMiniaturas img:hover{
  opacity:1;
  transform:translateY(-2px);
}

.premioMiniaturas img.activa{
  opacity:1;
  border-color:var(--gold-2);
}

@media (max-width: 900px){
  .premioRifa{
    grid-template-columns:1fr;
  }

  .premioVisor{
    aspect-ratio:1 / 1;
    max-height:560px;
    width:100%;
  }

  .premioDetalle{
    padding:22px 20px 24px;
  }

  .premioDetalle h2{
    font-size:28px;
  }
}

@media (max-width: 560px){
  .premioBadge{
    top:12px;
    left:12px;
    font-size:11px;
    padding:6px 12px;
  }

  .premioDetalle h2{
    font-size:24px;
  }

  .premioMiniaturas img{
    width:84px;
    height:84px;
    border-radius:14px;
  }
}

/* =========================================================
   SELECTOR DE IDIOMA (Espanol / English)
   ========================================================= */
.langBar{
  position:relative;
  z-index:3;
  display:flex;
  justify-content:flex-end;
  margin-bottom:14px;
}

.langSwitch{
  display:inline-flex;
  gap:4px;
  padding:4px;
  border-radius:999px;
  border:var(--border);
  background:rgba(255,255,255,.04);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04);
}

.langBtn{
  border:none;
  background:transparent;
  color:var(--muted);
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  letter-spacing:1px;
  text-transform:uppercase;
  padding:8px 16px;
  border-radius:999px;
  cursor:pointer;
  transition:color .16s ease, background .16s ease, transform .12s ease;
}

.langBtn:hover{
  color:var(--gold-3);
}

.langBtn:active{
  transform:scale(.97);
}

.langBtn.active{
  color:#2f2207;
  background:linear-gradient(180deg, var(--mine-2), var(--mine));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}