body {
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.brand-icon {
  width: 42px;
  height: 42px;
}

.nav-admin-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  color: #1f2937 !important;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 1rem;
  margin-left: 0.5rem;
  transition: background 0.2s ease, transform 0.2s ease;
  text-decoration: none;
}

.nav-admin-link:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}

.card {
  border-radius: 1rem;
  border: none;
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(0,0,0,0.12);
}

.card-header {
  border-radius: 1rem 1rem 0 0 !important;
  font-weight: 600;
  border: none;
}

.btn-primary {
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-success {
  border-radius: 0.75rem;
  font-weight: 600;
}

.btn-warning {
  border-radius: 0.75rem;
  font-weight: 600;
}

.btn-outline-secondary {
  border-radius: 0.75rem;
  font-weight: 600;
}

.table {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  margin: 0 auto;
  border-collapse: collapse;
}

.table thead th {
  border-bottom: 2px solid #dee2e6;
  border-left: 1px solid #dee2e6;
}

.table thead th:first-child {
  border-left: none;
}

.table tbody td {
  border-left: 1px solid #dee2e6;
}

.table tbody td:first-child {
  border-left: none;
}

.bracket-container {
  display: flex;
  overflow-x: auto;
  padding: 1rem 0;
  align-items: flex-start;
}

.bracket-column {
  display: flex;
  flex-direction: column;
  min-width: 180px;
}

.column-header {
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.matches-column {
  display: flex;
  flex-direction: column;
}

.match-node {
  margin-bottom: 0;
}

.match-node:last-child {
  margin-bottom: 0;
}

.matches-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-node {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
}

.match-node-view {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.match-slots {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.slot-container {
  position: relative;
}

.slot-select {
  width: 100%;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #ced4da;
  border-radius: 0.25rem;
  background: white;
}

.slot {
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  background: #e9ecef;
  border-radius: 0.25rem;
  text-align: center;
  position: relative;
}

.slot.winner {
  background: #d4edda;
  border: 1px solid #28a745;
}

.slot.placeholder-slot {
  background: #fff3cd;
  border: 1px dashed #ffc107;
  color: #856404;
}

.slot .score {
  float: right;
  font-weight: 600;
  color: #495057;
}

.vs-line {
  text-align: center;
  font-size: 0.75rem;
  color: #6c757d;
  padding: 0.125rem 0;
}

.winner-arrow {
  display: flex;
  justify-content: center;
  padding: 0.25rem 0;
}

.connector-column {
  width: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.connector-svg {
  width: 60px;
  min-height: 50px;
}

.competitor-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.competitor-item {
  padding: 0.5rem;
  background: #e9ecef;
  border-radius: 0.375rem;
  cursor: grab;
  text-align: center;
  transition: all 0.2s ease;
}

.competitor-item:hover {
  background: #dee2e6;
  transform: translateX(4px);
}

.competitor-item:active {
  cursor: grabbing;
}

.bracket-preview {
  margin-top: 1rem;
}

.bracket-diagram {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.5rem;
}

.bracket-round {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.round-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.round-matches {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.match-box {
  background: white;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  min-width: 120px;
}

.match-box .slot {
  font-size: 0.75rem;
  padding: 0.25rem;
}

.table thead th {
  border: none;
  font-weight: 600;
}

.badge {
  font-weight: 600;
  padding: 0.5em 0.75em;
}

.alert {
  border-radius: 0.75rem;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-control, .form-select {
  border-radius: 0.75rem;
  border: 2px solid #e9ecef;
  transition: border-color 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-radius: 0.75rem;
}

.accordion-button {
  border-radius: 0.75rem !important;
  font-weight: 600;
}

.accordion-body {
  background: rgba(255,255,255,0.9);
}

.list-group-item {
  border: none;
  border-bottom: 1px solid #e9ecef;
  background: transparent;
}

.list-group-item:last-child {
  border-bottom: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: #2c3e50;
}

.drag-list {
  min-height: 320px;
  background: rgba(250,250,250,0.85);
  border: 2px dashed #d7dde9;
  border-radius: 1rem;
  padding: 1rem;
}

.drag-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  background: white;
  border: 1px solid #e9edf6;
  cursor: grab;
}

.drag-item.dragging {
  opacity: 0.6;
}

.hidden-inputs {
  display: none;
}

.score-input {
  width: 4rem;
  text-align: center;
  margin: 0;
}
