.tournament-list-container {
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: rgba(20, 20, 20, 0.5);
  color: #ffffff;
  background-image: 
    linear-gradient(rgba(40, 40, 40, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 40, 40, 0.2) 1px, transparent 1px);
  background-size: 20px 20px;
  /* Ensure proper height accounting for bottom menu */
  max-height: calc(100vh - 50px);
}

.tournament-list-header {
  background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(40, 40, 40, 0.95) 100%);
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.tournament-list-title {
  width: 100%;
  height: 60px;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  gap: 12px;
}

.tournament-refresh-button {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.tournament-refresh-button:hover {
  border-color: rgba(52, 152, 219, 0.5);
  transform: translateY(-50%) scale(1.05);
}

.tournament-refresh-button:active {
  transform: translateY(-50%) scale(0.95);
}

.tournament-refresh-button img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.tournament-refresh-button.refreshing img {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tournament-list-logo {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(52, 152, 219, 0.3));
  flex-shrink: 0;
}

.tournament-list-title-text {
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffffff;
  white-space: nowrap;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.tournament-list-content {
  flex: 1;
  overflow-y: auto;
  position: relative;
  /* Mobile touch scrolling optimizations */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  /* Prevent text selection during scrolling */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Account for bottom menu */
  padding-bottom: 80px;
}

.tournament-list-content::-webkit-scrollbar {
  width: 0px;
  display: none;
}

.tournament-list-content::-webkit-scrollbar-track {
  display: none;
}

.tournament-list-content::-webkit-scrollbar-thumb {
  display: none;
}

.tournament-list-content::-webkit-scrollbar-thumb:hover {
  display: none;
}

/* Tournament sections container */
.tournament-sections-container {
  display: flex;
  flex-direction: column;
}

/* Tournament item container - holds header and card */
.tournament-item-container {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
}

/* Tournament item header section - replaces collapsible header */
.tournament-item-header-section {
  display: none !important;
}

/* Subtle clickable indicator for header */
.tournament-item-header-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(52, 152, 219, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.tournament-item-container:hover .tournament-item-header-section::after {
  opacity: 1;
}

/* Empty state */
.tournament-list-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

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

.empty-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-subtext {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

/* Error state */
.tournament-list-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.error-text {
  color: rgba(231, 76, 60, 0.9);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.error-retry-button {
  background-color: rgba(52, 152, 219, 0.8);
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.error-retry-button:hover {
  background-color: rgba(52, 152, 219, 1);
}

/* Legacy placeholder message (kept for backward compatibility) */
.placeholder-message {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  padding: 40px 20px;
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 219, 0.3);
  margin-top: 20px;
}

/* Floating Create Tournament Button */
.create-tournament-button {
  position: fixed;
  bottom: calc(100px + var(--sab));
  right: 20px;
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
  border: none;
  border-radius: 50px;
  padding: 16px 24px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  min-width: 160px;
  justify-content: center;
}

.create-tournament-button:hover:not(.disabled) {
  background: linear-gradient(135deg, #2980b9 0%, #1f5f8b 100%);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.6);
  transform: translateY(-2px);
}

.create-tournament-button:active:not(.disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
  background: linear-gradient(135deg, #1f5f8b 0%, #154360 100%);
}

.create-tournament-button:focus:not(.disabled) {
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4), 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.create-tournament-button:focus:not(:focus-visible) {
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Disabled state for non-enterprise users */
.create-tournament-button.disabled {
  background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
  color: rgba(255, 255, 255, 0.7);
  cursor: not-allowed;
  box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
  transform: none;
  opacity: 0.8;
}

.create-tournament-button.disabled:hover {
  background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
  box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
  transform: none;
}

.create-tournament-button.disabled:active {
  background: linear-gradient(135deg, #7f8c8d 0%, #6c7b7d 100%);
  box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
  transform: none;
}

.create-tournament-button.disabled:focus {
  box-shadow: 0 2px 8px rgba(127, 140, 141, 0.3);
}

/* Remove any pseudo-element styling */
.create-tournament-button::before,
.create-tournament-button::after {
  display: none;
}

.create-tournament-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.create-tournament-text {
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for smaller screens */
.create-tournament-button {
  bottom: 90px;
  right: 16px;
  padding: 14px 20px;
  min-width: 140px;
  font-size: 13px;
}

.create-tournament-icon {
  width: 16px;
  height: 16px;
}

/* Create Tournament Form Container */
.create-tournament-form-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.create-tournament-form-container .create-tournament-container {
  max-width: 800px;
  margin: 0 auto;
  background: #2c2c2c;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Ensure the form takes full height on mobile */
.create-tournament-form-container {
  padding: 10px;
}

.create-tournament-form-container .create-tournament-container {
  margin: 0;
  border-radius: 8px;
}

/* --- Professional Tournament Item Design --- */
.tournament-item {
  margin: 10px 7px;
}

.tournament-item-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-top: none;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 10px 0 rgba(30, 40, 60, 0.13), 0 1.5px 4px 0 rgba(52,152,219,0.07);
}


/* Active state - immediate feedback on click */
.tournament-item-card:active {
  transform: translateY(0);
  background: rgba(35, 35, 35, 0.98);
  border-color: rgba(52, 152, 219, 0.6);
  transition: all 0.1s ease;
}

/* Focus state - accessibility for keyboard navigation */
.tournament-item-card:focus {
  outline: none;
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.3);
}

/* Focus visible - only show focus ring when using keyboard */
.tournament-item-card:focus:not(:focus-visible) {
  box-shadow: none;
}

/* Clickable indicator - clickable.svg icon */
.tournament-item-card::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background-image: url('/assets/icons/clickable.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.3;
  transition: all 0.2s ease;
  pointer-events: none;
  filter: brightness(0) invert(1);
}

.tournament-item-card:hover::before {
  opacity: 0.7;
  transform: translateY(-50%) scale(1.1);
}

/* Mobile touch feedback */
.tournament-item-card:active {
  background: rgba(40, 40, 40, 0.95);
  transform: scale(0.98);
  transition: all 0.1s ease;
}

.tournament-item-image-wrap {
  position: relative;
  width: 80px;
  min-width: 80px;
  height: 80px;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tournament-list-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #1a1a1a;
}

.tournament-list-image-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.08) 0%, rgba(231, 76, 60, 0.08) 100%);
  pointer-events: none;
}

.tournament-public-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: #27ae60;
  color: #fff;
  font-size: 8px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
  z-index: 2;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tournament-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: none;
  justify-content: flex-start;
}

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

.tournament-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex: 1;
  line-height: 1.3;
}

.tournament-item-meta {
  display: flex;
  flex-direction: row;
  gap: 13px;
  margin-bottom: 3px;
}

.tournament-item-date, .tournament-item-participants {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: #b0b0b0;
  gap: 4px;
  line-height: 1.2;
  font-weight: 400;
}

.tournament-item-participants {
  font-size: 10px;
  color: #909090;
}

.date-icon, .participants-icon {
  width: 12px;
  height: 12px;
  filter: brightness(0) invert(0.7);
  flex-shrink: 0;
}

.tournament-item-award {
  font-size: 11px;
  max-height: 28px;
  padding: 5px 6px;
  font-size: 12px;
  color: #d0d0d0;
  margin-top: 4px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-line;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  border-left: 2px solid #3498db;
}

.tournament-item-award-label {
  font-weight: bold;
  color: #3498db;
  margin-right: 3px;
}

.tournament-item-award-text {
  color: #d0d0d0;
}

.tournament-item-image-wrap {
  width: 80px;
  min-width: 80px;
  height: 80px;
}

.tournament-item-info {
  padding: 6px 10px;
}

.tournament-item-title {
  font-size: 14px;
}



/* Tournament-specific header elements - only style what we pass */
.tournament-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  flex: 1 1 auto;
}

.tournament-header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #b2c2d6;
  background: none;
  border-radius: 0;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.tournament-status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  background: #b2c2d6;
}

.tournament-header-status.ongoing .tournament-status-dot { background: #27ae60; }
.tournament-header-status.upcoming .tournament-status-dot { background: #f1c40f; }
.tournament-header-status.registration .tournament-status-dot { background: #3498db; }
.tournament-header-status.completed .tournament-status-dot { background: #7f8c8d; }

.tournament-header-title {
  font-size: 15px;
}

.tournament-header-status {
  font-size: 12px;
} 

.tournament-status-badge {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 2;
  color: #b2c2d6;
  font-size: 8px;
  font-weight: 600;
  padding: 5px;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(66, 162, 227, 0.08);
  pointer-events: none;
  white-space: nowrap;
  border: 1px solid rgba(52, 152, 219, 0.12);
  width: 70px;
  text-align: left;
  display: inline-block;
  background: rgba(0, 0, 0, 0.6);
}