/* epgaming2020 - Design: dunkles "Feldabend"-Thema
   Palette inspiriert von Ackerboden bei Nacht + Erntegold als Streaming-Akzent */

:root {
  --bg: #12140d;
  --bg-raised: #1b2016;
  --bg-raised-2: #232a1c;
  --line: #2e3624;
  --text: #f1efe6;
  --text-muted: #a3ab93;
  --gold: #e3a13c;
  --gold-soft: #f0c579;
  --green: #7ba045;
  --live: #d1483f;
  --radius: 3px;
  --font-display: "Oswald", sans-serif;
  --font-body: "Work Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
}

body {
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(227, 161, 60, 0.08), transparent),
    radial-gradient(ellipse 700px 600px at 100% 10%, rgba(123, 160, 69, 0.06), transparent);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); line-height: 1.05; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--text-muted); max-width: 68ch; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 20, 13, 0.85);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
}
.logo-icon { width: 34px; height: 34px; display: block; flex-shrink: 0; }
.logo-text { white-space: nowrap; }
.logo-text span { color: var(--gold); }

.main-nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); align-items: center; }
.main-nav a {
  color: var(--text-muted);
  font-size: 0.98rem;
  padding: 0.3em 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.nav-toggle { display: none; }

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(1.2rem, 4vw, 3rem);
}

main { flex: 1; padding: 2.5rem 0 4rem; }

.section { margin-bottom: 3.2rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem;
}
.section-head a.more { font-size: 0.92rem; white-space: nowrap; }

/* ---------- Masthead-Banner (Startseite) ---------- */
.masthead-banner {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  margin: 2rem 0 2.5rem;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 1rem 0 3rem;
}
.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
  color: var(--text-muted);
  border: 1px solid var(--line);
  padding: 0.35em 0.8em;
  border-radius: var(--radius);
  margin-bottom: 1.1rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.dot.live { background: var(--live); box-shadow: 0 0 0 3px rgba(209, 72, 63, 0.25); }

.hero-stream {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}
.hero-stream::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(115deg, rgba(227,161,60,0.04) 0 2px, transparent 2px 60px);
}

/* ---------- Cards / lists ---------- */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}

.news-item {
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-item .meta { font-size: 0.85rem; color: var(--gold-soft); margin-bottom: 0.3em; }
.news-item h3 { margin-bottom: 0.35em; }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--bg);
  background: var(--gold-soft);
  padding: 0.15em 0.6em;
  border-radius: var(--radius);
  font-family: var(--font-display);
}

/* ---------- Schedule table ---------- */
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.6em 0.8em;
  border-bottom: 1px solid var(--line);
}
.schedule-table td {
  padding: 0.85em 0.8em;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.schedule-table tr:last-child td { border-bottom: none; }
.schedule-table .day { font-family: var(--font-display); color: var(--text); }
.schedule-table .time { color: var(--gold-soft); white-space: nowrap; }

/* ---------- Upload list ---------- */
.upload-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.upload-row:last-child { border-bottom: none; }
.upload-row .date { color: var(--gold-soft); font-family: var(--font-display); font-size: 0.95rem; }
.status-pill {
  font-size: 0.78rem;
  padding: 0.2em 0.7em;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  white-space: nowrap;
  justify-self: end;
}
.status-pill.online { color: var(--green); border-color: var(--green); }
.status-pill.geplant { color: var(--gold-soft); border-color: var(--gold-soft); }

/* ---------- Forms / Admin ---------- */
.form-grid { display: grid; gap: 0.9rem; max-width: 520px; }
label { display: block; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.3em; }
input, textarea, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.6em 0.7em;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.98rem;
}
textarea { min-height: 100px; resize: vertical; }

button, .btn {
  font-family: var(--font-display);
  font-size: 0.95rem;
  background: var(--gold);
  color: #1a1400;
  border: none;
  padding: 0.6em 1.3em;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--gold-soft); }
button.secondary, .btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
button.secondary:hover { border-color: var(--gold); color: var(--gold-soft); background: transparent; }
button.danger { background: var(--live); color: var(--text); }
button.danger:hover { background: #e6584e; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 0.7em 0.6em;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
.admin-table th { color: var(--text-muted); font-weight: 500; }
.admin-table .row-actions { display: flex; gap: 0.5em; white-space: nowrap; }
.admin-table .row-actions button { padding: 0.35em 0.8em; font-size: 0.85rem; }

.admin-panel-block { margin-bottom: 3rem; }
.admin-login-wrap {
  max-width: 380px;
  margin: 3rem auto;
  padding: 2rem;
}
.error-msg { color: var(--live); font-size: 0.9rem; margin: -0.4rem 0 0.9rem; min-height: 1em; }
.success-msg { color: var(--green); font-size: 0.9rem; margin: -0.4rem 0 0.9rem; min-height: 1em; }

.empty-state {
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

/* ---------- Stream-Karten ---------- */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.1rem;
}
.stream-card {
  display: block;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  color: var(--text);
}
.stream-card:hover { border-color: var(--gold); }
.stream-card h3 { margin-bottom: 0.4em; color: var(--text); }
.stream-card p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Statistik (Admin) ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.stat-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.3rem; }
.stat-card .num { font-family: var(--font-display); font-size: 1.9rem; color: var(--gold-soft); }
.stat-card .label { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem clamp(1.2rem, 4vw, 3rem);
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-social a { color: var(--text-muted); margin: 0 0.25em; }
.footer-social a:hover { color: var(--gold-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; }
  .main-nav {
    position: fixed;
    inset: 62px 0 auto 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem clamp(1.2rem, 4vw, 3rem) 1.4rem;
    display: none;
  }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: inline-flex;
    background: none;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 0.4em 0.7em;
  }
  .upload-row { grid-template-columns: 1fr; }
  .status-pill { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
