/* ============================================
   OverNight Roleplay – Stylesheet
   ============================================ */

:root {
  --bg-black: #00000A;
  --bg-violet: #0D035F;
  --accent-violet: #5B059D;
  --accent-pink: #E20CD0;
  --accent-blue: #1F20D5;
  --accent-cyan: #00D9FF;
  --text-primary: #FFFFFF;
  --text-secondary: #D8D8D8;
  --card-bg: #11112B;
  --card-border: #5B059D;
  --header-bg: rgba(0, 0, 10, 0.85);

  --gradient-main: linear-gradient(135deg, #00000A 0%, #0D035F 35%, #5B059D 65%, #E20CD0 100%);
  --glow-pink: 0 0 10px #E20CD0, 0 0 25px #E20CD0, 0 0 40px #00D9FF;
  --glow-cyan: 0 0 20px #00D9FF;

  --radius: 14px;
  --transition: 0.25s ease;
}

/* Helles Theme (optional, per Toggle) */
:root[data-theme="light"] {
  --bg-black: #F4F3FB;
  --bg-violet: #E7E3FA;
  --text-primary: #16112B;
  --text-secondary: #3C3760;
  --card-bg: #FFFFFF;
  --card-border: #C9A9E8;
  --header-bg: rgba(244, 243, 251, 0.9);
  --gradient-main: linear-gradient(135deg, #F4F3FB 0%, #E7E3FA 35%, #D9C4F2 65%, #F5C7EF 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
  background: var(--bg-black);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--accent-violet);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1160px;
  margin: 0 auto;
}

.nav__logo img { height: 40px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav__links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav__links a:hover,
.nav__links a.active {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.nav__actions { display: flex; align-items: center; gap: 12px; }

.theme-toggle {
  background: transparent;
  border: 1px solid var(--accent-violet);
  color: var(--text-primary);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.theme-toggle:hover { border-color: var(--accent-cyan); box-shadow: var(--glow-cyan); }

.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav__burger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-pink);
  color: #fff;
}
.btn--primary:hover {
  background: var(--accent-cyan);
  color: #00000A;
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border-color: var(--accent-violet);
  color: var(--text-primary);
}
.btn--outline:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.btn--discord {
  background: #5865F2;
  color: #fff;
}
.btn--discord:hover {
  box-shadow: 0 0 20px #5865F2;
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(0,0,10,0.55) 0%, rgba(13,3,95,0.75) 55%, #00000A 100%),
    url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1800&q=80');
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(226,12,208,0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0,217,255,0.2), transparent 45%);
  z-index: -1;
}

.hero__content { max-width: 680px; padding: 0 24px; margin: 0 auto; text-align: center; }

.hero__tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__title span {
  color: var(--accent-violet);
  text-shadow: 0 0 18px rgba(91, 5, 157, 0.6);
}

.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero__stats {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stats div { text-align: center; }
.hero__stats strong {
  display: block;
  font-size: 1.6rem;
  color: var(--accent-cyan);
}
.hero__stats span { font-size: 0.85rem; color: var(--text-secondary); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section--alt { background: var(--bg-violet); }

.section__header { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section__eyebrow {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section__title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin: 10px 0 12px; }
.section__desc { color: var(--text-secondary); }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 25px rgba(0, 217, 255, 0.25);
}

.card__icon { font-size: 1.8rem; margin-bottom: 14px; }
.card__title { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.card__desc { color: var(--text-secondary); font-size: 0.95rem; }

/* ---------- Page Hero (Unterseiten) ---------- */
.page-hero {
  padding: 70px 0 50px;
  text-align: center;
  background: var(--gradient-main);
  border-bottom: 1px solid var(--accent-violet);
}
.page-hero__title { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; margin-bottom: 12px; }
.page-hero__desc { color: var(--text-secondary); max-width: 600px; margin: 0 auto; }

/* ---------- Regelwerk ---------- */
.rules-category {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}
.rules-category__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--accent-violet);
}
.rules-category__head .card__icon { margin: 0; }
.rules-category__head h2 { font-size: 1.25rem; }
.rules-category ol {
  list-style: none;
  padding: 10px 26px 26px;
  counter-reset: rule;
}
.rules-category ol li {
  counter-increment: rule;
  position: relative;
  padding: 10px 0 10px 34px;
  border-bottom: 1px dashed rgba(216,216,216,0.15);
  color: var(--text-secondary);
}
.rules-category ol li:last-child { border-bottom: none; }
.rules-category ol li::before {
  content: counter(rule);
  position: absolute;
  left: 0;
  top: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-pink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rules-category ol li strong { color: var(--text-primary); }

/* ---------- Formular ---------- */
.form-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 36px;
  max-width: 720px;
  margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent-violet);
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(0,217,255,0.3);
}
.form-note {
  background: rgba(226, 12, 208, 0.08);
  border: 1px solid var(--accent-pink);
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.form-note strong { color: var(--text-primary); }

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-card__avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-pink));
  border: 2px solid var(--accent-cyan);
  overflow: hidden;
}
.team-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-card__role {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-cyan);
  text-transform: uppercase;
}

.team-card--placeholder {
  border-style: dashed;
  opacity: 0.7;
}
.team-card--placeholder .team-card__avatar {
  background: transparent;
  border-style: dashed;
  border-color: var(--card-border);
  color: var(--text-secondary);
}
.team-card--placeholder .team-card__role {
  color: var(--text-secondary);
}

/* ---------- CTA Band ---------- */
.cta-band {
  text-align: center;
  padding: 80px 24px;
  background: var(--gradient-main);
}
.cta-band__title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; margin-bottom: 14px; }
.cta-band__desc { color: var(--text-secondary); margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-band__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-black);
  border-top: 1px solid var(--accent-violet);
  padding: 50px 0 24px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.footer__brand img { height: 36px; margin-bottom: 12px; }
.footer__brand p { color: var(--text-secondary); font-size: 0.9rem; max-width: 320px; }
.footer h3 { font-size: 0.95rem; margin-bottom: 14px; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { color: var(--text-secondary); font-size: 0.9rem; transition: color var(--transition); }
.footer ul li a:hover { color: var(--accent-cyan); }
.footer__bottom {
  border-top: 1px solid rgba(91, 5, 157, 0.4);
  padding-top: 20px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--accent-violet);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .nav__links.open { max-height: 400px; }
  .nav__links a { width: 100%; padding: 16px 24px; border-bottom: 1px solid rgba(91,5,157,0.3); }
  .nav__burger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Chat-Widget ---------- */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.chat-widget__toggle {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(0, 217, 255, 0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-widget__toggle:hover { transform: translateY(-3px); box-shadow: var(--glow-cyan); }
.chat-widget__toggle.active { border-color: var(--accent-pink); }
.chat-widget__toggle img { width: 100%; height: 100%; object-fit: cover; }

.chat-widget__pulse {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #3ba55d;
  border: 2px solid var(--bg-black);
  box-shadow: 0 0 0 rgba(59, 165, 93, 0.6);
  animation: chatPulse 2s infinite;
}
@keyframes chatPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(59, 165, 93, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 165, 93, 0); }
}

.chat-widget__panel {
  width: min(320px, 84vw);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(12px);
  transition: max-height var(--transition), opacity var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.chat-widget__panel.open {
  max-height: 540px;
  opacity: 1;
  transform: translateY(0);
}

.chat-widget__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--accent-violet);
}
.chat-widget__header-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.chat-widget__header-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.chat-widget__header-text strong { font-size: 0.95rem; }
.chat-widget__header-text span { font-size: 0.78rem; color: var(--text-secondary); }
.chat-widget__close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}
.chat-widget__close:hover { color: var(--accent-pink); }

/* ---------- Chatbot-Nachrichten ---------- */
.chatbot__messages {
  padding: 14px 16px;
  overflow-y: auto;
  max-height: 320px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chatbot__msg { display: flex; }
.chatbot__msg--user { justify-content: flex-end; }
.chatbot__msg--bot { justify-content: flex-start; }

.chatbot__bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}
.chatbot__msg--bot .chatbot__bubble {
  background: var(--bg-violet);
  border: 1px solid var(--accent-violet);
  border-bottom-left-radius: 4px;
  color: var(--text-primary);
}
.chatbot__msg--user .chatbot__bubble {
  background: var(--accent-pink);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chatbot__link {
  align-self: flex-start;
  margin-top: -2px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-cyan);
  border-bottom: 1px solid var(--accent-cyan);
  padding-bottom: 1px;
}

/* Link mitten im Fließtext einer Bot-Antwort */
.chatbot__inline-link {
  color: var(--accent-cyan);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.chatbot__inline-link:hover {
  color: var(--text-primary);
}

.chatbot__typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}
.chatbot__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: chatbotTyping 1.2s infinite ease-in-out;
}
.chatbot__typing span:nth-child(2) { animation-delay: 0.2s; }
.chatbot__typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatbotTyping {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chatbot__quickreplies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.chatbot__chip {
  background: transparent;
  border: 1px solid var(--accent-violet);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.chatbot__chip:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.chat-widget__form {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--accent-violet);
}
.chat-widget__form input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--accent-violet);
  background: var(--bg-black);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
}
.chat-widget__form input:focus { outline: none; border-color: var(--accent-cyan); }
.chat-widget__form button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  justify-content: center;
  flex-shrink: 0;
}

.chat-widget__quicklinks {
  display: flex;
  gap: 10px;
  padding: 0 16px 12px;
  flex-wrap: wrap;
}
.chat-widget__quicklinks a {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  border: 1px solid var(--accent-violet);
  border-radius: 999px;
  padding: 5px 12px;
  transition: border-color var(--transition);
}
.chat-widget__quicklinks a:hover { border-color: var(--accent-cyan); }

@media (max-width: 480px) {
  .chat-widget { right: 16px; bottom: 16px; }
  .chat-widget__toggle { width: 54px; height: 54px; }
}
