/* ============================================
   WONDERLAND GAMES PERU - POKELANCES
   Diseño: Gamer, Futurista, Oscuro Elegante
   ============================================ */

/* Fuentes - Guía de Marca */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap');

/* Variables - Paleta Oficial Wonderland Games */
:root {
  /* Colores de fondo - Guía de Marca */
  --color-bg-main: #0C1015;       /* Fondo principal - Negro azulado */
  --color-bg-card: #262F38;       /* Cards/Secciones - Gris azulado oscuro */
  --color-border: #4F646E;        /* Bordes UI - Gris azulado medio */
  --color-primary: #1DC5DF;       /* Color de marca - Turquesa vibrante */
  --color-text-main: #EEF1F3;     /* Texto principal - Blanco suave */
  --color-text-muted: #9F9C9C;    /* Texto secundario - Gris neutro */
  
  /* Aliases para compatibilidad */
  --bg-primary: var(--color-bg-main);
  --bg-secondary: #141A1F;
  --bg-tertiary: var(--color-bg-card);
  --bg-card: var(--color-bg-card);
  --accent-primary: var(--color-primary);
  --accent-secondary: #17A5BC;
  --accent-tertiary: #00E5A0;
  --text-primary: var(--color-text-main);
  --text-secondary: var(--color-text-muted);
  --text-muted: #6B7280;
  --border-subtle: var(--color-border);
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #1DC5DF, #17A5BC);
  --gradient-glow: radial-gradient(ellipse at center, rgba(29, 197, 223, 0.15) 0%, transparent 70%);
  --gradient-card: linear-gradient(145deg, #262F38, #1E252D);
  
  /* Sombras y efectos */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(29, 197, 223, 0.25);
  --shadow-neon: 0 0 15px rgba(29, 197, 223, 0.4), 0 0 30px rgba(29, 197, 223, 0.2);
  --border-glow: rgba(29, 197, 223, 0.5);
  
  /* Border radius - Guía de Marca */
  --radius-sm: 8px;
  --radius-md: 12px;        /* Botones: 10-14px */
  --radius-lg: 16px;        /* Cards: 16px */
  --radius-xl: 20px;
  --radius-full: 50%;
  
  /* Transiciones suaves */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg-main);
  color: var(--color-text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Fondo sutil con gradiente */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(29, 197, 223, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(29, 197, 223, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================
   COMPONENTES BASE
   ============================================ */

/* Contenedor principal */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-info-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-primary);
  text-transform: uppercase;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary), #0E8A9A);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 0 20px rgba(29, 197, 223, 0.3);
  border: 2px solid rgba(29, 197, 223, 0.2);
}

/* Botones - Guía de Marca */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Botón Primario - Fondo turquesa, texto oscuro */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg-main);
  box-shadow: 0 4px 15px rgba(29, 197, 223, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(29, 197, 223, 0.4);
  filter: brightness(1.1);
}

/* Botón Secundario - Transparente con borde */
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
  background: rgba(29, 197, 223, 0.1);
  box-shadow: 0 0 15px rgba(29, 197, 223, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.4);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Inputs - Guía de Marca */
.input-group {
  margin-bottom: 20px;
}

.input-group label {
  display: block;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input {
  width: 100%;
  padding: 14px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  background: var(--color-bg-main);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-main);
  transition: all var(--transition-fast);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 197, 223, 0.15);
}

.input::placeholder {
  color: var(--color-text-muted);
}

/* Cards - Guía de Marca */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-card);
}

.card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card), 0 0 20px rgba(29, 197, 223, 0.1);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* ============================================
   PÁGINA DE LOGIN
   ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-card);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo {
  justify-content: center;
  margin-bottom: 16px;
  font-size: 2rem;
}

.auth-header p {
  color: var(--text-secondary);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg-tertiary);
  padding: 4px;
  border-radius: var(--radius-md);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-tab.active {
  background: var(--color-primary);
  color: var(--color-bg-main);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-muted);
}

/* OAuth Buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 24px 0;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  background: var(--bg-card);
}

.btn-oauth:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-oauth svg {
  flex-shrink: 0;
}

.btn-google {
  background: white;
  color: #3c4043;
  border-color: #dadce0;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-facebook {
  background: #1877F2;
  color: white;
  border-color: #1877F2;
}

.btn-facebook:hover {
  background: #166fe5;
  box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.btn-facebook svg {
  filter: brightness(0) invert(1);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

/* ============================================
   PÁGINA DE SUBASTA (USUARIO)
   ============================================ */

.auction-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  padding: 24px 0;
  min-height: calc(100vh - 100px);
}

@media (max-width: 1024px) {
  .auction-layout {
    grid-template-columns: 1fr;
  }
}

/* Sección principal - Subasta actual */
.auction-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auction-card {
  position: relative;
  overflow: hidden;
}

.auction-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-holographic);
}

.auction-product {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .auction-product {
    grid-template-columns: 1fr;
  }
}

.product-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(145deg, #1e1e2e, #0a0a0f);
  aspect-ratio: 3/4;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.product-image:hover {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-card { color: var(--accent-primary); }
.badge-etb { color: var(--accent-tertiary); }
.badge-bundle { color: var(--accent-purple); }

.product-info {
  padding: 8px 0;
}

.product-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.product-meta span {
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.product-description {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Timer */
.auction-timer {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--color-bg-card);
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
}

.timer-display {
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  min-width: 140px;
}

.timer-display.urgent {
  color: #EF4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.timer-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-status {
  margin-left: auto;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.status-active {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.status-paused {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.status-ended {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* Current Bid */
.current-bid {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
}

.bid-amount {
  font-family: 'Orbitron', monospace;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.bid-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.bid-leader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
}

.bid-leader .crown {
  color: var(--color-primary);
}

/* Bid Input */
.bid-section {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.bid-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.bid-input {
  flex: 1;
  font-family: 'Space Mono', monospace;
  font-size: 1.25rem;
  text-align: center;
}

.quick-bids {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-bid-btn {
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.quick-bid-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* ============================================
   SIDEBAR
   ============================================ */

.auction-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Historial de pujas */
.bid-history {
  max-height: 400px;
  overflow-y: auto;
}

.bid-history::-webkit-scrollbar {
  width: 6px;
}

.bid-history::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.bid-history::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.bid-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.bid-item:last-child {
  border-bottom: none;
}

.bid-user {
  font-weight: 500;
}

.bid-user.winner {
  color: var(--accent-primary);
}

.bid-value {
  font-family: 'Space Mono', monospace;
  font-weight: 600;
  color: var(--accent-tertiary);
}

.bid-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Cola de productos */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  align-items: center;
  transition: all var(--transition-fast);
}

.queue-item:hover {
  background: var(--bg-card);
}

.queue-item-image {
  width: 60px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
}

.queue-item-info {
  flex: 1;
  min-width: 0;
}

.queue-item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.queue-item-price {
  font-family: 'Orbitron', monospace;
  font-size: 0.85rem;
  color: var(--color-primary);
}

/* Historial de ventas */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.history-list::-webkit-scrollbar {
  width: 6px;
}

.history-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

.history-item {
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-card);
  border-color: var(--color-border);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}

.history-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-main);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item-details {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.history-item-winner {
  color: var(--color-primary);
}

.history-item-price {
  font-family: 'Orbitron', monospace;
  font-weight: 600;
  color: var(--accent-tertiary);
}

.history-item-bids {
  color: var(--text-muted);
}

/* Badges de estado de pago */
.payment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.payment-badge.pending {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.payment-badge.paid {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.payment-badge.cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.payment-badge.refunded {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.payment-badge.skipped {
  background: rgba(156, 163, 175, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(156, 163, 175, 0.3);
}

/* ============================================
   PÁGINA DE ADMIN
   ============================================ */

.admin-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px 0;
}

@media (max-width: 1024px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

.admin-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* History table */
.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.history-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-table td {
  font-size: 0.95rem;
}

.history-table .price {
  font-family: 'Space Mono', monospace;
  color: var(--accent-tertiary);
}

.history-table .winner {
  color: var(--accent-primary);
}

/* ============================================
   QR PAGE
   ============================================ */

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  text-align: center;
}

.qr-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 48px;
  max-width: 480px;
  box-shadow: var(--shadow-card);
}

.qr-image {
  width: 280px;
  height: 280px;
  background: white;
  border-radius: var(--radius-lg);
  margin: 24px auto;
  padding: 16px;
}

.qr-image img {
  width: 100%;
  height: 100%;
}

.qr-code-text {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

/* ============================================
   ESTADOS Y UTILIDADES
   ============================================ */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notificaciones */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification.success {
  border-color: var(--accent-tertiary);
}

.notification.error {
  border-color: #ef4444;
}

.notification.bid {
  border-color: var(--accent-primary);
}

/* Badge de Sala - Diseño Visual Mejorado */
.room-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
  cursor: default;
}

.room-badge:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(29, 197, 223, 0.1);
}

.room-badge.is-owner {
  border-color: var(--color-primary);
  background: linear-gradient(145deg, rgba(29, 197, 223, 0.1), var(--color-bg-card));
  box-shadow: 0 0 20px rgba(29, 197, 223, 0.15);
}

.room-badge-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), #0E8A9A);
  border-radius: var(--radius-sm);
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(29, 197, 223, 0.2);
}

.room-badge-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-badge-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-main);
  line-height: 1.2;
}

.room-badge-owner {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.owner-indicator {
  width: 6px;
  height: 6px;
  background: var(--color-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(29, 197, 223, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.2); }
}

/* Badge de Usuario - Diseño Visual Mejorado (solo avatar y botón) */
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition-normal);
}

.user-badge:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(29, 197, 223, 0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-bg-main);
  background: linear-gradient(135deg, var(--color-primary), #0E8A9A);
  box-shadow: 0 2px 8px rgba(29, 197, 223, 0.3);
  flex-shrink: 0;
  position: relative;
}

.user-avatar.admin {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.user-avatar.tienda {
  background: linear-gradient(135deg, #9d4edd, #7b2cbf);
  box-shadow: 0 2px 8px rgba(157, 78, 221, 0.3);
}

.user-avatar.comprador {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.user-role-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 0.7rem;
  border-radius: 50%;
  line-height: 1;
  background: var(--color-bg-card);
  border: 2px solid var(--color-bg-main);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.user-role-badge.admin {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.user-role-badge.tienda {
  background: rgba(157, 78, 221, 0.2);
  color: #9d4edd;
}

.btn-logout {
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
  transform: translateY(-1px);
}

/* Users online indicator */
.users-online {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Scrollbar personalizado para modales */
.modal::-webkit-scrollbar {
  width: 8px;
}

.modal::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}

.modal::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

/* Tabs en modales */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--bg-secondary);
  color: var(--color-primary);
  border-color: var(--color-primary);
  border-bottom: 2px solid var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.tab-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* ============================================
   MODAL DE PRODUCTOS - DISEÑO MEJORADO
   ============================================ */

.product-modal {
  max-width: 650px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.product-modal .modal-header {
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
}

.product-modal .modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary) 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tabs de productos mejorados */
.product-tabs {
  display: flex;
  background: var(--bg-tertiary);
  padding: 8px;
  gap: 8px;
}

.product-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.product-tab.active {
  background: var(--bg-secondary);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(29, 197, 223, 0.2);
}

.product-tab .tab-icon {
  font-size: 1.2rem;
}

.product-tab .tab-text {
  font-family: 'Poppins', sans-serif;
}

/* Contenido de tabs */
.product-modal .tab-content {
  padding: 24px 28px;
  max-height: 55vh;
  overflow-y: auto;
  display: block;
}

.product-modal .tab-content.active {
  display: block;
}

.product-modal .tab-content::-webkit-scrollbar {
  width: 6px;
}

.product-modal .tab-content::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.product-modal .tab-content::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

/* Barra de búsqueda mejorada */
.search-container {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  font-size: 1.1rem;
  opacity: 0.6;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  font-size: 1rem;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(29, 197, 223, 0.15);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.btn-popular {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.btn-popular:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Contenedor de resultados del catálogo */
.catalog-results-container {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.catalog-results {
  max-height: 250px;
  overflow-y: auto;
  padding: 8px;
}

.catalog-results::-webkit-scrollbar {
  width: 6px;
}

.catalog-results::-webkit-scrollbar-track {
  background: transparent;
}

.catalog-results::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 3px;
}

/* Estado vacío del catálogo */
.catalog-empty-state {
  text-align: center;
  padding: 40px 20px;
}

.catalog-empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.catalog-empty-state .empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.catalog-empty-state .empty-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
}

/* Tarjeta de producto seleccionado */
.selected-product-card {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(29, 197, 223, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.selected-product-header {
  background: var(--color-primary);
  padding: 8px 16px;
}

.selected-badge {
  color: var(--bg-primary);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.selected-product-info {
  padding: 16px;
}

.selected-product-form {
  padding: 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
}

/* Formulario de producto mejorado */
.product-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border-subtle);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-label .required {
  color: #ef4444;
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.95rem;
  background: var(--bg-secondary);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 197, 223, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input.textarea {
  resize: vertical;
  min-height: 80px;
}

.form-input.with-icon {
  padding-left: 44px;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  opacity: 0.7;
  pointer-events: none;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Botón de agregar producto */
.btn-add-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--color-primary) 0%, #06b6d4 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: var(--bg-primary);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(29, 197, 223, 0.3);
}

.btn-add-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 197, 223, 0.4);
}

.btn-add-product:active {
  transform: translateY(0);
}

.btn-add-product .btn-icon {
  font-size: 1.2rem;
}

/* Contenedor del botón de envío */
.form-submit-container {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--color-primary);
}

/* Responsive para modal de productos */
@media (max-width: 600px) {
  .product-modal {
    max-width: 95vw !important;
  }
  
  .product-tabs {
    flex-direction: column;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .search-container {
    flex-direction: column;
  }
  
  .btn-popular {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive utilities */
.hide-mobile {
  display: block;
}

/* ============================================
   SELECTOR DE SALA
   ============================================ */

.room-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 24px;
  padding: 8px 16px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.room-selector label {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
}

.room-selector select {
  background: var(--color-bg-main);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--color-text-main);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-width: 180px;
}

.room-selector select:hover {
  border-color: var(--color-primary);
}

.room-selector select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(29, 197, 223, 0.15);
}

.user-role.tienda {
  background: linear-gradient(135deg, #9d4edd, #7b2cbf);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
  
  .timer-display {
    font-size: 1.75rem;
  }
  
  .bid-amount {
    font-size: 2rem;
  }
  
  .room-selector {
    margin-right: 12px;
    padding: 6px 12px;
  }
  
  .room-selector select {
    min-width: 120px;
    font-size: 0.85rem;
  }
  
  .header-right {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .room-badge {
    padding: 8px 12px;
    gap: 8px;
  }
  
  .room-badge-name {
    font-size: 0.85rem;
  }
  
  .user-badge {
    padding: 4px;
    gap: 8px;
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .user-role-badge {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
  }
  
  .btn-logout {
    width: 32px;
    height: 32px;
  }
}

