/* Tables Index - Wooden Tavern Style */
.tables-index-container {
  background-color: #1a1a1a;
  background-image:
    radial-gradient(
      circle at 25% 25%,
      rgba(139, 69, 19, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(160, 82, 45, 0.1) 0%,
      transparent 50%
    );
  padding: 2rem 1rem;
}

.tables-index-title {
  font-family: "Goudy Mediaeval", serif;
  text-align: center;
  color: rgb(244, 228, 188);
  font-size: 3rem;
  font-weight: bold;
  margin-bottom: 3rem;
  text-shadow:
    2px 2px 0px #8b4513,
    4px 4px 0px rgba(0, 0, 0, 0.7),
    0 0 10px rgba(212, 175, 55, 0.3);
}

.tables-section {
  max-width: 1200px;
  margin: 0 auto 4rem auto;
}

.tables-section-title {
  color: #ddd;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tables-section-subtitle {
  margin-bottom: 1rem;
  color: #ddd;
  font-size: 1rem;
  font-weight: 200;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 0 1rem;
}

.table-card {
  position: relative;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.9)),
    url("/assets/ground/tavern-table-f523386c.avif");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  padding: 2rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(139, 69, 19, 0.8);
  overflow: hidden;
}

.table-card-create-new {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.2)),
    url("/assets/ground/tavern-table-f523386c.avif");
}

.table-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(139, 69, 19, 0.3) 0%,
    rgba(160, 82, 45, 0.2) 25%,
    rgba(205, 133, 63, 0.1) 50%,
    rgba(139, 69, 19, 0.2) 75%,
    rgba(101, 67, 33, 0.4) 100%
  );
  border-radius: 10px;
  z-index: 1;
}

.table-card::after {
}

.table-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 12px 24px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 0 20px rgba(212, 175, 55, 0.3);
  border-color: rgba(212, 175, 55, 0.6);
}

.table-card-disabled {
  filter: grayscale(100%) brightness(0.5);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}

.table-card-disabled:hover {
  transform: none;
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(139, 69, 19, 0.8);
}

.table-card-disabled .table-card-name {
  color: #999;
  text-shadow:
    1px 1px 0px #444,
    2px 2px 0px #333,
    3px 3px 4px rgba(0, 0, 0, 0.9);
}

.table-card-disabled .table-card-description {
  color: #777;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

.table-card-disabled .table-card-players {
  color: #888;
}

.table-card-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.table-card-name {
  color: #f4e4bc;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  text-shadow:
    1px 1px 0px #654321,
    2px 2px 0px #8b4513,
    3px 3px 4px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  font-family: "Goudy Mediaeval", serif;
  letter-spacing: 1px;
}

.table-card-description {
  color: #e6d7c1;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  text-shadow:
    1px 1px 2px rgba(0, 0, 0, 0.9),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  line-height: 1.4;
}

.table-card-players {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #d4af37;
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.table-card-players-icon {
  width: 16px;
  height: 16px;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.8));
}

.player-table-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
  color: #2c1810;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(139, 69, 19, 0.5);
  z-index: 3;
}

.empty-section-message {
  text-align: center;
  color: #888;
  font-size: 1.1rem;
  font-style: italic;
  margin: 3rem 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tables-index-container {
    padding: 1rem 0.5rem;
    touch-action: pan-y;
    /* -webkit-overflow-scrolling: touch; */
  }

  .tables-index-title {
    font-size: 2.2rem;
    margin-bottom: 2rem;
  }

  .tables-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 0.5rem;
  }

  .table-card {
    min-height: 180px;
    padding: 1.5rem;
  }

  .table-card-name {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .tables-index-title {
    font-size: 1.8rem;
  }

  .tables-section-title {
    font-size: 1.5rem;
  }

  .table-card {
    min-height: 160px;
    padding: 1.25rem;
  }

  .table-card-name {
    font-size: 1.2rem;
  }
}
