/* ============================================================
   Bluewave Design System – CSS Custom Properties & Base Styles
   Zielgruppe: 16–25 Jahre | Dark Mode Default
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap');

/* ── Dark Mode (Default) ── */
:root,
[data-theme="dark"] {
  --bg:            #0a0a0f;
  --surface-1:     #111116;
  --surface-2:     #18181f;
  --surface-3:     #222229;
  --border:        #2a2a33;
  --fg:            #f0f0f5;
  --muted:         #8a8a9a;
  --accent:        #6C63FF;
  --accent-hover:  #7C74FF;
  --accent-glow:   rgba(108, 99, 255, 0.25);
  --accent-subtle: color-mix(in oklab, #6C63FF 15%, #222229);
  --own-bubble:    #6C63FF;
  --own-bubble-text: #ffffff;
  --online:        #22c55e;
  --online-glow:   rgba(34, 197, 94, 0.4);
  --away:          #f59e0b;
  --offline:       #4b5563;
  --danger:        #e11d48;
  --danger-glow:   rgba(225, 29, 72, 0.4);
  --shadow-md:     0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg:     0 25px 50px rgba(0, 0, 0, 0.65);
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-full:   999px;
}

/* ── Light Mode ── */
[data-theme="light"] {
  --bg:        #f0f0f8;
  --surface-1: #ffffff;
  --surface-2: #f4f4fa;
  --surface-3: #ebebf5;
  --border:    #d8d8e8;
  --fg:        #0a0a14;
  --muted:     #5a5a7a;
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ── Full CSS Reset ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  height: 100%;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--accent-hover);
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--fg);
}

p {
  color: var(--muted);
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* ── Custom Scrollbar ── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: var(--radius-full);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

/* ── Utility ── */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Skeleton Shimmer ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 50%,
    var(--surface-2) 75%
  );
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ── Animations ── */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typingBounce {
  0%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--online-glow);
  }
  50% {
    box-shadow: 0 0 0 4px var(--online-glow);
  }
}

@keyframes shimmer {
  from {
    background-position: -400px 0;
  }
  to {
    background-position: 400px 0;
  }
}

@keyframes waveFloat {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(3deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
