/* ==============================
   ALARMZENTRALE - FE2 HYBRID STYLE
   ============================== */

/* === Grundlayout === */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #262626;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #f0f0f0;
  overflow-x: hidden;
}

/* === Scrollbar minimalistisch === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* === Header === */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1a1a1a;
  padding: 15px 30px;
  border-bottom: 2px solid #dc3545;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.header-left {
  font-size: 1.4em;
  font-weight: bold;
  color: #fff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
  color: #bbb;
}

.ws-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #28a745;
  display: inline-block;
  box-shadow: 0 0 8px #28a745;
}

/* === Grid (Kachelbereich) === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 60px;
  padding: 30px;
  justify-items: center;
}

/* === Kacheln (Tiles) === */
.tile {
  background-color: #dc3545;
  color: #fff;
  border-bottom: 6px solid #842029;
  border-radius: 16px;
  text-align: center;
  padding: 35px 20px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 350px;
  transition: all 0.25s ease-in-out;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.tile:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

.tile:active {
  transform: scale(0.98);
}

.tile i {
  font-size: 2.3em;
  margin-bottom: 12px;
  color: #fff;
}

.tile-name {
  font-size: 1.15em;
  font-weight: 600;
  text-transform: uppercase;
}

/* === Tile Animation (wie FE2 "Swing-in") === */
@keyframes swing-in-top-fwd {
  0% {
    transform: rotateX(-100deg);
    transform-origin: top;
    opacity: 0;
  }
  100% {
    transform: rotateX(0deg);
    transform-origin: top;
    opacity: 1;
  }
}

.tile {
  animation: swing-in-top-fwd 0.6s ease both;
}

/* === Overlays / Formulare === */
.form-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.6); /* Etwas heller, damit Text besser lesbar ist */
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.form-container.active {
  display: flex;
}

.form-content {
  #display: flex;
  flex-direction: column;
  align-items: center; /* Zentriert Überschrift, Textarea und Buttons */
  background-color: #1f1f1f;
  padding: 25px 30px;
  border-radius: 14px;
  width: 90%;
  max-width: 450px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.4s ease;
}

.form-content h3 {
  margin-top: 0;
  margin-bottom: 15px;
  text-align: center; /* Überschrift zentrieren */
  color: #fff;
  font-weight: 500;
}

textarea {
width: 100%;
height: 100px;
padding: 10px;
margin-top: 10px;
box-sizing: border-box;
border: 1px solid #ccc;
font-size: 1em;
font-family: Verdana, Arial, Helvetica, sans-serif;
border-radius: 4px;
}

.form-content div[style*="text-align:center"] {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.form-content button {
  min-width: 120px; /* Buttons gleich groß */
}

button {
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
  margin-top: 10px;
  background-color: #dc3545;
  color: white;
}

button[type="submit"] {
  background-color: #dc3545;
  color: white;
}

button.cancel {
  background-color: #444;
  color: white;
  margin-left: 10px;
}

button:hover {
  opacity: 0.85;
}

/* Adresse-Felder in einer Zeile mit Abstand */
.address-fields {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.address-fields input {
  flex: 1; /* gleiche Breite */
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95em;
  #background-color: #2c2c2c;
  color: #000000;
  box-sizing: border-box;
}

.address-fields input::placeholder {
  color: #bbb;
}

/* Optional: kleine Überschrift etwas Abstand geben */
.form-content h4 {
  margin-top: 20px;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 500;
  text-align: left;
}

/* === Animationen === */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* === Footer === */
footer {
      position: fixed;
      bottom: 0;
      background-color: #1a1a1a;
      width: 100%;
      color: #bbb;
      text-align: center;
      padding: 10px 0;
      font-size: 0.85em;
      border-top: 2px solid #dc3545;
}

/* === PIN Input Styling === */
.pin-content {
  text-align: center;
}

.pin-inputs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.pin-field {
  width: 50px;
  height: 50px;
  font-size: 2em;
  text-align: center;
  border: 2px solid #dc3545;
  border-radius: 10px;
  background-color: #262626;
  color: #fff;
  transition: 0.3s;
}

.pin-field:focus {
  outline: none;
  border-color: #ff4d4d;
  box-shadow: 0 0 10px rgba(220, 53, 69, 0.7);
}

/* === Responsive Optimierungen === */
@media (max-width: 768px) {
  .header-left {
    font-size: 1.2em;
  }
  .grid {
    gap: 30px;
    padding: 20px;
  }
  .tile {
    padding: 25px 15px;
    max-width: 280px;
  }
  .form-content {
    width: 95%;
    padding: 20px;
  }
  .pin-field {
    width: 45px;
    height: 45px;
    font-size: 1.8em;
  }
}

/* Mobile Optimierung Header */
@media (max-width: 600px) {
  .header-right {
    display: none; /* Uhrzeit und Verbunden ausblenden */
  }
}

/* === Card Grid für dynamische Spalten, größere Cards === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* automatisch Spalten anpassen */
  gap: 30px; /* Abstand zwischen Cards */
  padding: 30px;
  justify-items: stretch; /* Cards füllen die Spaltenbreite */
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 15px; /* mehr Innenabstand */
}

.card h3 {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.4em; /* größere Überschrift */
}

/* Buttons in den Cards */
.card button {
  width: 100%; /* Buttons füllen die Spaltenbreite */
  min-height: 70px; /* größere Höhe */
  padding: 40px 16px; 
  margin-bottom: 15px;
  font-size: 1.1em; /* größere Schrift */
  text-align: center;
  display: flex;
  flex-direction: column; /* Icon über Text */
  align-items: center;
  justify-content: center;
  gap: 6px; /* Abstand zwischen Icon und Text */
  cursor: pointer;
  border-radius: 10px;
  border: none;
  background-color: #dc3545;
  color: #fff;
  transition: 0.3s;
}

.card button i {
  font-size: 2em; /* größeres Icon */
}

/* Button Hover */
.card button:hover {
  opacity: 0.85;
}

/* === Responsive Anpassung === */
@media (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* 2+ Spalten flexibel */
  }
}

@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr; /* 1 Spalte auf Mobilgeräten */
    gap: 20px;
    padding: 20px;
  }
  .card button {
    min-height: 60px;
    font-size: 1.1em;
    padding: 40px 16px;
  }
  .card button i {
    font-size: 2.3em;
  }
}
