/* tournament-index.css */
/* Extracted from templates/pages/tournament/index.html */

.tournament-header {
  text-align: center;
  padding: 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tournament-header h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
  margin: 0 0 4px 0;
}

.tournament-header p {
  font-size: 14px;
  color: var(--text-white-muted);
  margin: 0;
}

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

/* Stack on very small screens */
@media (max-width: 360px) {
  .action-cards {
    grid-template-columns: 1fr;
  }
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  min-width: 0;
  /* Prevent overflow */
}

.action-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--navy-dark);
  transform: translateY(-2px);
}

.action-card-icon {
  width: 44px;
  height: 44px;
  background: var(--navy-dark);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark);
  flex-shrink: 0;
}

.action-card-icon svg {
  width: 20px;
  height: 20px;
}

.action-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
}

.action-card-desc {
  font-size: 11px;
  color: var(--text-white-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 400px) {
  .action-card-desc {
    white-space: normal;
    font-size: 10px;
  }

  .action-card-icon {
    width: 40px;
    height: 40px;
  }

  .action-card-icon svg {
    width: 20px;
    height: 20px;
  }
}

.tournaments-section {
  padding: 16px;
}

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

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
}

.tournament-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tournament-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.2s;
}

.tournament-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.tournament-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tournament-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-white);
  margin: 0 0 4px 0;
}

.tournament-card-format {
  display: inline-block;
  padding: 4px 8px;
  background: var(--lime-primary);
  color: var(--text-on-dark);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 6px;
}

.tournament-card-status {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.tournament-card-status.active {
  background: rgba(76, 175, 80, 0.2);
  color: #81c784;
}

.tournament-card-status.upcoming {
  background: rgba(33, 150, 243, 0.2);
  color: #64b5f6;
}

.tournament-card-status.completed {
  background: rgba(158, 158, 158, 0.2);
  color: #bdbdbd;
}

.tournament-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-white-muted);
}

.tournament-card-detail {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tournament-card-detail svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-white-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-white);
  margin: 0 0 8px 0;
}

.empty-state p {
  font-size: 14px;
  margin: 0;
}

/* Join Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

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

.modal-content {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, #141c2b 0%, #0d1420 100%);
  border: none;
  border-radius: 24px 24px 0 0;
  padding: 32px 24px 40px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  margin-bottom: 12px;
}

.modal-title {
  font-family: var(--font-heading, 'Montserrat', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: left;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: none;
  color: #fff;
}

.modal-input {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 6px;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.2s;
  margin-bottom: 14px;
  box-sizing: border-box;
}

.modal-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  font-weight: 400;
  letter-spacing: 4px;
}

.modal-input:focus {
  outline: none;
  border-color: var(--lime-bright, #F1F155);
  background: rgba(255, 255, 255, 0.1);
}

.modal-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: var(--lime-bright, #F1F155);
  color: #0a0f18;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.15s;
  box-sizing: border-box;
}

.modal-btn:hover {
  background: var(--lime-hover, #FFFF8D);
  transform: translateY(-1px);
}

.modal-hint {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 24px;
  margin-bottom: 0;
  text-align: center;
}

@media (min-width: 768px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }

  .modal-content {
    border-radius: 24px;
    margin-bottom: 10vh;
  }
}

/* Slots indicators */
.slots-open {
  color: #81c784;
}

.slots-full {
  color: #f87171;
}