/* =========================================================
   SPERANZA WATCHLIST - style.css
   Struktur: Base -> Layout -> Components -> Forms -> Pages -> Overlays -> Toasts -> Responsive
   ========================================================= */

/* =========================================================
   BASE
   ========================================================= */
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh; /* mind. volle Bildschirmhöhe */
  display: flex;
  flex-direction: column;
  font-family: 'Monaco', monospace;
  color: #eee;
  background: #000;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

:root{
  --safe-footer-space: 72px; /* Platz für fixed footer (Responsive/UX) */
}

/* damit der feste Footer nichts überdeckt */
body{
  padding-bottom: var(--safe-footer-space);
}

/* =========================================================
   BACKGROUND
   ========================================================= */
#bgVideo {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.3;
  background: #000;
}

/* =========================================================
   LAYOUT
   ========================================================= */
.container {
  flex: 1; /* nimmt den verfügbaren Platz zwischen Header + Footer */
  max-width: 900px;
  margin: auto;
  padding: 20px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;

  /* Mobile: darf umbrechen, damit nichts "verschwindet" */
  gap: 12px;
  flex-wrap: wrap;
}

header h1 {
  margin: 0;
  line-height: 1.1;
  font-size: 2.5rem;
  color: #b0ff00;
  letter-spacing: 3px;
}

/* Admin-Links-Zeile im Header (aktuell ein <p> ohne Klasse) */
header p {
  margin: 0;
}

/* =========================================================
   BUTTONS / LINKS
   ========================================================= */
header button,
header a {
  background: transparent;
  border: 2px solid #b0ff00;
  color: #b0ff00;
  padding: 10px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
  text-decoration: none;
  white-space: nowrap;
}

header button:hover,
header a:hover {
  background: #b0ff00;
  color: #000;
  transform: scale(1.05);
}

/* =========================================================
   FORMS (Admin / Public)
   ========================================================= */

/* Admin: Eingabebereich auf der Index */
#adminForm {
  display: none;
  background: rgba(34, 34, 34, 0.6);
  padding: 20px;
  border-radius: 16px;
  margin-bottom: 20px;
}

#adminForm input {
  padding: 10px;
  border-radius: 10px;
  border: none;
  margin-right: 10px;
  background: #111;
  color: #eee;
  width: 65%;
  box-sizing: border-box;
}

#adminForm button {
  background: #b0ff00;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

#adminForm button:hover {
  background: #9acc00;
  transform: scale(1.05);
}

/* Public: Meldungsformular */
#publicForm {
  display: flex;
  flex-direction: column;
  background: rgba(34, 34, 34, 0.7);
  padding: 10px 15px ; /* kompakter */
  border-radius: 12px;
  color: #eee;
}

#publicForm input {
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: #111;
  color: #eee;
  width: 100%;
  font-family: 'Monaco', monospace;
  margin-bottom: 8px;
  box-sizing: border-box;
}

#publicForm button {
  background: #b0ff00;
  color: #000;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

#publicForm button:hover {
  background: #9acc00;
  transform: scale(1.05);
}


/* =========================================================
   WATCHLIST ENTRY (Zeile/Karte)
   ========================================================= */
.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(34, 34, 34, 0.7);
  padding: 15px 20px;
  border-radius: 16px;
  margin-bottom: 12px;
  transition: 0.2s;
}

.entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
}

.profile {
  display: flex;
  align-items: center;
  flex: 1; /* links */
  min-width: 0;
}

.profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
}

.profile span {
  text-align: left;
  min-width: 0;
}

.entry a {
  color: #b0ff00;
  text-decoration: none;
  transition: 0.2s;
  margin-left: 10px;
}

.entry a:hover {
  text-decoration: underline;
  color: #9acc00;
}

.date {
  width: 100px; /* Datum immer an derselben Stelle */
  text-align: left;
  font-size: 0.8rem;
  color: #aaa;
  margin-left: 10px;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry button.deleteBtn {
  background: #ff3333;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.2s;
  margin-left: 10px;
}

.entry button.deleteBtn:hover {
  background: #ff0000;
  transform: scale(1.05);
}

/* =========================================================
   PAGINATION
   ========================================================= */
.pagination {
  text-align: center;
  margin: 20px 0;
  font-family: 'Monaco', monospace;
}

.page-btn {
  display: inline-block;
  margin: 0 5px;
  padding: 6px 12px;
  background: #222;
  color: #b0ff00;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid #444;
  transition: 0.3s;
  font-weight: bold;
}

.page-btn:hover {
  background: #b0ff00;
  color: #000;
  transform: scale(1.05);
}

.page-btn.active {
  background: #b0ff00;
  color: #000;
  pointer-events: none;
}

/* =========================================================
   FOOTER (fixed)
   ========================================================= */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background: rgba(34, 34, 34, 0.85);
  color: #aaa;
  text-align: center;
  font-size: 0.85rem;
  z-index: 1000;
  border-top: 1px solid #444;
  border-radius: 0;
}

footer a {
  color: #b0ff00;
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  color: #9acc00;
}

/* Fallback-Abstand (falls padding-bottom aus irgendeinem Grund fehlt) */
body::after {
  content: "";
  display: block;
  height: 60px;
}

/* =========================================================
   POPUPS (FAQ / Impressum)
   ========================================================= */
/* =========================================================
   POPUPS (FAQ / Impressum) - Override inline styles
   Hinweis: In index.php sind Popups teils mit inline styles gebaut.
   Diese Regeln sorgen dafür, dass die Popup-Box nicht "zu schmal" ist.
   ========================================================= */
#faqPopup,
#impressumPopup{
  /* falls inline-styles display/position setzen, greifen diese nur ergänzend */
  padding: 16px; /* Luft zum Rand auf Mobile */
}

#faqPopup > div,
#impressumPopup > div{
  width: min(1000px, 95vw) !important;
  max-width: 1000px !important;
  box-sizing: border-box !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
}

/* etwas ruhigere Typo im Popup */
#faqPopup h2, #impressumPopup h2{
  margin-top: 0;
}

.popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.popupContent {
  background: #222;
  padding: 25px;
  border-radius: 16px;
  width: 95%;
  max-width: 1000px;
  text-align: left;
  color: #eee;
}

.popupContent a {
  display: inline-block;
  margin-top: 15px;
  color: #b0ff00;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

.popupContent a:hover {
  color: #9acc00;
}

/* =========================================================
   TOASTS / NOTIFICATIONS
   ========================================================= */
.toast{
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(720px, 92vw);
  z-index: 9999;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.toast-success{background:#e8fff1;border:1px solid #7ad69a;color:#0f5132}
.toast-error{background:#fff0f0;border:1px solid #f19999;color:#842029}
.toast-info{background:#eef5ff;border:1px solid #87b5ff;color:#084298}
.toast-close{margin-left:auto;border:0;background:transparent;font-size:18px;line-height:1;color:inherit;cursor:pointer;padding:0 2px}

/* =========================================================
   LOGIN PAGE (separate Admin Login)
   ========================================================= */
#loginForm {
  background: rgba(34, 34, 34, 0.6);
  padding: 25px;
  border-radius: 16px;
  max-width: 380px;
  margin: 20vh auto 0;
  text-align: center;
}

#loginForm input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #111;
  color: #eee;
  margin-bottom: 10px;
}

#loginForm button {
  background: #b0ff00;
  color: #000;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

#loginForm button:hover {
  background: #9acc00;
  transform: scale(1.05);
}

#loginForm .error {
  margin-top: 10px;
  color: #ff6666;
  font-size: 0.9rem;
}

/* =========================================================
   RESPONSIVE / MOBILE (ohne HTML-Änderungen)
   Ziel: Header/Buttons sichtbar, bessere Lesbarkeit, kein Overflows
   ========================================================= */

/* ===== Tablet / kleiner Desktop ===== */
@media (max-width: 900px){
  .container{
    padding: 16px;
  }
}

/* ===== Mobile ===== */
@media (max-width: 720px){
  .container{
    padding: 12px;
  }

  header{
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  header h1{
    letter-spacing: 2px;
    font-size: clamp(1.4rem, 6vw, 2.5rem);
  }

  /* Header-Buttons/Links sollen immer sichtbar sein */
  header a, header button{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    margin-left: 0;
    box-sizing: border-box;
  }

  /* Admin-Navi (deleted/pending) sauber umbrechen */
  header p{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  header p a{
    margin: 0 !important;
    flex: 1 1 auto;
    min-width: 120px;
    box-sizing: border-box;
  }

  /* Formulare untereinander statt nebeneinander */
  #adminForm input{
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }
  #adminForm button{
    width: 100%;
  }

  /* Einträge: statt Zeile -> Karte */
  .entry{
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .profile{
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }

  .profile span{
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .date{
    width: auto;
    margin-left: 0;
    align-self: flex-end;
  }

  .actions{
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }

  .entry a{
    margin-left: 0;
  }

  /* Pagination: darf umbrechen */
  .pagination{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ===== Sehr kleine Geräte ===== */
@media (max-width: 420px){
  header h1{
    letter-spacing: 1px;
  }

  .profile img{
    width: 36px;
    height: 36px;
  }

  footer{
    font-size: 0.8rem;
    padding: 8px 0;
  }
}

/* FAQ Accordion */
.faq-accordion { margin-top: 10px; }

.faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(176,255,0,0.18);
  border-radius: 12px;
  margin: 10px 0;
  overflow: hidden;
}

.faq-item > summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #b0ff00;
  list-style: none;
}

.faq-item > summary::-webkit-details-marker { display: none; }

.faq-item > summary::after {
  content: "＋";
  float: right;
  color: #b0ff00;
}

.faq-item[open] > summary::after { content: "－"; }

.faq-body {
  padding: 0 14px 12px;
  color: #eee;
}

.faq-body p { margin: 10px 0; }
.faq-body ul { margin: 10px 0 0 18px; }

/* Report section should match the width of other cards/sections */
.report-section{
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 24px;
  margin: 20px 0;
}

/* Beide Flex-Items sind jetzt DIVs -> immer gleich hoch */
.report-box{
  flex: 2 1 0;
  background: rgba(34,34,34,0.7);
  border-radius: 12px;
  padding: 15px;
}

.report-box h3{
  margin: 8px 0 16px 0;
}

.trust-points{
  flex: 1.1 1 0;
  background: rgba(34,34,34,0.7);
  border-radius: 12px;
  padding: 15px 15px 15px 24px;
  margin: 0;
  font-family: monospace;
  font-size: 1.03rem;
  line-height: 1.5;
  list-style-position: inside; /* 🔑 KEY FIX */
}

.trust-points li{
  margin-bottom: 6px;
}

.trust-points li:last-child{
  margin-bottom: 0;
}

.trust-points li::marker{
  color: #b0ff00;
}

@media (max-width: 900px){
  .report-section{
    flex-direction: column;
  }
}
