:root {
  --bg: #080808;
  --surface: #151515;
  --surface-light: #202020;
  --text: #f8f8f8;
  --muted: #b8b8b8;
  --accent: #ff9800;
  --accent-hover: #ffad33;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; line-height: 1.6; }
main { flex: 1; }
a { color: inherit; }
button, input, textarea { font: inherit; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(21, 21, 21, 0.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); }
.topbar { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 18px 32px; }
.logo { color: var(--text); font-size: clamp(1.7rem, 4vw, 2.35rem); font-weight: 800; line-height: 1; letter-spacing: -1px; text-decoration: none; }
.logo span { display: inline-block; margin-left: 3px; padding: 6px 10px; border-radius: 7px; background: var(--accent); color: #101010; }
.auth { display: flex; align-items: center; gap: 10px; }
.auth a { padding: 8px 12px; border-radius: 9px; color: var(--text); font-weight: 700; text-decoration: none; }
.auth a:hover, .auth a.active { background: var(--surface-light); }
.auth .auth-primary { background: var(--accent); color: #111; }
.auth .auth-primary:hover, .auth .auth-primary.active { background: var(--accent-hover); }
.navbar { display: flex; justify-content: center; gap: clamp(12px, 5vw, 58px); padding: 11px 24px; background: #222; }
.navbar a { position: relative; padding: 4px 2px; color: #e8e8e8; font-weight: 700; text-decoration: none; }
.navbar a::after { content: ""; position: absolute; right: 0; bottom: -3px; left: 0; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform 180ms ease; }
.navbar a:hover, .navbar a.active { color: var(--accent); }
.navbar a:hover::after, .navbar a.active::after { transform: scaleX(1); }

.hero { min-height: 520px; display: grid; place-content: center; justify-items: center; padding: 90px 24px; overflow: hidden; text-align: center; background: radial-gradient(circle at 50% 30%, rgba(255, 152, 0, 0.2), transparent 35%), linear-gradient(180deg, #101010, var(--bg)); }
.eyebrow { margin-bottom: 10px; color: var(--accent); font-size: 0.82rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { max-width: 850px; font-size: clamp(2.6rem, 8vw, 5.7rem); line-height: 0.98; letter-spacing: -0.055em; }
.hero-text { max-width: 640px; margin-top: 24px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 46px; padding: 11px 19px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #111; font-weight: 800; text-decoration: none; cursor: pointer; transition: transform 180ms ease, background-color 180ms ease; }
.button:hover { background: var(--accent-hover); transform: translateY(-2px); }
.button-secondary { background: transparent; color: var(--text); }
.button-secondary:hover { background: rgba(255, 152, 0, 0.12); }

.content, .about-page, .form-page { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.gallery-section, .video-page { padding: 72px 0; }
.section-heading { max-width: 700px; margin: 0 auto 36px; text-align: center; }
.section-heading h1, .section-heading h2 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.section-heading > p:last-child { margin-top: 10px; color: var(--muted); }
.rainbow-title { animation: rainbow 2.5s linear infinite; }
.photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.photo-button { position: relative; min-height: 260px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); cursor: zoom-in; }
.photo-button::after { content: "Ansehen"; position: absolute; right: 12px; bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.78); color: #fff; font-size: 0.75rem; font-weight: 700; opacity: 0; transform: translateY(5px); transition: opacity 180ms ease, transform 180ms ease; }
.photo-button img { width: 100%; height: 100%; min-height: 260px; display: block; object-fit: cover; transition: transform 260ms ease, filter 260ms ease; }
.photo-button:hover img { transform: scale(1.05); filter: brightness(1.12); }
.photo-button:hover::after { opacity: 1; transform: translateY(0); }

.lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 60px 24px 24px; background: rgba(0, 0, 0, 0.93); }
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 1000px; text-align: center; }
.lightbox img { max-width: 100%; max-height: 75vh; border-radius: 12px; box-shadow: var(--shadow); }
.lightbox figcaption { margin-top: 10px; color: var(--muted); }
.lightbox-close { position: absolute; top: 16px; right: 22px; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-light); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }

.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.video-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); transition: transform 180ms ease, border-color 180ms ease; }
.video-card:hover { border-color: rgba(255, 152, 0, 0.45); transform: translateY(-3px); }
.video-card iframe { width: 100%; display: block; aspect-ratio: 16 / 9; border: 0; }
.video-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.video-info p { font-weight: 700; line-height: 1.35; }
.video-info a { flex: 0 0 auto; color: var(--accent); font-size: 0.78rem; font-weight: 700; text-decoration: none; }
.video-info a:hover { text-decoration: underline; }

.about-page { padding: 70px 0; }
.about-card { position: relative; isolation: isolate; max-width: 980px; margin: 0 auto; overflow: hidden; padding: clamp(28px, 6vw, 64px); border: 1px solid var(--border); border-radius: 24px; background: rgba(12, 12, 12, 0.82); box-shadow: var(--shadow); }
.about-card::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("Bilder/sahur-02.jpg") center / cover; opacity: 0.22; }
.about-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.68)); }
.about-card h1 { max-width: 720px; margin-bottom: 22px; color: var(--accent); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; }
.about-card > p:not(.eyebrow) { max-width: 780px; margin-top: 14px; }
.about-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 34px; }
.about-grid section { padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: rgba(25, 25, 25, 0.72); }
.about-grid h2 { margin-bottom: 10px; color: var(--accent); font-size: 1.25rem; }
.about-grid p + p { margin-top: 12px; }
.highlight { color: var(--accent); font-weight: 800; }

.form-page { display: grid; place-items: center; padding: 70px 0; }
.form-card { width: min(100%, 620px); padding: clamp(26px, 5vw, 42px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.form-card.compact { max-width: 500px; }
.form-card h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; }
.form-intro { margin-top: 10px; color: var(--muted); }
form { margin-top: 28px; }
label { display: block; margin: 17px 0 6px; color: #e8e8e8; font-size: 0.9rem; font-weight: 700; }
input, textarea { width: 100%; padding: 12px 13px; border: 1px solid #3a3a3a; border-radius: 9px; outline: none; background: #0c0c0c; color: #fff; transition: border-color 180ms ease, box-shadow 180ms ease; }
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.16); }
form > .button { width: 100%; margin-top: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-switch { margin-top: 20px; color: var(--muted); text-align: center; }
.form-switch a { color: var(--accent); font-weight: 700; }
.form-status { margin-top: 16px; padding: 11px 13px; border: 1px solid rgba(255, 152, 0, 0.4); border-radius: 9px; background: rgba(255, 152, 0, 0.1); color: #ffd28f; }
.form-status.error { border-color: rgba(255, 82, 82, 0.5); background: rgba(255, 82, 82, 0.1); color: #ffb3b3; }
.form-status.success { border-color: rgba(93, 211, 158, 0.5); background: rgba(93, 211, 158, 0.1); color: #a9edce; }

.account-card { max-width: 640px; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 26px; padding: 5px; border-radius: 12px; background: #0c0c0c; }
.account-tabs a { padding: 9px 12px; border-radius: 8px; color: var(--muted); font-weight: 700; text-align: center; text-decoration: none; }
.account-tabs a.active { background: var(--surface-light); color: var(--accent); }
.account-panel { padding-top: 26px; }
.account-panel[hidden], .account-success[hidden] { display: none; }
.account-panel h2, .account-success h2 { font-size: 1.45rem; }
.security-note { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); color: #8f8f8f; font-size: 0.78rem; }
.account-success { padding: 38px 0 12px; text-align: center; }
.account-success > p { margin-top: 8px; color: var(--muted); }
.account-icon { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 16px !important; border-radius: 50%; background: var(--accent); color: #111 !important; font-size: 2rem; font-weight: 900; }
.account-actions { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.user-greeting { color: var(--accent); font-weight: 800; }
.logout-button { padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-light); color: var(--text); font-weight: 700; cursor: pointer; }
.logout-button:hover { border-color: var(--accent); }
.redirect-page { display: grid; place-items: center; text-align: center; }
.redirect-page main { flex: initial; }
.redirect-page .button { margin-top: 18px; }

footer { padding: 26px 20px; border-top: 1px solid var(--border); background: #111; color: var(--muted); text-align: center; font-size: 0.85rem; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-top: 7px; }
.footer-links a { color: #ddd; text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 700px) {
  .site-header { position: static; }
  .topbar { padding: 16px 18px; }
  .auth a { padding: 7px 9px; font-size: 0.88rem; }
  .navbar { justify-content: flex-start; gap: 24px; overflow-x: auto; padding: 11px 18px; }
  .navbar a { flex: 0 0 auto; font-size: 0.92rem; }
  .hero { min-height: 450px; padding: 68px 20px; }
  .content, .about-page, .form-page { width: min(100% - 28px, 1200px); }
  .photos { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo-button, .photo-button img { min-height: 220px; }
  .about-grid, .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .topbar { align-items: flex-start; }
  .logo { font-size: 1.45rem; }
  .logo span { padding: 5px 7px; }
  .auth { gap: 3px; }
  .auth a { font-size: 0.78rem; }
  .photos { grid-template-columns: 1fr; }
  .photo-button, .photo-button img { min-height: 330px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
  .rainbow-title { animation: none; color: var(--accent); }
}

@keyframes rainbow {
  0% { color: #ff3b30; }
  16% { color: #ff9500; }
  32% { color: #ffd60a; }
  48% { color: #32d74b; }
  64% { color: #64d2ff; }
  80% { color: #5e5ce6; }
  100% { color: #bf5af2; }
}
