/* ── Lokale Fonts ── */
@font-face {
  font-family: 'Manrope';
  src: url('/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Poppins';
  src: url('/fonts/poppins-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Gemeinsame Styles – Atelier Blaupause ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow: hidden; }
.page-wrap {
  position: fixed;
  top: 48px; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
:root { --black:#000; --white:#fff; --gray:#f4f4f4; --gray2:#e0e0e0; --mid:#999; --f:'Manrope',sans-serif; --p:'Poppins',sans-serif; }

/* ── Custom Cursor (nur Desktop mit Maus) ── */
@media (pointer: fine) {
  * { cursor: none !important; }
  .cursor {
    position: fixed;
    top: -50px; left: -50px;
    width: 15px; height: 15px;
    border-radius: 50%;
    background: #fff;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: width .15s, height .15s;
  }
  .cursor.hover { width: 25px; height: 25px; }
}

/* ── Navigation ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; height: 48px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 28px; background: var(--white);
  border-bottom: 1px solid var(--gray2); z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 32px; }
.nav-left a, .nav-right a {
  font-family: var(--p); font-size: 13px; color: var(--black);
  text-decoration: none; transition: opacity .2s;
}
.nav-left a:hover, .nav-right a:hover { opacity: .5; }
.nav-left a.active, .nav-right a.active { text-decoration: underline; text-underline-offset: 3px; }
.logo-nav { height: 24px; width: 24px; object-fit: contain; }
.nav-right { display: flex; align-items: center; gap: 20px; justify-self: end; }

/* ── Login-Button in Nav ── */
.nav-login {
  font-family: var(--p); font-size: 13px; font-weight: 600;
  letter-spacing: .01em; text-transform: none;
  padding: 0; border: none;
  background: none; color: var(--black);
  cursor: pointer; transition: opacity .2s;
}
.nav-login:hover { opacity: .5; }

.nav-user {
  font-family: var(--p); font-size: 12px; color: var(--black);
  display: flex; align-items: center; gap: 8px;
}
.nav-user-name { font-weight: 600; }
.nav-logout {
  font-family: var(--p); font-size: 11px; color: var(--mid);
  background: none; border: none; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.nav-logout:hover { color: var(--black); }
.nav-credits {
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 4px 10px; border: 1px solid var(--gray2);
  cursor: pointer; transition: all .15s; color: var(--mid);
}
.nav-credits:hover { border-color: var(--black); color: var(--black); }

/* ── Auth-Modal ── */
.auth-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 9999; display: none; align-items: center; justify-content: center;
}
.auth-overlay.show { display: flex; }
.auth-box {
  background: var(--white); width: 90%; max-width: 380px; padding: 40px;
  position: relative; border-radius: 20px;
}
.auth-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none; font-size: 18px;
  color: var(--mid); cursor: pointer;
}
.auth-close:hover { color: var(--black); }
.auth-title {
  font-family: var(--f); font-size: 20px; font-weight: 700;
  letter-spacing: -.02em; margin-bottom: 24px;
}
.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block; font-family: var(--f); font-size: 11px;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--mid); margin-bottom: 5px;
}
.auth-field input {
  width: 100%; padding: 10px 12px;
  background: var(--gray); border: 1.5px solid transparent;
  font-family: var(--f); font-size: 14px; font-weight: 500;
  color: var(--black); outline: none; transition: border-color .15s;
}
.auth-field input:focus { border-color: var(--black); background: var(--white); }
.auth-submit {
  width: 100%; padding: 12px; margin-top: 8px;
  background: var(--black); color: var(--white); border: none;
  font-family: var(--f); font-size: 12px; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: background .15s;
}
.auth-submit:hover { background: #222; }
.auth-submit:disabled { opacity: .4; cursor: not-allowed; }
.auth-error {
  color: #c62828; font-size: 12px; margin-top: 8px;
  min-height: 16px; font-family: var(--f);
}
.auth-switch {
  margin-top: 20px; text-align: center;
  font-family: var(--f); font-size: 12px; color: var(--mid);
}
.auth-switch a {
  color: var(--black); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer;
}
.auth-agb {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 14px 0 4px; font-family: var(--f); font-size: 12px; color: #555;
}
.auth-agb input[type="checkbox"] {
  margin-top: 2px; flex-shrink: 0; cursor: pointer;
  width: 15px; height: 15px; accent-color: var(--black);
}
.auth-agb a { color: var(--black); text-underline-offset: 2px; }

/* ── Hamburger-Button (nur Mobile) ── */
.nav-hamburger {
  display: none;
  background: none; border: none; padding: 4px;
  flex-direction: column; gap: 4px; cursor: pointer;
}
.nav-hamburger span {
  display: block; width: 18px; height: 1.5px; background: var(--black);
  transition: transform .2s, opacity .2s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── Mobile-Menü Overlay ── */
.nav-mobile-menu {
  display: none;
  position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
  background: var(--white); z-index: 99;
  flex-direction: column; align-items: center; justify-content: center; gap: 32px;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a, .nav-mobile-menu button {
  font-family: var(--p); font-size: 18px; color: var(--black);
  text-decoration: none; background: none; border: none; cursor: pointer;
}
.nav-mobile-menu a:hover { opacity: .5; }

/* ── Footer ── */
footer {
  padding: 24px 60px;
  border-top: 1px solid var(--gray2);
  font-size: 12px;
  color: var(--mid);
  display: flex;
  gap: 24px;
  font-family: var(--f);
  justify-content: center;
}
footer a {
  color: var(--mid);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .nav-left, .nav-right { display: none; }
  nav { grid-template-columns: auto 1fr auto; }
  .nav-hamburger { display: flex; }
  nav .logo-nav-link { justify-self: center; }
  footer { padding: 20px 24px; gap: 16px; flex-wrap: wrap; }
}
