/* css/style.css */
:root {
  --primary: #212529;
  --secondary: #6c757d;
  --success: #28a745;
  --info: #17a2b8;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #0d6efd;
}

/* Párrafos */
body {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  font-size: 16px;
  background-color: #212529; /* #f8f9fa;*/
  color: #333;
  line-height: 1.6;
}

/* Títulos */
h1,
h2,
h3 {
  font-family: proxima-nova, sans-serif;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}
h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
h3 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Badges de notificaciones */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--danger);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.unread-badge,
.message-counter {
  background-color: var(--danger);
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 16px;
  text-align: center;
  display: inline-block;
}

/* Indicador de escritura */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--secondary);
  font-style: italic;
  font-size: 14px;
  margin: 10px 0;
  padding: 5px 10px;
  background-color: #f1f1f1;
  border-radius: 15px;
  width: fit-content;
}

.typing-dots {
  display: flex;
  gap: 2px;
}

.typing-dots span {
  width: 4px;
  height: 4px;
  background-color: var(--secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}

/* Estilos para la página de configuración de Telegram */
.stat-card {
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 1.5rem;
}

.section:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Notificaciones toast personalizadas */
.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 15px 20px;
  margin-bottom: 10px;
  max-width: 350px;
  animation: slideInRight 0.3s ease;
}

.custom-toast.success {
  border-left: 4px solid var(--success);
}

.custom-toast.error {
  border-left: 4px solid var(--danger);
}

.custom-toast.info {
  border-left: 4px solid var(--info);
}

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

/* Header */
header {
  background-color: var(--primary);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

header .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

header .nav-link:hover {
  color: white !important;
}
/* Estilos para la barra de navegación inferior */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 8px 0;
}

.mobile-nav .nav-item {
  text-align: center;
  padding: 5px 0;
}

.mobile-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0;
  color: #6c757d;
  transition: all 0.3s;
  text-decoration: none;
}

.mobile-nav .nav-link:hover {
  color: #0d6efd;
}

.mobile-nav .nav-link.active {
  color: #0d6efd;
}

.mobile-nav .nav-link svg {
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
}

.mobile-nav .nav-link span {
  font-size: 12px;
  line-height: 1;
}

/* Ajustar el padding inferior del body para evitar que el contenido quede oculto */
body {
  padding-bottom: 70px;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
  }
  body {
    padding-bottom: 0;
  }
}

/* Estilos para el navbar de escritorio */
.desktop-nav .navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.desktop-nav .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  margin: 0 0.5rem;
  transition: color 0.3s;
}

.desktop-nav .nav-link:hover {
  color: white !important;
}

/* Asegurar que el dropdown funcione correctamente */
.dropdown-menu {
  right: 0;
  left: auto;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary {
  color: var(--primary);
  background-color: transparent;
  background-image: none;
  border-color: var(--primary);
}

.btn-danger {
  color: #fff;
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-block {
  display: block;
  width: 100%;
}

/* Cards */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
}

.card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.shadow {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Forms */
.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group {
  margin-bottom: 1rem;
}

/* Alerts */
.alert {
  position: relative;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25em 0.4em;
  font-size: 75%;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.25rem;
}

.badge-success {
  color: #fff;
  background-color: var(--success);
}

.badge-info {
  color: #fff;
  background-color: var(--info);
}

.badge-primary {
  color: #fff;
  background-color: var(--primary);
}

.badge-secondary {
  color: #fff;
  background-color: var(--secondary);
}

/* Tables */
.table {
  width: 100%;
  margin-bottom: 1rem;
  background-color: transparent;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }

  .card {
    margin-bottom: 1rem;
  }

  .table-responsive {
    border: 0;
  }

  .btn-block {
    margin-bottom: 0.5rem;
  }

  header .navbar-nav {
    flex-direction: column;
  }

  header .nav-link {
    padding: 0.5rem 0;
  }
}

/* Utilities */
.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-muted {
  color: #a9aeb3 !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-5 {
  margin-top: 3rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.rounded {
  border-radius: 0.25rem !important;
}

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

.float-right {
  float: right !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

.h-100 {
  height: 100% !important;
}

.img-fluid {
  max-width: 100%;
  height: auto;
}

.list-group {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin-bottom: 0;
}

.list-group-item {
  position: relative;
  display: block;
  padding: 0.75rem 1.25rem;
  margin-bottom: -1px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.list-group-item:first-child {
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.list-group-item:last-child {
  margin-bottom: 0;
  border-bottom-right-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

.nav-tabs {
  border-bottom: 1px solid #dee2e6;
}

.nav-tabs .nav-item {
  margin-bottom: -1px;
}

.nav-tabs .nav-link {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-top-left-radius: 0.25rem;
  border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link.active {
  color: #495057;
  background-color: #fff;
  border-color: #dee2e6 #dee2e6 #fff;
}

/* Estilos adicionales para la página de juego */

.main-game-image {
  transition: transform 0.3s ease;
}

.main-game-image:hover {
  transform: scale(1.02);
}

.additional-image {
  cursor: pointer;
  transition: transform 0.2s ease;
}

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

.game-meta {
  gap: 10px;
  margin: 15px 0;
}

.price-display {
  background: linear-gradient(45deg, #28a745, #20c997);
  color: white;
  padding: 5px 15px;
  border-radius: 25px;
}

.info-item {
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0d6efd;
}

.game-description {
  line-height: 1.6;
  font-size: 1.1rem;
}

.bgg-description {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #17a2b8;
  font-style: italic;
}

@media (max-width: 768px) {
  .game-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-display {
    margin-top: 10px;
  }
}

/* Estilos adicionales para la página de publicación */

.game-thumbnail-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.game-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-thumbnail:hover {
  transform: scale(1.05);
}

.info-item {
  margin-bottom: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0d6efd;
}

.badge-light {
  background-color: #f8f9fa;
  color: #212529;
  border: 1px solid #dee2e6;
}

.bgg-description {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #17a2b8;
  font-style: italic;
}

/* Mejorar la apariencia de los resultados de búsqueda */
#searchResults {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.list-group-item {
  border: none;
  border-bottom: 1px solid #eee;
  padding: 10px;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

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

/* estilo para las tapas de juegos */
.game-card {
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Ajustamos el contenedor de imágenes a 260px de alto */
.game-image-container {
  position: relative;
  width: 100%;
  height: 300px;
  /*Alturafijade300px*/
  overflow: hidden;
  background-color: #f5f5f5;
  /* margin-top: 10px; */
  border-radius: 5px;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
}

.game-card {
  margin: 5px; /* Espaciado entre tarjetas */
  border: 1px solid #ddd; /* Opcional: agregar un borde */
  border-radius: 8px; /* Opcional: bordes redondeados */
}

/* Estilos base para todas las imágenes */
.game-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.5s ease;
}

/* Efecto de cambio de imagen en hover */
.primary-img {
  opacity: 1;
  z-index: 2 !important; /* Inicialmente por encima */
}

.secondary-img {
  opacity: 0;
  z-index: 1 !important; /* Inicialmente debajo */
}

.game-card:hover .primary-img {
  opacity: 0 !important;
  z-index: 1 !important;
}

.game-card:hover .secondary-img {
  opacity: 1 !important;
  z-index: 2 !important; /* Mayor prioridad en hover */
  transform: scale(1.05);
}

/* Badge para tipo de publicación */
.game-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge-success {
  background-color: #28a745;
  color: white;
}

.badge-info {
  background-color: #17a2b8;
  color: white;
}

/* Contenido de información */
.game-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.game-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.3;
  height: 2.6rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Timer para subastas */
.auction-timer {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Paginación */
.pagination {
  margin: 1rem 0;
  justify-content: center;
}

.pagination .page-item.active .page-link {
  background-color: var(--bs-warning);
  border-color: var(--bs-warning);
  color: black;
}

.pagination .page-link {
  border: 1px solid #dee2e6;
  color: #ffc107;
}

.pagination .page-link:hover {
  background-color: rgba(13, 110, 253, 0.1);
  border-color: #ffc107;
  color: #ffc107;
}

/* Para dispositivos móviles, reducir la altura */
@media (max-width: 767px) {
  .game-image-container {
    height: 360px;
  }
}

/* Para dispositivos muy pequeños */
@media (max-width: 400px) {
  .game-image-container {
    height: 300px;
  }
}
/* Estilos para el dropzone */
#dropzone {
  cursor: pointer;
  border-color: #212529 !important;
}

#dropzone:hover {
  background-color: #f0f7ff !important;
  border-color: #0a58ca !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15) !important;
}

#dropzone.dragover {
  background-color: #e7f3ff !important;
  border-color: #0a58ca !important;
  transform: scale(1.02);
}

.dropzone-content {
  pointer-events: none;
}

#dropzone .badge {
  font-size: 0.7rem;
}

/*hero*/
.hero-section {
  background-image: url("../assets/images/fondo.jpg"); /* Nueva imagen de fondo */
  background-size: cover; /* Asegura que la imagen cubra todo el contenedor */
  background-position: right; /* Centra la imagen */
  background-repeat: no-repeat; /* Evita que la imagen se repita */
  border-radius: 20px; /* Bordes redondeados */
  padding: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 0px auto;
  overflow: hidden;
  color: white; /* Asegura que el texto sea visible sobre la imagen */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8); /* Sombra para el texto */
}

.hero-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: #ffffff;
}

.hero-search {
  background-color: transparent;
  padding: 0px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-form .form-control {
  border-radius: 10px;
}

.search-button {
  border-radius: 10px;
}

.hero-categories .category-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-decoration: none;
  color: #333;
  background-color: #f1f1f1;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.3s ease;
  text-align: center;
}

.hero-categories .category-link:hover {
  background-color: #0d6efd;
  color: #fff;
}

.hero-image img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-section {
    padding: 15px;
    background-position: left;
  }
}
/* Botón activo para Venta (success - verde) */
.filter-btn.active[data-type="venta"] {
  background-color: var(--success) !important;
  border-color: var(--success) !important;
  color: white !important;
}

/* Botón activo para Pedido (secondary - gris) */
.filter-btn.active[data-type="pedido"] {
  background-color: var(--secondary) !important;
  border-color: var(--secondary) !important;
  color: white !important;
}

/* Botón activo para Intercambio (info - azul claro) */
.filter-btn.active[data-type="intercambio"] {
  background-color: var(--info) !important;
  border-color: var(--info) !important;
  color: white !important;
}

/* Botón activo para "Todos" (primary - azul) */
.filter-btn.active[data-type="todos"],
.filter-btn.active:not([data-type]) {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: white !important;
}

/* Estilos base para botones de filtro */
.filter-btn {
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

/* Efectos hover para cada tipo */
.filter-btn[data-type="venta"]:hover:not(.active) {
  background-color: rgba(40, 167, 69, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.filter-btn[data-type="pedido"]:hover:not(.active) {
  background-color: rgba(108, 117, 125, 0.1);
  border-color: var(--secondary);
  color: var(--secondary);
}

.filter-btn[data-type="intercambio"]:hover:not(.active) {
  background-color: rgba(23, 162, 184, 0.1);
  border-color: var(--info);
  color: var(--info);
}

.cta-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.6)),
    url("/assets/images/fondo.jpg") center/cover no-repeat;
  z-index: 0;
}
