.event-item {
  padding: 15px;
  background: rgba(44, 50, 63, 0.7);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid #3a7bd5;
  color: #e0e6f0;
  position: relative;
}

.event-item:hover {
  transform: translateX(5px);
  background: rgba(58, 123, 213, 0.7);
  color: #fff;
  box-shadow: 0 4px 12px rgba(58, 123, 213, 0.3);
}

.event-item.active {
  background: rgba(58, 123, 213, 0.85);
  color: #fff;
}

/* Стили для заблокированных турниров */
.event-item.locked {
  /* background: rgba(80, 40, 40, 0.5); */
  /* background: rgba(9, 6, 6, 0.5); */
  background: rgba(28, 28, 28, 0.5);
  border-left: 4px solid #f44336;
  opacity: 0.7;
  cursor: not-allowed;
}

/* Заблокированный турнир, но выбранный */
.event-item.locked.active {
  background: rgba(77, 77, 77, 0.7);
  border-left: 4px solid #f44336;
  opacity: 1;
  color: #fff;
}

.event-item.locked:hover {
  transform: translateX(0);
  /* background: rgba(80, 40, 40, 0.7); */
  background: rgba(77, 77, 77, 0.5);
  color: #e0e6f0;
  box-shadow: 0 2px 8px rgba(244, 67, 54, 0.2);
}

.event-item.active-tournament:hover {
  background: rgba(76, 175, 80, 0.4);
  transform: translateX(5px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.event-item.active-tournament.active {
  background: rgba(76, 175, 80, 0.6);
  color: #fff;
  border-color: #4caf50;
}

.matches-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.matches-table th {
  background: rgba(58, 123, 213, 0.8);
  color: #e0e6f0;
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

.matches-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(100, 110, 130, 0.5);
  color: #e0e6f0;
}

.matches-table tr:hover {
  background: rgba(58, 123, 213, 0.3);
}

.match-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
  padding: 15px;
  background: rgba(44, 50, 63, 0.7);
  border-radius: 8px;
  border-left: 4px solid #3a7bd5;
  color: #e0e6f0;
  transition: all 0.2s ease;
}

.match-admin-panel {
  position: absolute;
  top: 5px;
  left: 5px;
  display: none;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.match-row.hovered .match-admin-panel {
  display: flex;
}

.match-result-toggle {
  border-radius: 5px;
  background: transparent !important;
  border: 1px solid rgba(58, 123, 213, 0.9);
  color: #e0e6f0;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 5px !important;
  transition: transform 0.2s ease, background 0.2s ease;
}

.match-result-toggle[aria-expanded="true"] {
  background: rgba(77, 184, 168, 0.95);
  border-color: rgba(77, 184, 168, 0.95);
  transform: rotate(90deg);
}

.match-result-controls {
  display: none;
  gap: 5px;
  flex-wrap: wrap;
}

.match-result-controls.visible {
  display: flex;
}

.match-admin-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  width: auto;
  z-index: 1;
  display: none;
}

.match-row.hovered .match-admin-actions {
  display: flex;
}

.match-admin-toggle {
  border-radius: 5px;
  background: transparent !important;
  border: 1px solid rgba(58, 123, 213, 0.9);
  color: #e0e6f0;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  /* transition: background 0.2s ease, transform 0.2s ease; */
  padding: 3px 5px !important;
  transition: transform 0.2s ease, background 0.2s ease;
}

.match-admin-toggle:hover {
  background: transparent;
}

.match-admin-toggle[aria-expanded="true"] {
  background: rgba(77, 184, 168, 0.95);
  border-color: rgba(77, 184, 168, 0.95);
  transform: rotate(-90deg);
}

.match-admin-controls {
  position: absolute;
  top: 0;
  right: 32px;
  display: none;
  gap: 5px;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.match-admin-controls.visible {
  display: flex;
}

.event-admin-actions {
  position: absolute;
  top: 5px;
  right: 10px;
  width: auto;
  z-index: 1;
  display: none;
  gap: 5px;
  align-items: center;
  justify-content: flex-end;
}

.event-admin-controls {
  position: absolute;
  top: 0;
  right: 32px;
  display: none;
  gap: 5px;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.event-admin-controls.visible {
  display: flex;
}

.event-admin-toggle {
  border-radius: 5px;
  background: transparent !important;
  border: 1px solid rgba(58, 123, 213, 0.9);
  color: #e0e6f0;
  font-size: 0.8em;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 5px !important;
  transition: transform 0.2s ease, background 0.2s ease;
}

.event-admin-toggle:hover {
  background: transparent;
}

.event-admin-toggle[aria-expanded="true"] {
  background: rgba(77, 184, 168, 0.95);
  border-color: rgba(77, 184, 168, 0.95);
  transform: rotate(-90deg);
}

.event-item:hover .event-admin-actions {
  display: flex;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.tournaments-section-divider {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 1.1em;
  font-weight: 700;
  color: #ffd700;
  /* padding: 20px 0 10px 0; */
  /* margin-top: 10px; */
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-card {
  display: flex;
  justify-content: space-between;
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(58, 123, 213, 0.6) 0%,
    rgba(44, 50, 63, 0.8) 100%
  );
  border: 1px solid rgba(58, 123, 213, 0.5);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  color: #e0e6f0;
  align-items: center;
}

.event-card:hover {
  transform: translateY(-5px);
  background: linear-gradient(
    135deg,
    rgba(58, 123, 213, 0.8) 0%,
    rgba(44, 50, 63, 1) 100%
  );
  box-shadow: 0 8px 20px rgba(58, 123, 213, 0.4);
  border-color: rgba(58, 123, 213, 0.8);
}

.event-card-title {
  font-weight: 600;
  font-size: 1.1em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.event-icon {
  /* width: 24px; */
  /* height: 24px; */
  object-fit: contain;
  border-radius: 4px;
}

.tournament-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: middle;
  background: rgba(224, 230, 240, .4);
}

.event-card .event-icon {
  width: 35px;
  height: 35px;
}

.event-grid > .event-card {
  align-items: center;
}

.event-card-count {
  font-size: 0.9em;
  opacity: 0.8;
  color: #b0b8c8;
}

.event-card-locked {
  font-size: 0.85em;
  color: #f44336;
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(244, 67, 54, 0.2);
  border-radius: 4px;
}

.event-card-winner {
  font-size: 0.9em;
  color: #ffd700;
  margin-top: 10px;
  padding: 8px;
  background: rgba(255, 215, 0, 0.15);
  border-radius: 4px;
  border-left: 3px solid #ffd700;
  font-weight: 500;
}

.event-card.locked {
  background: linear-gradient(
    135deg,
    rgba(80, 40, 40, 0.5) 0%,
    rgba(40, 30, 30, 0.7) 100%
  );
  border: 1px solid rgba(244, 67, 54, 0.5);
  opacity: 0.7;
  cursor: not-allowed;
}

.event-card.locked:hover {
  transform: translateY(0);
  background: linear-gradient(
    135deg,
    rgba(80, 40, 40, 0.6) 0%,
    rgba(40, 30, 30, 0.8) 100%
  );
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
  border-color: rgba(244, 67, 54, 0.6);
}

.btn-back {
  background: rgba(58, 123, 213, 0.7);
  color: #e0e6f0;
  border: 1px solid rgba(58, 123, 213, 0.8);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95em;
  transition: all 0.3s;
}

.btn-back:hover {
  background: rgba(58, 123, 213, 0.9);
  box-shadow: 0 4px 12px rgba(58, 123, 213, 0.3);
}

/* Стили для профиля */
.event-card.upcoming {
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.1),
    rgba(33, 150, 243, 0.05)
  );
  border: 1px solid rgba(33, 150, 243, 0.3);
}

.event-card.upcoming:hover {
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.15),
    rgba(33, 150, 243, 0.08)
  );
  border-color: rgba(33, 150, 243, 0.5);
}

.event-card-start-date {
  font-size: 0.85em;
  color: #2196f3;
  margin-top: 5px;
  font-weight: 500;
}

