/* Optimierung 2026-05-19
   Nur Darstellung/Responsiveness – keine PHP-/Formular-/Datenbanklogik geändert. */

:root {
  --bg: #07111d;
  --bg-2: #0d1b2a;
  --panel: rgba(13, 27, 42, 0.88);
  --panel-soft: rgba(20, 39, 59, 0.82);
  --panel-hover: rgba(26, 52, 78, 0.9);
  --border: rgba(137, 207, 240, 0.2);
  --border-strong: rgba(137, 207, 240, 0.35);
  --text: #eef7ff;
  --muted: #b8c8d8;
  --accent: #42b8ff;
  --accent-2: #7be7d4;
  --danger: #ff6b6b;
  --success: #5ee6a8;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 !important;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  color: var(--text) !important;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
  line-height: 1.65;
  background:
    radial-gradient(circle at 20% -10%, rgba(66, 184, 255, 0.22), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(123, 231, 212, 0.14), transparent 28rem),
    linear-gradient(135deg, #050a12 0%, var(--bg) 45%, #102235 100%) !important;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent 78%);
  z-index: -1;
}

header {
  width: min(var(--max), calc(100vw - 28px)) !important;
  min-height: clamp(170px, 27vw, 300px) !important;
  height: auto !important;
  margin: 18px auto 0 !important;
  border: 1px solid var(--border);
  border-radius: 28px 28px 10px 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background-image:
    linear-gradient(90deg, rgba(5, 10, 18, 0.78), rgba(5, 10, 18, 0.16)),
    url('../ki_blaumeise.jpg') !important;
  background-position: center !important;
  background-size: cover !important;
  position: relative;
}

header::after {
  content: "Blue die Blaumeise";
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  bottom: clamp(16px, 4vw, 38px);
  color: #fff;
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 0.95;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.75);
}

nav {
  width: min(var(--max), calc(100vw - 28px)) !important;
  margin: 0 auto 14px !important;
  padding: 10px 12px !important;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 22px 22px;
  background: rgba(8, 16, 27, 0.82) !important;
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  color: transparent;
}

nav a {
  color: var(--text) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  text-decoration: none !important;
  font-size: 0.96rem;
  font-weight: 650;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: #03111d !important;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-1px);
  outline: none;
}

nav div[style*="text-align"] {
  width: 100%;
  color: var(--muted);
  text-align: center !important;
  font-size: 0.88rem;
  padding-top: 4px;
}

.container,
main,
.container main {
  width: min(var(--max), calc(100vw - 28px)) !important;
  max-width: var(--max) !important;
}

.container {
  display: block !important;
  margin: 0 auto 34px !important;
}

main {
  flex-grow: 0 !important;
  padding: clamp(14px, 3vw, 26px) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text) !important;
  background: rgba(7, 17, 29, 0.62) !important;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.entry,
.card,
.video,
section,
article {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  background: linear-gradient(180deg, var(--panel), rgba(10, 22, 36, 0.92)) !important;
  color: var(--text) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
}

.entry {
  padding: clamp(16px, 3vw, 26px) !important;
  margin: 0 0 22px !important;
  overflow: hidden;
}

.entry:hover {
  background: linear-gradient(180deg, var(--panel-hover), rgba(10, 22, 36, 0.96)) !important;
}

.entry-header {
  margin: calc(clamp(16px, 3vw, 26px) * -1) calc(clamp(16px, 3vw, 26px) * -1) 16px;
  padding: 14px clamp(16px, 3vw, 26px) !important;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0 !important;
  background: linear-gradient(135deg, rgba(66, 184, 255, 0.18), rgba(123, 231, 212, 0.08)) !important;
  font-weight: 750;
}

.entry-schrift {
  color: var(--text) !important;
  font-size: clamp(1rem, 2.4vw, 1.18rem) !important;
}

.entry-timestamp {
  color: var(--muted) !important;
  font-size: 0.88rem !important;
  white-space: nowrap;
}

.entry-separator {
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  margin: 14px 0 18px !important;
}

h1, h2, h3, h4 {
  color: var(--text) !important;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.55rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.8vw, 1.75rem); }

p, li, td, th, label, span {
  color: inherit;
}

p {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

a:not(nav a) {
  color: #8ed9ff;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:not(nav a):hover {
  color: #baf6ea;
}

img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 16px;
}

.video-container {
  width: 100% !important;
  max-width: none !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 18px !important;
  margin: 18px auto 0 !important;
}

video,
.video video,
.video-container video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  aspect-ratio: 16 / 9;
  display: block;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: #000 !important;
  box-shadow: 0 12px 25px rgba(0,0,0,0.32);
}

.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.pagination a,
.entry-button,
button,
input[type="submit"],
input[type="button"] {
  width: auto !important;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, rgba(66, 184, 255, 0.95), rgba(123, 231, 212, 0.9)) !important;
  color: #04111f !important;
  font-size: 0.98rem !important;
  font-weight: 750;
  text-decoration: none !important;
  cursor: pointer;
  box-shadow: 0 9px 22px rgba(66, 184, 255, 0.18);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.pagination a:hover,
.entry-button:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 28px rgba(66, 184, 255, 0.24);
}

button[type="button"] {
  background: rgba(255,255,255,0.08) !important;
  color: var(--text) !important;
}

form {
  width: 100%;
}

input,
textarea,
select {
  width: min(100%, 680px);
  min-height: 42px;
  margin: 6px 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  color: var(--text);
  font: inherit;
  outline: none;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(66,184,255,0.16);
}

table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 16px;
}

th,
td {
  border-color: rgba(255,255,255,0.12) !important;
  padding: 10px !important;
  vertical-align: top;
}

th {
  background: rgba(66, 184, 255, 0.16) !important;
  color: var(--text) !important;
}

tr:nth-child(even) td {
  background: rgba(255,255,255,0.025);
}

ul[style*="color: red"],
.error,
.errors {
  color: #ffd1d1 !important;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.28);
  border-radius: 14px;
  padding: 12px 16px 12px 32px;
}

p[style*="color: green"],
.success {
  color: #d9ffed !important;
  background: rgba(94, 230, 168, 0.12);
  border: 1px solid rgba(94, 230, 168, 0.28);
  border-radius: 14px;
  padding: 12px 16px;
}

#cookie-banner {
  left: 14px !important;
  right: 14px !important;
  bottom: 14px !important;
  width: min(980px, calc(100vw - 28px));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-strong);
  border-radius: 18px;
  background: rgba(5, 10, 18, 0.92) !important;
  color: var(--text) !important;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

#cookie-banner span {
  flex: 1 1 320px;
}

#cookie-banner button {
  flex: 0 0 auto;
}

.share-dropdown {
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  background: rgba(8, 16, 27, 0.96) !important;
  box-shadow: var(--shadow) !important;
}

.share-dropdown a {
  border-radius: 10px;
}

/* Alt-HTML der Idee-Seite lesbarer machen */
body table p span[style*="font-size"] {
  font-size: 1rem !important;
}

body table[style] {
  background: transparent !important;
}

/* Admin-/Listenbereiche */
body > table,
body > form,
body > h2,
body > h3 {
  width: min(var(--max), calc(100vw - 28px));
}

body > h2,
body > h3 {
  margin-left: auto;
  margin-right: auto;
}

body > table,
body > form {
  margin: 16px auto;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  :root { --radius: 15px; }

  header {
    width: calc(100vw - 18px) !important;
    margin-top: 9px !important;
    border-radius: 22px 22px 8px 8px;
  }

  header::after {
    max-width: 82%;
  }

  nav,
  .container,
  main,
  .container main {
    width: calc(100vw - 18px) !important;
  }

  nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: thin;
  }

  nav a {
    white-space: nowrap;
    font-size: 0.9rem;
  }

  main {
    padding: 12px !important;
  }

  .entry-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .entry-timestamp {
    white-space: normal;
  }

  table,
  tbody,
  tr,
  td,
  th {
    display: block;
    width: 100% !important;
  }

  td img {
    margin: 10px auto;
    display: block;
  }

  #cookie-banner {
    align-items: stretch;
  }

  #cookie-banner button {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
