/* === Base Layout === */
html {
  height: auto;
  min-height: 100%;
  scroll-behavior: smooth;
}

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

body {
  height: 100%;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background-color: #111;
  background: linear-gradient(to top, #0A0A0A, #000);
  color: #333;
  font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

main {
  flex: 1;
}

/* === Header Base === */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 72px;
  background: #1e1e1e;
  background-size: 300% 100%;
  color: #f3f4f6;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.04);
}

header.scrolled {
  background: rgba(30, 30, 30, 0.95);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

header > div {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 0 20px;
}

/* === Header Areas === */
#logo-box,
#search-box,
#user-box {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* === Logo === */
#logo-box {
  flex: 0 0 20%;
  justify-content: center;
}

#logo-box a {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  user-select: none;
  color: #facc15;
  text-shadow: 0 0 3px rgba(250, 204, 21, 0.2);
  text-decoration: none;
}

#logo-box a:hover {
  color: #fbdc37;
}

/* === Search Box Outer === */
header #search-box {
  flex: 1 1 100%;
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

/* === Enhanced Contrast Search Group === */
header .z7searchbox {
  display: flex;
  width: 100%;
  max-width: 720px;
  background-color: rgba(255, 215, 0, 0.06);
  backdrop-filter: blur(3px);
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.2);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
  align-items: center;
}

header .z7searchbox:focus-within {
  box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.4), 0 0 12px rgba(250, 204, 21, 0.15);
  background-color: rgba(250, 204, 21, 0.08);
}

header .z7searchbox form {
  display: flex;
  flex: 1;
}

/* === Search Input === */
header #z7searchfld {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  border: none;
  background: transparent;
  color: #fff8dc;
  outline: none;
  font-weight: 500;
  letter-spacing: 0.4px;
  height: 48px;
}

header #z7searchfld::placeholder {
  color: #f7e7a3;
  font-weight: 400;
}

/* === Search Button (flach, kontrastreich) === */
header #z7searchbt {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%23facc15' stroke-width='2' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cline x1='11' y1='11' x2='15' y2='15'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

header #z7searchbt:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

/* === User Button === */
#user-box {
  flex: 0 0 20%;
  justify-content: center;
}

#user-box button {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1e1e1e;
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
}

#user-box button:hover {
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.15);
  transform: translateY(-1px);
  opacity: 0.95;
}

/* === Responsive Header Layout === */
@media (max-width: 768px) {
  header {
    height: auto;
  }

  header > div {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 12px 16px;
  }

  #logo-box,
  #search-box,
  #user-box {
    width: 100%;
    height: auto;
    justify-content: center;
    padding: 10px 0;
  }

  #logo-box { order: 2; }
  #search-box { order: 3; }
  #user-box {
    order: 1;
    justify-content: center;
  }

  #search-box input {
    max-width: 100%;
  }
}

/* === footer container === */
footer {
  background: #18181e;
  padding: 4.5rem clamp(1.5rem, 6vw, 4rem);
  color: #cbcbda;
  font-size: 0.96rem;
  border-top: 1px solid #2c2c30;
  margin-top: 7rem;
  line-height: 1.7;
}

/* === inner grid === */
.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
}

/* === section headings === */
.footer-section h3,
.footer-section h4 {
  color: #fff;
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 1.4rem;
  letter-spacing: 0.2px;
}

/* === section text === */
.footer-section p {
  font-weight: 300;
  color: #999;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* === links === */
.footer-section a {
  display: inline-block;
  margin-bottom: 0.7rem;
  color: #cbcbda;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.2s ease;
}

.footer-section a:hover {
  color: #ffffff;
  transform: translateX(2px);
}

/* === social spacing (if needed) === */
.footer-section.social a {
  margin-right: 1.4rem;
}

/* === mobile styles === */
@media (max-width: 720px) {
  footer {
    text-align: center;
    padding: 3rem 1.4rem 4rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2.6rem;
    border-top: none;
  }

  .footer-section {
    padding-top: 2.2rem;
    border-top: 1px solid #2a2a30;
  }

  .footer-section:first-child {
    border-top: none;
    padding-top: 0;
  }

  .footer-section h3,
  .footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .footer-section p {
    margin-bottom: 1.2rem;
  }

  .footer-section a {
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
  }

  .footer-section.social a {
    margin: 0.4rem 0.7rem;
    display: inline-block;
  }
}
