@font-face {
  font-family: 'Rubik';
  src: url('fonts/Rubik-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Rubik';
  src: url('fonts/Rubik-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --accent: #f9c74f;
  --text: #f5f5f5;
  --secondary: #a0a0a0;
}

html, body {
  height: 100%;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: radial-gradient(circle at top, #1a1a1a, #000);
  color: var(--text);
  font-family: 'Rubik', system-ui, sans-serif;
  text-align: center;
  padding: 2rem;
  gap: 1.5rem;
  overflow: hidden;
}

header {
  flex: 0 0 auto;           /* don't grow/shrink */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

header h1 {
  color: var(--accent);
  font-size: 2.5rem;
}

p {
  color: var(--secondary);
  font-size: 1.2rem;
  margin-bottom: 2rem;
  hyphens: auto;
}

a.discord-link {
  background: var(--accent);
  color: #000;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
    box-shadow: 0 0 25px rgba(249, 199, 79, 0.4);
}

a.discord-link:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(249, 199, 79, 0.8);
}

.beer-emoji {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,100% {transform: translateY(0);}
  50% {transform: translateY(-10px);}
}

footer {
  font-size: 0.9rem;
  color: #666;
}

.lang-switch {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: black;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.3s ease;
}

.lang-switch:hover .lang-switch-modal:hover { background: var(--accent); color: #000; }

section {
  display: flex;
  flex-direction: column;
  gap: 1rem; /* space between .event children */
  margin-top: 0;
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.05);
  padding: 1.0rem;
  border-radius: 1rem;
  max-width: 500px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
  align-items: center;
}

h2 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.event {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.1rem 1.5rem;
  text-align: left;
  max-width: 500px;
}

.event h3 {
    color: var(--accent);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

main.content {
  width: 100%;
  max-width: 600px;
  flex: 1 1 auto;                /* Hauptbereich füllt vertikal den verfügbaren Platz */
  min-height: 0;
  overflow-y: auto;       /* scrollen, wenn Inhalt zu lang */
  margin-inline: auto;
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 0.75rem;
}

body [lang] { display: none; }

/* show elements whose lang matches the document html lang (adjust languages as needed) */
html[lang|="en"] [lang|="en"],
html[lang|="de"] [lang|="de"] {
    display: block;
}


/* small utility for legal pages to keep footer at bottom */
.main-legal { max-width: 800px; margin: 0 auto; text-align: left; }

.home-link {
    color: inherit;
    text-decoration: none;
    font-weight: inherit;
    display: inline;
}
.home-link:focus-visible {
    outline: 3px dashed var(--accent);
    outline-offset: 4px;
    border-radius: 0.25rem;
}

/* File: `styles.css` — add these rules */
#age-modal {
    position: fixed;
    inset: 0;
    display: flex; /* toggled by JS between flex and none */
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    padding: 1rem;
}

.age-box {
    background: #0b0b0b;
    color: #111;
    max-width: 420px;
    width: 100%;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    text-align: center;
}

.age-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    background: #0b6efd;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.btn-secondary {
    background: #6c757d;
}

/* prevent background scroll while modal shown */
body.no-scroll {
    overflow: hidden;
}

html[lang="de"] #age-modal [lang="en"],
html[lang="en"] #age-modal [lang="de"] {
    display: none !important;
}

/* Position context for absolute children */
#age-modal .age-box { position: relative; }

/* Top-right language button inside the dialog */
.lang-switch-modal {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.4rem 0.6rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    background: black;
    border: 2px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
}

/* Remember choice row in age modal */
.age-remember {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #f5f5f5; /* ensure contrast within the dark modal */
}

.age-remember input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

/* responsive tweaks */
@media (max-width: 640px) {
  header h1 { font-size: 1.6rem; }
  .beer-emoji { font-size: 3rem; }
  body { padding: 1rem; }
  footer {min-height: 10vh;}
}

/* Improve contrast and accessibility for generic links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(249, 199, 79, 0.9);
  transition: color 150ms ease, text-decoration-color 150ms ease, filter 150ms ease;
}

a:hover,
a:active {
  color: #ffffff;
  text-decoration-color: rgba(249, 199, 79, 1);
  filter: drop-shadow(0 0 6px rgba(249, 199, 79, 0.12));
}

a:focus-visible {
  outline: 3px solid rgba(249, 199, 79, 0.25);
  outline-offset: 4px;
  border-radius: 4px;
}

/* Improve .discord-link focus/hover contrast */
a.discord-link {
  background: var(--accent);
  color: #000;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(249, 199, 79, 0.4);
}

a.discord-link:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 30px rgba(249, 199, 79, 0.6);
}

a.discord-link:focus-visible {
  outline: 3px solid rgba(0, 0, 0, 0.6);
  outline-offset: 3px;
  border-radius: 9999px;
}

/* css - add to `styles.css` */
.event-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin-inline: auto; /* center if parent is wider */
    object-fit: contain; /* optional: use 'cover' if you want fill+crop */
}