/* 🌒 Tmavý základ */
body {
  margin: 0;
  background-color: #121212;
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
}

header {
  background-color: #1e1e1e;
  padding: 15px;
  text-align: center;
  border-bottom: 2px solid #444;
}

footer {
  background-color: #1e1e1e;
  padding: 10px;
  text-align: center;
  margin-top: 40px;
  border-top: 2px solid #444;
}

h1 {
  color: #ffffff;
}
/* Admin Menu */
.admin-menu {
    display: flex;
    gap: 15px;
    margin: 15px 0;
    background: #f5f5f5;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: bold;
}
.admin-menu a {
    text-decoration: none;
    color: #333;
}
.admin-menu a:hover {
    text-decoration: underline;
}
/* 📋 Admin */
.visitor-grid {
  display: flex;
  flex-direction: column;
  margin: 30px;
  gap: 5px;
}

.visitor-grid h2 {
  text-align: center;
  margin-top: 0;
  color: #fff;
}

.visitor-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  background-color: #1a1a1a;
  padding: 10px;
  border-radius: 5px;
}

.visitor-row.header {
  font-weight: bold;
  background-color: #333;
  border: 1px solid #555;
}

.visitor-row > div {
  word-break: break-word;
}

.delete-btn {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #dc3545;
  transition: transform 0.2s;
}

.delete-btn:hover {
  transform: scale(1.2);
  color: #a71d2a;
}

.flash-msg {
  background-color: #222;
  padding: 10px;
  margin: 20px;
  color: #aaffaa;
  text-align: center;
}/* style.css */
.info-box.statbox {
  background: #252525;
  color: #fff;
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}


/* 🔢 Stránkování */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.pagination a {
  padding: 8px 12px;
  background-color: #2c2c2c;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s;
}

.pagination a:hover {
  background-color: #555;
}

.pagination a.active {
  background-color: #4caf50;
  font-weight: bold;
}

.pagination .dots {
  padding: 8px 12px;
  color: #999;
}

/* 🔐 Přihlášení */
.login-form {
  max-width: 300px;
  margin: 40px auto;
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #333;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form label {
  font-weight: bold;
}

.login-form input {
  margin: 10px 0;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: #2b2b3c;
  color: #fff;
  box-shadow: inset 4px 4px 6px #1a1a28, inset -4px -4px 6px #3a3a50;
}
.login-form input::placeholder {
  color: #aaa;
  opacity: 1;
}
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #aaa;
  font-size: 1.1em;
}

.toggle-password:hover {
  color: #fff;
}

.login-form button {
  margin-top: 10px;
  padding: 12px;
  background: #2b2b3c;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  color: #fff;
  box-shadow: 6px 6px 10px #1a1a28, -6px -6px 10px #3a3a50;
  transition: 0.3s;
}

.login-form button:hover {
  background: #3a3a50;
}

/* 🕵️‍♂️ Info o návštěvníkovi */
.visitor-box {
  padding: 10px;
  margin: 10px 0;
  border-radius: 8px;
}

.visitor-box.danger {
  background-color: #ffcccc;
  border: 2px solid #990000;
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.visitor-info {
  max-width: 600px;
  margin: 0;
  background-color: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  border: 1px solid #333;
}

.visitor-info h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  color: #fff;
  font-size: 1.4em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.visitor-info ul {
  margin: 0;
  padding: 0;
  list-style-type: none; /* Skryje odrážky */
}

.visitor-info li {
  margin: 10px 0;
  font-size: 0.95em;
  background-color: #2a2a2a;
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.visitor-info .ua-text {
  word-break: break-word;
  display: inline-block;
  margin-top: 5px;
  color: #ccc;
}

/* 🌤️ Počasí */
.weather-box {
  background-color: #1e1e1e;
  color: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #333;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  max-width: 320px;
}

.weather-box h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3em;
}

.forecast-days {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.forecast-day {
  text-align: center;
  background: #222;
  padding: 8px;
  border-radius: 10px;
  min-width: 70px;
  color: white;
  font-size: 0.85em;
}

/* 📦 Boxíky */
.dashboard-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin: 40px auto;
  max-width: 1000px;
}

.info-box {
  background-color: #1e1e1e;
  color: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #333;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 400px;
  flex: 1 1 320px;
}

.info-box h2 {
  text-align: center;
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.3em;
}

/* 📱 Mobilní responzivita */
@media (max-width: 768px) {
  .visitor-row {
    grid-template-columns: 1fr !important;
  }

  .visitor-grid {
    margin: 10px;
    gap: 10px;
  }

  .forecast-day {
    min-width: 60px;
    font-size: 0.75em;
  }
}

@media (max-width: 500px) {
  .info-box {
    width: 100%;
    max-width: none;
  }

  .login-form {
    margin: 20px 10px;
    padding: 15px;
  }

  .visitor-info,
  .weather-box {
    padding: 15px;
    margin: 10px;
  }

  .visitor-info p {
    font-size: 0.9em;
    padding: 6px 8px;
  }
}
.chart-row {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  margin: 20px auto;
}

.chart-box {
  background: #111;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  max-width: 420px;
  flex: 1 1 350px;
  text-align: center;
}
.flag-badge {
  display: inline-block;
  font-weight: bold;
  text-transform: uppercase;
}


/* 🌞 Světlý základ */
@media (prefers-color-scheme: light) {
  body {
    background-color: #f9f9f9;
    color: #222;
  }

  header, footer {
    background-color: #eee;
    border-color: #ccc;
    color: #111;
  }

  /* Oprava: Cílíme na h1 i h2 */
  h1, .visitor-info h2, .weather-box h2, .info-box h2, .chart-box h2 {
    color: #000;
  }

  .visitor-row {
    background-color: #f0f0f0;
    color: #000;
  }

  .visitor-row.header {
    background-color: #ddd;
    border: 1px solid #bbb;
  }

  .flash-msg {
    background-color: #dff0d8;
    color: #3c763d;
    text-align: center;
  }

  .pagination a {
    background-color: #ddd;
    color: #111;
  }

  .pagination a.active {
    background-color: #4caf50;
    color: #fff;
  }

  .login-form,
  .visitor-info,
  .weather-box,
  .info-box,
  .chart-box {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #111;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* KLÍČOVÁ OPRAVA: Selektor změněn z 'p' na 'li' */
  .visitor-info li {
    background-color: #f5f5f5;
    color: #111;
  }
  
  /* Přidáno: Zlepšení čitelnosti pro User-Agent text */
  .visitor-info .ua-text {
    color: #555;
  }

  .forecast-day {
    background-color: #e9e9e9;
    color: #000;
  }

  .delete-btn {
    color: #d32f2f;
  }

  .delete-btn:hover {
    color: #9a0007;
  }
  
  .login-form input {
    background: #f0f2f5;
    color: #111;
    box-shadow: inset 2px 2px 5px #d9dbe0, inset -3px -3px 7px #ffffff;
  }
  
  .login-form button {
    background: #f0f2f5;
    color: #333;
    box-shadow: 3px 3px 6px #d9dbe0, -3px -3px 6px #ffffff;
  }
  
  .login-form button:hover {
    background: #e1e4e8;
  }
}
