/* ====== Reset a základ ====== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  background-color: #f5f7fa;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ====== Hlavička ====== */
header {
  background-color: #0066cc;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.5rem;
}

.login-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0.5rem 1rem;
  color: white;
  border-radius: 8px;
  cursor: not-allowed;
}

/* ====== Hlavní obsah ====== */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  transition: all 0.4s ease;
}

.controls {
  margin: 16px;
  display: flex;
  justify-content: right;
  gap: 20px;
  margin-right: 20px;

}

.stats {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2rem;
  padding-top: 8px;
  width: 100%;
  max-width: 900px;
}

.team-stat {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: -30px;
}

.online {
  font-size: 18px;
  font-weight: bold;
}

.onlinedot {
  font-size: 24px;
  color: green;
  margin-top: -5px;
}

.cards {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  transition: all 0.5s ease;
}

.card {
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: all 0.4s ease, box-shadow 0.4s ease;
  cursor: pointer;
  opacity: 1;
  transform: scale(1);
  overflow: hidden;
}

.card-content {
  padding: 2rem;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.team-header {
      height: 15px;
}

.card h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

.value {
  font-size: 4rem;
  font-weight: bold;
  color: #0066cc;
}

.last-updated {
  font-size: 0.9rem;
  color: #777;
  margin-top: 0.5rem;
}

.team-last-updated {
  font-size: 1rem;
  color: #777;
  margin-top: 1rem;
}

.team-total-values {
  font-size: 1rem;
  color: #777;
}

.detail-button {
  background-color: #0066cc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 5px;
  font-size: 125%; /* zvětší tlačítko */
}

.card.hide {
  opacity: 0;
  transform: scale(0.8);
}

.card.hidden {
  display: none;
}

.team-detail {
  padding-top: 0px;
  padding-bottom: 0px;
}

/* ====== Modal ====== */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

.errors-log {
  padding: 1rem;
  border-radius: 8px;
}

.alerts {
  overflow-y: auto;
  max-height: 300px;
  margin-top: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.back-button {
  background-color: #0066cc;
  color: white;
  border: none;
  display: flex;
  justify-content: left;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  margin: 16px;
  margin-top: -56px;
  cursor: pointer;
}

/* ====== Alerty ====== */
.alert-active {
    animation: alertSensorPulse 1s infinite alternate;
}
@keyframes alertSensorPulse {
    0% { box-shadow: 0 0 5px rgba(255, 0, 0, 0.2); }
    100% { box-shadow: 0 0 12px rgba(255, 0, 0, 0.5); }
}



/* ====== Týmy ====== */
#blackteam header,
#blackteam .back-button {
  background-color: #000000;
}
#blackteam .value {
  color: #000000;
}

#blueteam header,
#blueteam .back-button {
  background-color: #0000cc;
}
#blueteam .value {
  color: #0000cc;
}

#redteam header,
#redteam .back-button {
  background-color: #cc0000;
}
#redteam .value {
  color: #cc0000;
}

#greenteam header,
#greenteam .back-button {
  background-color: #009900;
}
#greenteam .value {
  color: #009900;
}

#yellowteam header,
#yellowteam .back-button {
  background-color: #cccc00;
}
#yellowteam .value {
  color: #cccc00;
}

/* ====== Footer ====== */
footer {
  background-color: #f0f0f0;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #777;
}

/* ====== Responsivita ====== */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.2rem;
  }
  .card {
    padding: 1.5rem;
  }
}
