/* Main styles */
body {
  background-color: #f8f9fa;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* Loading screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Navigation */
.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
  cursor: pointer;
}

/* Cards */
.card {
  border-radius: 0.5rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 1rem;
}

.card-header {
  background-color: #f8f9fa;
  font-weight: 600;
}

/* Tournament list */
.list-group-item {
  cursor: pointer;
  transition: background-color 0.2s;
}

.list-group-item:hover {
  background-color: #f0f0f0;
}

.list-group-item.active {
  background-color: #0d6efd;
  border-color: #0d6efd;
}


.match-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0; /* Important for text-overflow to work */
  padding-right: 8px;
}


.accordion-button {
  padding: 0.6rem 0.8rem;
  font-size: 0.95rem;
}

.accordion-button .d-flex.w-100 {
  flex-wrap: nowrap;
}

.accordion-button .d-flex.align-items-center {
  flex-shrink: 0;
  margin-left: auto;
}

.accordion-body {
  padding: 0.75rem;
}

.card-body {
  padding: 0.75rem;
}

.accordion-button:not(.collapsed) {
  background-color: #e7f0fe;
  color: #0d6efd;
}

/* Tournament list improvements */
#tournament-list {
  max-height: 400px;
  overflow-y: auto;
}

/* Ensure all match elements are visible */
.accordion-item {
  overflow: visible;
}

.bracket-container {
  height: 600px;
  width: 100%;
  overflow: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  margin-bottom: 20px;
}

/* Server management */
.server-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Public matches page */
.copy-button {
  cursor: pointer;
}

/* Tournament status badges */
.badge-pending {
  background-color: #ffc107;
}

.badge-underway {
  background-color: #0d6efd;
}

.badge-complete {
  background-color: #198754;
}

.badge-open {
  background-color: #0dcaf0;
}

.badge-complete {
  background-color: #198754;
}

.badge {
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .col-md-4, .col-md-6, .col-md-8 {
    margin-bottom: 1rem;
  }
}

/* Server information in match headers */
.server-info {
  white-space: nowrap;
}
.copy-server {
  padding: 2px 6px;
  font-size: 0.8rem;
  margin-left: 5px;
}

/* Public matches table styling */
#public-matches-list .badge {
  margin-left: 8px;
}

#public-matches-list .table-primary {
  animation: highlight-pulse 2s infinite;
}

@keyframes highlight-pulse {
  0% { background-color: rgba(13, 110, 253, 0.1); }
  50% { background-color: rgba(13, 110, 253, 0.25); }
  100% { background-color: rgba(13, 110, 253, 0.1); }
}

/* Toast container */
#toast-container {
  z-index: 1100;
}

/* Toast styling */
.toast {
  max-width: 350px;
  font-size: 0.9rem;
}

.bg-success {
  background-color: #28a745 !important;
}

.bg-danger {
  background-color: #dc3545 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.bg-info {
  background-color: #17a2b8 !important;
}

/* Server information and copy button */
.server-info .badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.copy-server-btn {
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  line-height: 1;
  border-radius: 0.2rem;
}

/* Updated bracket container styling */
.bracket-container {
  height: 600px;
  width: 100%;
  overflow: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  margin-bottom: 20px;
}

#bracket-embed-container {
  position: sticky;
  top: 20px;
}

/* Add these styles to your style.css */

.match-card {
  transition: transform 0.2s;
  border-left: 3px solid #ccc;
}

.match-card.open {
  border-left-color: #0d6efd;
}

.match-card.complete {
  border-left-color: #198754;
}

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

.server-badge {
  cursor: pointer;
}

.server-badge:hover {
  background-color: #0d6efd !important;
}

.match-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}

.bracket-container {
  height: 500px;
  width: 100%;
  overflow: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  margin-bottom: 20px;
}