/* ============================================================
   Bluewave – Pages CSS (dashboard.html, profile.html)
   ============================================================ */

/* ── Navbar ── */
.bw-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: color-mix(in oklab, var(--surface-1) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 24px;
}

.bw-navbar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.bw-navbar-logo img {
  height: 28px;
  width: auto;
}

.bw-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.bw-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.bw-nav-link:hover {
  color: var(--fg);
  background: var(--surface-3);
}

.bw-nav-link.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

/* User-Bereich rechts */
.bw-nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: background 0.18s ease;
  flex-shrink: 0;
  user-select: none;
}

.bw-nav-user:hover {
  background: var(--surface-3);
}

.bw-nav-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-nav-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.bw-nav-user.open .bw-nav-chevron {
  transform: rotate(180deg);
}

/* Dropdown */
.bw-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 200;
  animation: slideUp 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: none;
}

.bw-dropdown-menu.open {
  display: block;
}

.bw-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.bw-dropdown-item:hover {
  background: var(--surface-3);
  color: var(--fg);
}

.bw-dropdown-item.danger {
  color: var(--danger);
}

.bw-dropdown-item.danger:hover {
  background: rgba(225, 29, 72, 0.1);
}

.bw-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Hamburger (Mobile) */
.bw-nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-md);
  background: none;
  border: none;
  color: var(--fg);
  margin-left: auto;
}

.bw-nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* Mobile Nav Overlay */
.bw-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

.bw-mobile-menu.open {
  display: flex;
}

/* ── Seiten-Container ── */
.bw-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Hero-Sektion ── */
.bw-hero {
  padding: 40px 24px 32px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 100% at 50% 150%, rgba(108, 99, 255, 0.12) 0%, transparent 65%),
    radial-gradient(ellipse 40% 60% at 10% 50%, rgba(108, 99, 255, 0.06) 0%, transparent 55%);
}

.bw-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.bw-hero-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 24px;
}

.bw-hero-title span {
  color: var(--accent);
}

/* Stat-Cards */
.bw-stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.bw-stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bw-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.bw-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 4px;
}

.bw-stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Sections ── */
.bw-section {
  margin-bottom: 40px;
}

.bw-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.bw-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.bw-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(108, 99, 255, 0.3);
}

/* ── Stream-Grid ── */
.bw-stream-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bw-stream-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.bw-stream-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.15);
}

.bw-stream-thumbnail {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 35%, #0f3460 65%, #533483 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bw-stream-thumbnail-wave {
  opacity: 0.35;
  width: 80%;
}

.bw-live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--danger);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
  animation: livePulse 2s ease-in-out infinite;
  box-shadow: 0 0 8px var(--danger-glow);
}

.bw-stream-viewers {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bw-stream-info {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bw-stream-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bw-stream-host {
  font-size: 0.8rem;
  color: var(--muted);
}

.bw-stream-actions {
  padding: 0 14px 14px;
}

/* ── Community-Grid ── */
.bw-community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.bw-community-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bw-community-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.bw-community-card-new {
  background: transparent;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  min-height: 140px;
  opacity: 0.65;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
}

.bw-community-card-new:hover {
  opacity: 1;
  border-color: var(--accent);
}

.bw-community-card-new-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  border: 1px solid rgba(108, 99, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.4rem;
}

.bw-community-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
}

.bw-community-desc {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.bw-community-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.bw-community-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Leerer Zustand ── */
.bw-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  gap: 12px;
}

.bw-empty-icon {
  font-size: 2.5rem;
  opacity: 0.5;
}

.bw-empty-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
}

.bw-empty-text {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 320px;
}

.bw-empty-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

/* ── Online-Mitglieder ── */
.bw-online-section {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.bw-online-header {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.bw-online-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--online);
  box-shadow: 0 0 0 2px var(--online-glow);
  animation: livePulse 2.5s ease-in-out infinite;
  flex-shrink: 0;
}

.bw-online-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.bw-online-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.bw-online-member-name {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  max-width: 52px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Dashboard Layout ── */
.bw-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 32px;
  padding: 32px 0;
}

.bw-dashboard-main {
  min-width: 0;
}

.bw-dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Profil-Header ── */
.bw-profile-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 32px 24px;
}

.bw-profile-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.bw-avatar-edit {
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
}

.bw-avatar-edit-overlay {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: #fff;
  font-size: 1.1rem;
}

.bw-avatar-edit:hover .bw-avatar-edit-overlay {
  opacity: 1;
}

.bw-profile-header-info {
  flex: 1;
  min-width: 0;
}

.bw-profile-username {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.bw-profile-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bw-profile-since {
  font-size: 0.8rem;
  color: var(--muted);
}

.bw-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(108, 99, 255, 0.3);
}

/* ── Profil-Grid ── */
.bw-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 32px 0;
}

/* ── Cards ── */
.bw-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.bw-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-card-body {
  padding: 20px;
}

/* ── Farb-Picker ── */
.bw-color-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.bw-color-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.bw-color-dot:hover {
  transform: scale(1.15);
}

.bw-color-dot.active {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* ── Passwort-Stärke (Profile) ── */
.bw-pw-strength-wrap {
  margin-top: 8px;
}

/* ── Status-Select ── */
.bw-status-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bw-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--online);
  flex-shrink: 0;
  transition: background 0.2s ease;
}

/* ── Profil-Info-Item ── */
.bw-profile-info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.bw-profile-info-item:last-child {
  border-bottom: none;
}

.bw-profile-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bw-profile-info-value {
  font-size: 0.9rem;
  color: var(--fg);
  font-weight: 500;
}

/* ── Avatar-Vorschau (groß) ── */
.bw-avatar-80 {
  width: 80px;
  height: 80px;
  font-size: 1.75rem;
}

/* ── Footer ── */
.bw-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px 24px;
  font-size: 0.8rem;
  color: var(--muted);
}

.bw-footer a {
  color: var(--muted);
  transition: color 0.18s ease;
}

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

/* ── Toast (wird auch hier genutzt) ── */
.bw-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
  max-width: 360px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bw-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .bw-stream-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .bw-navbar {
    padding: 0 16px;
  }

  .bw-nav-links {
    display: none;
  }

  .bw-nav-hamburger {
    display: flex;
  }

  .bw-hero {
    padding: 28px 16px 24px;
  }

  .bw-stat-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bw-stream-grid {
    grid-template-columns: 1fr;
  }

  .bw-page-container {
    padding: 0 16px;
  }

  .bw-profile-grid {
    grid-template-columns: 1fr;
  }

  .bw-profile-header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .bw-profile-meta {
    justify-content: center;
  }

  .bw-dashboard-layout {
    padding: 20px 0;
  }

  .bw-nav-user-name {
    display: none;
  }
}

@media (max-width: 480px) {
  .bw-community-grid {
    grid-template-columns: 1fr;
  }
}
