/* =========================================
   GLOBAL.CSS - MOBILE OPTIMIZED
   ========================================= */

:root {
  --bg-dark: #0a0b10;
  --bg-darker: #050508;
  --bg-panel: rgba(20, 20, 30, 0.75);
  --primary: #7c3aed;
  --primary-glow: rgba(124, 58, 237, 0.5);
  --text-main: #ffffff;
  --text-muted: #9ca3af;
  --radius: 12px;
  --header-height: 80px;
}

/* --- RESET --- */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }
html { overflow-x: hidden; width: 100%; scroll-behavior: smooth; }
ul, ol, li { list-style: none; padding: 0; margin: 0; }

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  display: flex; flex-direction: column; min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
button { font-family: inherit; cursor: pointer; }

/* HINTERGRUND */
.global-bg {
  position: fixed; inset: 0; z-index: -1; background: #05000a;
  background-image: linear-gradient(rgba(124, 58, 237, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 58, 237, 0.08) 1px, transparent 1px);
  background-size: 50px 50px; pointer-events: none;
}
.global-bg::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0%, #05000a 100%); }

/* UTILS */
.container { width: 90%; max-width: 1200px; margin: 0 auto; position: relative; }
.section-padding { padding: 100px 0; }
.text-center { text-align: center; }
.bg-darker { background: var(--bg-darker); border-top: 1px solid rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.03); }
.highlight { color: var(--primary); text-shadow: 0 0 25px var(--primary-glow); }
.muted { color: var(--text-muted); }

/* NAVBAR - FIX: EXTREM HOHER Z-INDEX */
.navbar {
  height: var(--header-height);
  position: fixed; top: 0; left: 0; width: 100%; 
  z-index: 10000; /* Muss über ALLEM liegen */
  background: rgba(10, 11, 16, 0.95); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center;
}
.nav-container { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; color: #fff; font-family: 'Rajdhani', sans-serif; font-weight: 700; text-transform: uppercase; z-index: 10001; }
.nav-logo img { height: 38px; }

.nav-links { display: flex; gap: 35px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; color: var(--text-muted); padding: 5px 0; position: relative; }
.nav-links a:hover, .nav-links a.active { color: #fff; text-shadow: 0 0 15px var(--primary-glow); }
.nav-links a.chat-hover { padding: 8px 20px; border-radius: 6px; background: rgba(88, 101, 242, 0.15); border: 1px solid rgba(88, 101, 242, 0.3); color: #fff; }
.nav-links a.chat-hover:hover { background: #5865F2; }

/* BURGER BUTTON - FIX: Klickbar machen */
.burger-btn { 
  display: none; background: none; border: none; color: #fff; 
  font-size: 1.8rem; padding: 10px; cursor: pointer;
  z-index: 10002; /* Über der Navbar */
}

/* MOBILE MENU - FIX: Layout & Sichtbarkeit */
.mobile-menu { 
  position: fixed; top: var(--header-height); left: 0; width: 100%; 
  height: 0; opacity: 0; visibility: hidden;
  background: rgba(5,5,10,0.98); backdrop-filter: blur(20px); 
  z-index: 9999; /* Direkt unter Navbar aber über Content */
  overflow-y: auto; /* Scrollbar erlauben */
  transition: all 0.3s ease; 
  display: flex; flex-direction: column; 
  border-bottom: 1px solid rgba(255,255,255,0.1); 
  padding: 0;
}
.mobile-menu.active { 
  height: calc(100vh - var(--header-height)); 
  opacity: 1; visibility: visible; 
  padding-bottom: 50px; 
}

/* Links im Menü */
.mobile-link { 
  font-size: 1.2rem; padding: 20px 30px; 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
  font-weight: 600; color: #fff; display: block; width: 100%;
}
.mobile-link:active { background: rgba(255,255,255,0.05); color: var(--primary); }

/* Discord Button im Mobile Menu (Verbessert) */
.mobile-discord-btn {
  margin: 20px auto; /* Zentriert mit Abstand */
  width: 85%; /* Nicht volle Breite */
  background: #5865F2;
  color: #fff !important;
  text-align: center;
  border-radius: 8px;
  border: none;
  box-shadow: 0 5px 15px rgba(88, 101, 242, 0.3);
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 15px !important;
}
.mobile-discord-btn:active { transform: scale(0.98); background: #4752c4; }

/* BUTTONS */
.btn { padding: 14px 32px; border-radius: 6px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; transition: 0.3s; font-size: 1rem; color: #fff; font-family: 'Rajdhani', sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.btn-primary { background: var(--primary); box-shadow: 0 0 20px rgba(124, 58, 237, 0.4); border: 1px solid var(--primary); }
.btn-secondary { background: transparent; border: 1px solid rgba(255,255,255,0.15); }
.glow-anim { animation: btnPulse 3s infinite; }
@keyframes btnPulse { 0%, 100% { box-shadow: 0 0 15px rgba(124, 58, 237, 0.4); } 50% { box-shadow: 0 0 30px rgba(124, 58, 237, 0.7); } }

/* FOOTER */
footer { background: #050005; border-top: 1px solid rgba(255,255,255,0.05); padding: 80px 0 30px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; margin-bottom: 50px; }
.footer-logo { width: 60px; margin-bottom: 20px; display: block; }
.social-links { display: flex; gap: 15px; margin-top: 25px; }
.social-links a { width: 40px; height: 40px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: 0.3s; }
.footer-links h4 { margin-bottom: 25px; color: #fff; border-bottom: 2px solid var(--primary); display: inline-block; padding-bottom: 5px; font-family: 'Rajdhani', sans-serif; text-transform: uppercase; }
.footer-links a { color: var(--text-muted); transition: 0.3s; display: block; margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; text-align: center; color: rgba(255,255,255,0.2); font-size: 0.9rem; }

/* ANIMATIONEN */
.fade-in-up { animation: fadeUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.scroll-reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease; }
.scroll-reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }

/* --- MOBILE RESPONSIVE FIXES --- */
@media (max-width: 900px) {
  .nav-links, .desktop-only { display: none !important; }
  .burger-btn { display: block; }
  .footer-top { grid-template-columns: 1fr; text-align: center; gap: 40px; }
  .social-links { justify-content: center; }
  .section-padding { padding: 60px 0; }
  .container { width: 90%; }
}

/* =========================================
   LIVE CHAT WIDGET
   ========================================= */
#tl-chat-container {
  position: fixed; bottom: 20px; right: 20px; z-index: 9000;
  display: flex; flex-direction: column; align-items: flex-end;
  pointer-events: none;
}
#tl-chat-container > * { pointer-events: auto; }

.chat-toggle-btn {
  width: 60px; height: 60px; background: var(--primary);
  border: 2px solid rgba(255,255,255,0.2); border-radius: 50%;
  color: #fff; font-size: 1.5rem; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.chat-window {
  width: 360px; height: 500px;
  background: rgba(10, 11, 16, 0.95); backdrop-filter: blur(20px);
  border: 1px solid var(--primary); border-radius: 16px; margin-bottom: 15px;
  display: flex; flex-direction: column; overflow: hidden;
  opacity: 0; transform: translateY(20px) scale(0.95); pointer-events: none;
  transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  transform-origin: bottom right; position: absolute; bottom: 70px; right: 0;
}
.chat-window.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-header { padding: 15px; background: rgba(0,0,0,0.2); border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; align-items: center; }
.chat-partner { display: flex; gap: 10px; align-items: center; }
.chat-partner-avatar { width: 35px; height: 35px; border-radius: 50%; overflow: hidden; border: 2px solid var(--primary); }
.chat-partner-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-partner-info h4 { font-size: 1rem; color: #fff; margin: 0; font-family: 'Rajdhani', sans-serif; }
.chat-partner-info span { font-size: 0.7rem; color: #4ade80; }
.chat-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: #fff; display: grid; place-items: center; }

.chat-body { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; background: rgba(0,0,0,0.2); }
.chat-msg { padding: 10px 14px; border-radius: 10px; font-size: 0.9rem; max-width: 85%; word-wrap: break-word; }
.chat-msg.bot { background: rgba(255,255,255,0.1); color: #ddd; align-self: flex-start; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; }

.chat-footer { padding: 10px; background: rgba(0,0,0,0.3); display: flex; gap: 10px; }
.chat-input { flex: 1; padding: 10px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: #fff; font-size: 16px; /* Wichtig für Handy */ }
.chat-send { width: 40px; background: var(--primary); border: none; border-radius: 6px; color: #fff; }

.typing-indicator { font-size: 0.7rem; color: #888; margin-left: 15px; margin-bottom: 5px; display: none; }
.typing-indicator.visible { display: block; }

/* MOBILE CHAT OPTIMIERUNG */
@media (max-width: 480px) {
  .chat-window { width: calc(100vw - 40px); height: 60vh; bottom: 85px; right: 0; }
  #tl-chat-container { right: 20px; bottom: 20px; }
  .chat-toggle-btn { width: 55px; height: 55px; font-size: 1.4rem; }
}