/* ═══════════════════════════════════════════════════════════
   EcuaPlay — Frontend CSS  |  Futuristic Dark Theme
   ═══════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --accent:          #F78D20;
  --accent-dark:     #d97010;
  --accent-light:    #ffb060;
  --accent-glow:     rgba(247,141,32,0.45);
  --accent-glow-sm:  rgba(247,141,32,0.25);
  --blue:            #4f6eff;
  --blue-glow:       rgba(79,110,255,0.35);
  --bg:              #07071e;
  --bg2:             #0a0a28;
  --bg3:             #0d0d38;
  --glass:           rgba(255,255,255,0.05);
  --glass-border:    rgba(255,255,255,0.10);
  --glass-border-hi: rgba(255,255,255,0.22);
  --text:            #ffffff;
  --text-muted:      rgba(255,255,255,0.45);
  --radius:          10px;
  --radius-lg:       16px;
  --h-btn:           44px;
  --font:            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ── Reset & base ───────────────────────────────────────────── */
html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  font-weight: 400;
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

*, *::before, *::after { box-sizing: border-box; }

p { padding: 0; margin: 0; }

/* ── Animated background grid ───────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(79,110,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79,110,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Radial glow top-left and bottom-right */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(79,110,255,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 85% 90%, rgba(247,141,32,0.10) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Typography helpers ─────────────────────────────────────── */
.roboto   { font-family: var(--font); font-weight: 400; }
.font700  { font-weight: 700 !important; }
.font600  { font-weight: 600; }
.font500  { font-weight: 500; }
.font400  { font-weight: 400; }
.float-right { float: right; }
.float-left  { float: left; }
.tcenter  { text-align: center !important; }
.w25  { width: 25% !important; }
.w50  { width: 50% !important; }
.w100 { width: 100% !important; }
.text-overflow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.textcut2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

/* ── Layout primitives ──────────────────────────────────────── */
.crow {
  float: left;
  position: relative;
  box-sizing: border-box;
  width: 100%;
}

.vcenter {
  display: flex;
  justify-content: center;
  align-items: center;
}

.rounded { border-radius: 50% !important; }

/* ── Shadows ────────────────────────────────────────────────── */
.shadow1 { box-shadow: 0 2px 16px rgba(0,0,0,0.25); }
.shadow2 { box-shadow: 0 6px 30px rgba(0,0,0,0.45); }

/* ── Backgrounds ────────────────────────────────────────────── */
.bg-cover   { background-position: center; background-size: cover;   background-repeat: no-repeat; }
.bg-contain { background-position: center; background-size: contain; background-repeat: no-repeat; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
.blink { animation: blink 1s infinite; }

@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow-sm), 0 0 20px var(--accent-glow); }
  50%       { box-shadow: 0 0 14px var(--accent-glow), 0 0 40px var(--accent-glow), 0 0 60px rgba(247,141,32,0.15); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes border-flow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float-up {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

.agentbg {
  background: radial-gradient(ellipse at 10% 90%, #3cc2dd 0%, transparent 50%),
              radial-gradient(ellipse at 90% 10%, #7700c7 0%, transparent 50%), #0d0d38;
  animation: border-flow 6s ease infinite;
}

/* ── Scrollbars ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.03); }
::-webkit-scrollbar-thumb { background: rgba(247,141,32,0.4); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.catsList::-webkit-scrollbar { display: none; }

/* ── Placeholders ───────────────────────────────────────────── */
::placeholder { color: rgba(255,255,255,0.25); opacity: 1; }

/* ── Interactive base ───────────────────────────────────────── */
.btn {
  opacity: 1;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity 0.15s ease, transform 0.12s ease;
}
.btn:active { opacity: 0.78; transform: scale(0.96); }
.product { cursor: pointer; }

/* ── Swiper ─────────────────────────────────────────────────── */
.swiper-pagination-bullet-active { background: var(--accent) !important; }

/* ── Inputs ─────────────────────────────────────────────────── */
.input1 {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--glass-border);
  box-sizing: border-box;
  width: 100%;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 400;
  padding-left: 13px !important;
  padding-right: 13px !important;
  outline: none;
  min-height: var(--h-btn);
  color: var(--text);
  font-family: var(--font);
  resize: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.input1:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px var(--accent-glow-sm), 0 0 12px var(--accent-glow);
}
.input1.gray {
  background: rgba(255,255,255,0.04) !important;
  border: 1.5px solid var(--glass-border) !important;
  color: var(--text) !important;
}
.input1.gray:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow-sm), 0 0 12px var(--accent-glow) !important;
  background: rgba(255,255,255,0.07) !important;
}
.input1.search {
  background: rgba(255,255,255,0.05);
  border: 1.5px solid var(--glass-border);
  border-radius: 22px;
}
.input1.search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow-sm);
}
textarea { padding: 12px; }

/* ═══════════════════════════════════════════════════════════
   BOTONES — Sistema futurista unificado
   ═══════════════════════════════════════════════════════════ */

/* Base */
[class^="buton-"], [class*=" buton-"] {
  outline: none;
  border: none;
  box-sizing: border-box;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.4px;
  min-height: var(--h-btn);
  padding: 0 20px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.12s ease, opacity 0.15s ease;
}

/* Shimmer interno en hover */
[class^="buton-"]::after, [class*=" buton-"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255,255,255,0.15) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
[class^="buton-"]:hover::after, [class*=" buton-"]:hover::after {
  opacity: 1;
  animation: shimmer 0.6s ease forwards;
}

/* ── Botón principal — naranja con glow ── */
.buton-color {
  background: linear-gradient(110deg, #FF9F3A 0%, var(--accent) 40%, #c96800 100%);
  color: #fff;
  border: 1px solid rgba(255,160,60,0.4);
  box-shadow: 0 2px 12px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
}
.buton-color:hover {
  box-shadow: 0 4px 22px var(--accent-glow), 0 0 40px rgba(247,141,32,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}
.buton-color:active { transform: scale(0.96); }

/* ── Naranja sólido ── */
.buton-orange {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 10px var(--accent-glow-sm);
}
.buton-orange:hover { background: #ff9a2a; box-shadow: 0 4px 20px var(--accent-glow); }

/* ── Outline naranja ── */
.buton-color-outline {
  background: rgba(247,141,32,0.06);
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: 0 0 8px rgba(247,141,32,0.12), inset 0 0 12px rgba(247,141,32,0.04);
}
.buton-color-outline:hover {
  background: rgba(247,141,32,0.14);
  box-shadow: 0 0 16px var(--accent-glow), inset 0 0 20px rgba(247,141,32,0.08);
}

/* ── Glass blanco ── */
.buton-white {
  background: rgba(255,255,255,0.10);
  color: var(--text);
  border: 1.5px solid var(--glass-border-hi);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
}
.buton-white:hover { background: rgba(255,255,255,0.17); }

/* ── Outline blanco ── */
.buton-white-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.buton-white-outline:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }

/* ── Oscuro / glass ── */
.buton-black {
  background: rgba(0,0,0,0.45);
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
}
.buton-black:hover { background: rgba(0,0,0,0.6); }

/* ── Outline dark ── */
.buton-black-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.buton-black-outline:hover { background: rgba(255,255,255,0.06); }

/* ── Gris glass ── */
.buton-gray {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.12);
}
.buton-gray:hover { background: rgba(255,255,255,0.12); }

.buton-gray2 {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  border: 1.5px solid rgba(255,255,255,0.08);
}

/* ── Header pill ── */
.buton-header {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.11);
  font-size: 14px;
  font-weight: 500;
  min-height: 38px;
  padding: 0 14px;
  backdrop-filter: blur(6px);
}
.buton-header:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

/* ── Sin padding ── */
.buton-nopad { padding-left: 0 !important; padding-right: 0 !important; }

/* ═══════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════ */

/* Ensure all layout sits above canvas starfield (z-index:0) */
.main-content, .ticketPanel {
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.header {
  width: 100%;
  height: 70px;
  background: rgba(10,10,35,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-align: center;
  position: relative;
  z-index: 10;
}
/* Línea de brillo inferior */
.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--blue), var(--accent), transparent);
  opacity: 0.6;
}

.header-logo {
  position: absolute;
  top: 20px;
  left: 105px;
  height: 30px;
}

/* ── Left panel ── */
.leftPanel {
  width: 280px;
  height: 100%;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: rgba(8,8,28,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255,255,255,0.07);
  box-shadow: 4px 0 40px rgba(0,0,0,0.5);
}
/* Borde naranja sutil izquierda */
.leftPanel::before {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--accent), var(--blue), transparent);
  opacity: 0.4;
}

/* ── Ticket panel ── */
.ticketPanel {
  width: 300px;
  height: 100%;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  background: rgba(8,8,28,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255,255,255,0.07);
}

/* ── Menú lateral ── */
.left-item {
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  color: rgba(255,255,255,0.60);
  display: flex;
  align-items: center;
  min-height: 50px;
  background: transparent;
  box-sizing: border-box;
  padding: 0 14px 0 16px;
  margin: 2px 8px;
  border-radius: var(--radius);
  font-weight: 500;
  border-left: 3px solid transparent;
  gap: 11px;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}
.left-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247,141,32,0.08), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.left-item:hover::before { opacity: 1; }
.left-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}
.left-item.active {
  font-weight: 600;
  color: var(--accent);
  background: rgba(247,141,32,0.10);
  border-left: 3px solid var(--accent);
  box-shadow: inset 0 0 20px rgba(247,141,32,0.06);
}
.left-item i {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  font-size: 15px;
}
.left-item.mobile { font-size: 14px !important; }
/* Badge de notificaciones */
.left-item .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Splash ── */
.splash {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(79,110,255,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 80%, rgba(247,141,32,0.12) 0%, transparent 60%),
              var(--bg);
  z-index: 1000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 150px;
  background-image: url(../../cdn/images/ecuaplay2.png);
}

/* ── Notificaciones ── */
.noty {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  min-width: 260px;
  padding: 12px 22px;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  z-index: 99999;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  animation: float-up 0.25s ease;
}

/* ── Misc ── */
.product { cursor: pointer; }
.photos::-webkit-scrollbar { height: 4px; }
.photos::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 4px; }
.photos::-webkit-scrollbar-thumb { background: rgba(247,141,32,0.4); border-radius: 4px; }

.story-content { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 15px; }

.agent { position: fixed; top: 0; right: 0; box-sizing: border-box; height: 100%; width: 600px; padding: 10px; }
.agent.mobile { padding: 0; width: 100%; }
.agent-content { height: 100%; background: rgba(10,10,30,0.9); backdrop-filter: blur(20px); border-radius: 15px; border: 1px solid var(--glass-border); }
.agent.mobile .agent-content { border-radius: 0; }


/* ── Player Chat Widget ── */
#playerChatBtn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 22px;
  z-index: 400;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F78D20, #d96e0a);
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(247,141,32,0.45);
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#playerChatBtn:hover { transform: scale(1.08); box-shadow: 0 6px 26px rgba(247,141,32,0.6); }

#playerChatPanel {
  display: none;
  position: fixed;
  bottom: 86px;
  right: 22px;
  z-index: 400;
  width: 310px;
  height: 430px;
  background: #0D1128;
  border: 1px solid rgba(247,141,32,0.25);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.pchat-header {
  background: linear-gradient(135deg, #1a2040, #141830);
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(247,141,32,0.15);
}
.pchat-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(247,141,32,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F78D20;
  font-size: 14px;
  flex-shrink: 0;
}
.pchat-header-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.2px;
}
.pchat-header-sub {
  font-size: 10px;
  color: rgba(247,141,32,0.7);
  font-weight: 400;
  display: block;
  margin-top: 1px;
}
.pchat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.pchat-close:hover { color: #fff; }

#playerChatMsgList {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  background: #0D1128;
}
#playerChatMsgList::-webkit-scrollbar { width: 4px; }
#playerChatMsgList::-webkit-scrollbar-track { background: transparent; }
#playerChatMsgList::-webkit-scrollbar-thumb { background: rgba(247,141,32,0.3); border-radius: 4px; }
#playerChatMsgList .chat-msg-mine .chat-msg-text {
  background: linear-gradient(135deg, #F78D20, #d96e0a);
  color: #fff;
  border-radius: 14px 14px 3px 14px;
}
#playerChatMsgList .chat-msg-other .chat-msg-text {
  background: rgba(255,255,255,0.08);
  color: #e8eaf0;
  border-radius: 14px 14px 14px 3px;
}
#playerChatMsgList .chat-msg-time { color: rgba(255,255,255,0.3); }
#playerChatMsgList .chat-day-label {
  color: rgba(255,255,255,0.25);
  font-size: 10px;
  text-align: center;
  margin: 4px 0;
}

.pchat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.2);
  font-size: 12px;
  gap: 8px;
}
.pchat-empty i { font-size: 28px; opacity: 0.3; }

.pchat-input-bar {
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 7px;
  align-items: flex-end;
  background: #111428;
  flex-shrink: 0;
}
.pchat-input-bar textarea {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 13px;
  resize: none;
  outline: none;
  font-family: inherit;
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.4;
  color: #fff;
  transition: border-color 0.2s;
}
.pchat-input-bar textarea::placeholder { color: rgba(255,255,255,0.25); }
.pchat-input-bar textarea:focus { border-color: rgba(247,141,32,0.4); }
.pchat-input-actions { display: flex; flex-direction: column; gap: 5px; }
.pchat-img-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255,255,255,0.07);
  border-radius: 9px;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.pchat-img-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.pchat-send-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: linear-gradient(135deg, #F78D20, #d96e0a);
  border-radius: 9px;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 2px 10px rgba(247,141,32,0.35);
  transition: transform 0.12s, box-shadow 0.12s;
}
.pchat-send-btn:hover { transform: scale(1.07); box-shadow: 0 4px 14px rgba(247,141,32,0.5); }

#playerChatBadge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #EF4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  line-height: 14px;
  display: none;
}

/* ── Ripple effect (añadido por JS) ── */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0);
  animation: ripple-anim 0.55s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0; }
}
