/* StreamVerse - Hauptstylesheet
   Modern, eigenständiges Streaming-Design - Dark Mode Standard */

:root {
  --color-bg: #0e0e10;
  --color-surface: #18181b;
  --color-surface-hover: #1f1f23;
  --color-surface-2: #26262e;
  --color-border: #2d2d35;
  --color-text: #efeff1;
  --color-text-secondary: #adadb8;
  --color-text-muted: #7a7a85;
  --color-primary: #9147ff;
  --color-primary-hover: #7c3aed;
  --color-primary-light: #a855f7;
  --color-success: #28a745;
  --color-success-light: rgba(40, 167, 69, 0.15);
  --color-error: #dc3545;
  --color-error-light: rgba(220, 53, 69, 0.15);
  --color-warning: #ffc107;
  --color-warning-light: rgba(255, 193, 7, 0.15);
  --color-info: #17a2b8;
  --color-info-light: rgba(23, 162, 184, 0.15);
  --color-live: #eb0400;
  --color-gold: #ffd700;
  --color-accent-violet: #9147ff;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
  --transition: 0.2s ease;
  --header-height: 56px;
  --sidebar-width: 240px;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;
}

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

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 14px;
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-light); }

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

/* ===== HEADER ===== */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-primary);
  flex-shrink: 0;
}
.logo-icon { font-size: 24px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
}

.nav-link {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--color-surface-hover); color: var(--color-text); }
.nav-link.active { color: var(--color-primary); }

.nav-search { margin-left: auto; position: relative; }
.search-form { display: flex; gap: 4px; }
.search-input {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 8px 16px;
  color: var(--color-text);
  width: 200px;
  font-size: 13px;
  transition: all var(--transition);
}
.search-input:focus { outline: none; border-color: var(--color-primary); width: 260px; }
.search-btn {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 8px 12px;
  cursor: pointer;
  color: var(--color-text-secondary);
}

.search-results {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1001;
}
.search-results.show { display: block; }
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
.search-result-item:hover { background: var(--color-surface-hover); }
.search-result-item img { width: 32px; height: 32px; border-radius: var(--radius-full); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.header-icon {
  position: relative;
  padding: 8px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 18px;
  transition: all var(--transition);
}
.header-icon:hover { background: var(--color-surface-hover); color: var(--color-text); }

.header-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-surface-2);
  border-radius: var(--radius-full);
  font-weight: 700;
  color: var(--color-gold);
  font-size: 13px;
}

.header-profile { position: relative; }
.profile-avatar-link { display: block; }
.header-avatar { width: 32px; height: 32px; border-radius: var(--radius-full); }

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  display: none;
  z-index: 1001;
  padding: 4px;
}
.header-profile:hover .profile-dropdown { display: block; }
.profile-dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.profile-dropdown a:hover { background: var(--color-surface-hover); }
.profile-dropdown hr { border: none; border-top: 1px solid var(--color-border); margin: 4px 0; }
.logout-link { color: var(--color-error) !important; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-toggle span { width: 22px; height: 2px; background: var(--color-text); border-radius: 2px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 14px;
  text-decoration: none;
  font-family: var(--font-sans);
}
.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-outline { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { background: var(--color-surface-hover); }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--color-success); color: white; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; background: var(--color-surface-2); border-radius: var(--radius-md); color: var(--color-text-secondary); border: 1px solid var(--color-border); }

/* ===== BADGES ===== */
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-live);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.live-badge-sm {
  background: var(--color-live);
  color: white;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  position: absolute;
  bottom: 4px;
  left: 4px;
}

.status-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.status-completed, .status-resolved { background: var(--color-success-light); color: var(--color-success); }
.status-pending, .status-open, .status-in_progress { background: var(--color-warning-light); color: var(--color-warning); }
.status-failed, .status-cancelled, .status-rejected { background: var(--color-error-light); color: var(--color-error); }
.status-refunded { background: var(--color-info-light); color: var(--color-info); }

/* ===== MAIN CONTENT ===== */
.main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 20px 16px;
  min-height: calc(100vh - var(--header-height) - 200px);
}

/* ===== HERO ===== */
.hero-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1b4e 50%, #1a1a2e 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(145,71,255,0.15) 0%, transparent 50%);
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 { font-size: 36px; margin-bottom: 12px; font-weight: 800; }
.hero-content p { color: var(--color-text-secondary); font-size: 18px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== SECTIONS ===== */
.content-section { margin-bottom: 36px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 20px; font-weight: 700; }
.section-link { font-size: 13px; font-weight: 600; }

/* ===== STREAM GRID ===== */
.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.stream-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: block;
}
.stream-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stream-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--color-surface-2);
  overflow: hidden;
}
.stream-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.viewer-count {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.stream-card-info { display: flex; gap: 10px; padding: 12px; }
.stream-card-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); flex-shrink: 0; }
.stream-card-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stream-card-streamer { font-size: 13px; color: var(--color-primary); font-weight: 600; }
.stream-card-category { font-size: 12px; color: var(--color-text-muted); }
.stream-card-date { font-size: 12px; color: var(--color-text-muted); }

/* ===== CREATOR GRID ===== */
.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.creator-card {
  text-align: center;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: transform var(--transition);
}
.creator-card:hover { transform: translateY(-2px); }
.creator-card-avatar {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
}
.creator-card-avatar img { width: 100%; height: 100%; border-radius: var(--radius-full); }
.creator-card-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.creator-card-followers { font-size: 12px; color: var(--color-text-muted); }

/* ===== CATEGORY GRID ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: all var(--transition);
}
.category-card:hover { background: var(--color-surface-hover); transform: translateY(-2px); }
.category-icon { font-size: 32px; }
.category-name { font-weight: 600; font-size: 14px; }

/* ===== AUTH PAGES ===== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 20px;
}
.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { font-size: 24px; margin-bottom: 8px; text-align: center; }
.auth-subtitle { color: var(--color-text-secondary); text-align: center; margin-bottom: 24px; font-size: 14px; }
.auth-form .form-group { margin-bottom: 16px; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--color-text-secondary); font-size: 13px; }
.auth-footer a { font-weight: 600; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--color-text-secondary); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 14px;
  font-family: var(--font-sans);
  transition: border-color var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { resize: vertical; }
.form-check { display: flex; align-items: center; }
.form-check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--color-text); }
.form-check input[type="checkbox"] { width: auto; }
.form-hint { font-size: 12px; color: var(--color-text-muted); margin-top: 4px; }

/* ===== FLASH MESSAGES ===== */
.flash-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 14px;
}
.flash-success { background: var(--color-success-light); color: var(--color-success); }
.flash-error { background: var(--color-error-light); color: var(--color-error); }
.flash-info { background: var(--color-info-light); color: var(--color-info); }
.flash-warning { background: var(--color-warning-light); color: var(--color-warning); }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-text-muted);
  font-size: 16px;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}
.page-info { color: var(--color-text-secondary); font-size: 13px; }

/* ===== PROFILE PAGE ===== */
.profile-page { max-width: 1200px; margin: 0 auto; }
.profile-banner {
  height: 240px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-surface-2);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.profile-header {
  display: flex;
  gap: 20px;
  padding: 0 20px;
  margin-top: -60px;
  position: relative;
  flex-wrap: wrap;
}
.profile-avatar-large {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.profile-avatar-large img {
  width: 100%; height: 100%;
  border-radius: var(--radius-full);
  border: 4px solid var(--color-bg);
}
.profile-live-badge { position: absolute; bottom: 4px; right: 4px; }
.profile-info { flex: 1; padding-top: 60px; }
.profile-info h1 { font-size: 24px; }
.profile-username { color: var(--color-text-muted); font-size: 14px; }
.profile-bio { margin-top: 8px; color: var(--color-text-secondary); }
.profile-stats { display: flex; gap: 24px; margin-top: 12px; }
.stat { display: flex; flex-direction: column; }
.stat-value { font-size: 18px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--color-text-muted); }
.profile-actions { display: flex; gap: 8px; padding-top: 60px; flex-wrap: wrap; }

/* ===== WATCH PAGE ===== */
.watch-page {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
}
.watch-main { padding-right: 0; }

.player-container {
  position: relative;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}
.live-player { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}
.player-status { display: flex; align-items: center; gap: 12px; }
.viewer-count-display {
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
}
.player-controls-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}
.player-btn {
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
  transition: background var(--transition);
}
.player-btn:hover { background: rgba(255,255,255,0.2); }
.volume-slider { width: 80px; accent-color: var(--color-primary); }
.player-info-display { color: white; font-size: 12px; margin-left: auto; margin-right: 8px; }
.quality-selector {
  background: rgba(0,0,0,0.6);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
}
.player-reconnect {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  background: rgba(0,0,0,0.8);
  padding: 20px 40px;
  border-radius: var(--radius-md);
}
.stream-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-text-muted);
  gap: 12px;
}
.offline-icon { font-size: 48px; }

.stream-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 12px;
}
.streamer-info { display: flex; align-items: center; gap: 12px; }
.streamer-avatar { width: 48px; height: 48px; border-radius: var(--radius-full); }
.streamer-details h2 { font-size: 16px; margin-bottom: 2px; }
.streamer-name { color: var(--color-primary); font-weight: 600; font-size: 14px; }
.stream-category { font-size: 13px; color: var(--color-text-muted); }
.stream-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.like-btn.liked { background: var(--color-error); color: white; border-color: var(--color-error); }

/* ===== GIFT BAR ===== */
.gift-bar {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}
.gift-bar h3 { margin-bottom: 12px; font-size: 16px; }
.gift-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gift-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  min-width: 80px;
}
.gift-item:hover { border-color: var(--color-primary); background: var(--color-surface-hover); }
.gift-icon { font-size: 24px; }
.gift-name { font-size: 11px; font-weight: 600; }
.gift-price { font-size: 10px; color: var(--color-gold); }
.gift-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
  font-size: 13px;
}

/* ===== CHAT ===== */
.watch-chat {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height) - 40px);
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.chat-header h3 { font-size: 15px; }
.chat-viewer-count { font-size: 12px; color: var(--color-text-muted); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-message {
  display: flex;
  gap: 8px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.chat-message:hover { background: var(--color-surface-hover); }
.chat-avatar { width: 24px; height: 24px; border-radius: var(--radius-full); flex-shrink: 0; margin-top: 2px; }
.chat-content { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; }
.chat-username { font-weight: 700; font-size: 13px; }
.role-1 { color: var(--color-text); }
.role-2 { color: var(--color-gold); }
.role-3 { color: var(--color-success); }
.role-4 { color: var(--color-primary); }
.role-5, .role-6 { color: var(--color-error); }
.chat-time { font-size: 11px; color: var(--color-text-muted); }
.chat-text { font-size: 13px; color: var(--color-text); word-break: break-word; }

.chat-input-area {
  padding: 8px;
  border-top: 1px solid var(--color-border);
}
.chat-form { display: flex; gap: 4px; margin-bottom: 4px; }
.chat-form input {
  flex: 1;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--color-text);
  font-size: 13px;
}
.chat-form input:focus { outline: none; border-color: var(--color-primary); }
.chat-emojis { display: flex; gap: 2px; flex-wrap: wrap; }
.emoji-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.emoji-btn:hover { background: var(--color-surface-hover); }
.chat-muted, .chat-login-required { text-align: center; padding: 16px; color: var(--color-text-muted); font-size: 13px; }

/* ===== CARDS ===== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.card h2 { font-size: 18px; margin-bottom: 16px; }
.card h3 { font-size: 16px; margin-bottom: 12px; }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.stat-icon { font-size: 28px; }
.stat-data { display: flex; flex-direction: column; }
.stat-value { font-size: 20px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--color-text-muted); }

/* ===== TABLES ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--color-surface-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.data-table tr:hover td { background: var(--color-surface-hover); }
.table-avatar { width: 24px; height: 24px; border-radius: var(--radius-full); vertical-align: middle; margin-right: 6px; }
.inline-form { display: inline-flex; gap: 4px; align-items: center; }

/* ===== COINS PAGE ===== */
.coins-page { max-width: 1000px; margin: 0 auto; }
.coin-balance-display { margin-bottom: 24px; }
.balance-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, #2d1b4e, #1a1a2e);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.balance-icon { font-size: 40px; }
.balance-label { display: block; font-size: 13px; color: var(--color-text-muted); }
.balance-value { font-size: 28px; font-weight: 800; color: var(--color-gold); }

.coin-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.coin-package-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 16px;
  text-align: center;
  transition: all var(--transition);
}
.coin-package-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.package-coins { margin-bottom: 12px; }
.package-icon { font-size: 32px; display: block; }
.package-amount { font-size: 24px; font-weight: 800; display: block; }
.package-label { font-size: 12px; color: var(--color-text-muted); }
.package-price { font-size: 20px; font-weight: 700; margin-bottom: 12px; color: var(--color-success); }

.coin-info { background: var(--color-surface); border-radius: var(--radius-lg); padding: 20px; }
.coin-info h3 { margin-bottom: 12px; }
.coin-info ul { list-style: none; padding: 0; }
.coin-info li { padding: 6px 0; }
.coin-note { color: var(--color-text-muted); font-size: 12px; margin: 12px 0; }

/* ===== PAYMENT RESULT ===== */
.payment-result-page { display: flex; justify-content: center; padding: 40px 20px; }
.payment-result-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 500px;
  width: 100%;
  text-align: center;
}
.payment-success-icon, .payment-pending-icon, .payment-error-icon, .payment-cancel-icon { font-size: 64px; margin-bottom: 16px; }
.payment-details { margin: 24px 0; text-align: left; }
.payment-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--color-border); }
.detail-label { color: var(--color-text-muted); }
.detail-value { font-weight: 600; }
.detail-value.highlight { color: var(--color-gold); font-size: 18px; }
.payment-note { color: var(--color-text-secondary); font-size: 13px; margin: 16px 0; }
.payment-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }

/* ===== MESSAGES ===== */
.messages-page { max-width: 1200px; margin: 0 auto; }
.messages-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; min-height: 600px; }
.conversations-list { border-right: 1px solid var(--color-border); padding: 12px; overflow-y: auto; }
.conversations-list h3 { padding: 8px; font-size: 16px; }
.conversation-item { display: flex; gap: 10px; padding: 10px; border-radius: var(--radius-md); transition: background var(--transition); align-items: center; }
.conversation-item:hover { background: var(--color-surface-hover); }
.conversation-item.active { background: var(--color-surface-2); }
.conv-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.conv-info { flex: 1; min-width: 0; }
.conv-header { display: flex; justify-content: space-between; align-items: center; }
.conv-name { font-weight: 600; font-size: 13px; }
.conv-time { font-size: 11px; color: var(--color-text-muted); }
.conv-preview { font-size: 12px; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { background: var(--color-primary); color: white; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-full); }

.messages-view { display: flex; flex-direction: column; }
.messages-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.messages-header a { display: flex; align-items: center; gap: 8px; color: var(--color-text); font-weight: 600; }
.messages-container { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.message-item { display: flex; }
.message-item.sent { justify-content: flex-end; }
.message-item.received { justify-content: flex-start; }
.message-bubble { max-width: 70%; padding: 10px 14px; border-radius: var(--radius-lg); }
.message-item.sent .message-bubble { background: var(--color-primary); color: white; border-bottom-right-radius: 4px; }
.message-item.received .message-bubble { background: var(--color-surface-2); border-bottom-left-radius: 4px; }
.message-time { font-size: 10px; opacity: 0.7; margin-top: 4px; display: block; }
.message-input-area { display: flex; gap: 4px; padding: 12px; border-top: 1px solid var(--color-border); }
.message-input-area input { flex: 1; background: var(--color-surface-2); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 10px; color: var(--color-text); }
.no-conversation { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 16px; color: var(--color-text-muted); }

/* ===== NOTIFICATIONS ===== */
.notifications-page { max-width: 800px; margin: 0 auto; }
.notifications-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.notifications-list { display: flex; flex-direction: column; gap: 4px; }
.notification-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--color-surface); border-radius: var(--radius-md); border-left: 3px solid transparent; transition: all var(--transition); }
.notification-item.unread { border-left-color: var(--color-primary); background: var(--color-surface-hover); }
.notif-avatar { width: 36px; height: 36px; border-radius: var(--radius-full); }
.notif-content { flex: 1; }
.notif-text { font-size: 13px; }
.notif-time { font-size: 11px; color: var(--color-text-muted); }
.notif-link { font-size: 12px; font-weight: 600; }

/* ===== SEARCH ===== */
.search-page { max-width: 1000px; margin: 0 auto; }
.search-form-large { display: flex; gap: 8px; margin-bottom: 20px; }
.search-input-large { flex: 1; padding: 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-text); font-size: 16px; }
.search-input-large:focus { outline: none; border-color: var(--color-primary); }
.search-tabs { display: flex; gap: 4px; margin-bottom: 20px; flex-wrap: wrap; }
.search-tab { padding: 8px 16px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-secondary); font-weight: 600; font-size: 13px; transition: all var(--transition); }
.search-tab.active, .search-tab:hover { background: var(--color-primary); color: white; }
.search-section { margin-bottom: 32px; }
.search-section h2 { margin-bottom: 12px; font-size: 18px; }
.search-results-list { display: flex; flex-direction: column; gap: 8px; }
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--color-surface); border-radius: var(--radius-md); transition: background var(--transition); }
.search-result-item:hover { background: var(--color-surface-hover); }
.search-avatar { width: 40px; height: 40px; border-radius: var(--radius-full); }
.search-result-item h3 { font-size: 14px; }
.search-result-item p { font-size: 12px; color: var(--color-text-muted); }

/* ===== SETTINGS ===== */
.settings-page { max-width: 700px; margin: 0 auto; }
.settings-tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid var(--color-border); }
.settings-tab { padding: 10px 16px; background: none; border: none; color: var(--color-text-secondary); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: all var(--transition); font-family: var(--font-sans); font-size: 14px; }
.settings-tab.active, .settings-tab:hover {
    /* Der dunklere Grundton erreicht auf dem Seitenhintergrund nur 4,18:1.
       Die hellere Variante des Violetts liegt darueber. Die Unterstreichung
       darf den satten Ton behalten, sie traegt keinen Text. */
    color: var(--color-primary-text);
    border-bottom-color: var(--color-primary);
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.settings-form { background: var(--color-surface); border-radius: var(--radius-lg); padding: 24px; }
.avatar-upload, .banner-upload { display: flex; gap: 16px; align-items: center; }
.avatar-preview { width: 80px; height: 80px; border-radius: var(--radius-full); }
.banner-preview { width: 200px; height: 60px; border-radius: var(--radius-md); object-fit: cover; }
.social-links-inputs { display: flex; flex-direction: column; gap: 8px; }

/* ===== START STREAM ===== */
.start-stream-page { max-width: 800px; margin: 0 auto; }
.start-stream-page h1 { margin-bottom: 24px; }
.stream-active-banner { display: flex; align-items: center; justify-content: space-between; background: var(--color-success-light); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 16px; }
.stream-active-info { display: flex; align-items: center; gap: 12px; }

.stream-key-display { letter-spacing: 2px; }
.settings-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.settings-table th, .settings-table td { padding: 8px 12px; text-align: left; border: 1px solid var(--color-border); font-size: 13px; }
.settings-table th { background: var(--color-surface-2); font-weight: 600; }
.inline-form { display: inline; }

/* ===== ADMIN ===== */
.admin-page { max-width: 1200px; margin: 0 auto; }
.admin-tabs { display: flex; gap: 4px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 4px; }
.admin-tab { padding: 8px 14px; border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-secondary); font-weight: 600; font-size: 13px; white-space: nowrap; transition: all var(--transition); }
.admin-tab.active, .admin-tab:hover { background: var(--color-primary); color: white; }
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-form { background: var(--color-surface); border-radius: var(--radius-md); padding: 16px; margin-bottom: 16px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row input { flex: 1; min-width: 120px; }
.page-editor { width: 100%; min-height: 150px; font-family: var(--font-sans); margin-bottom: 8px; }

/* ===== CREATOR PAGE ===== */
.creator-page { max-width: 1200px; margin: 0 auto; }
.creator-page h1 { margin-bottom: 24px; }
.stream-health-card { }
.stream-health { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin: 16px 0; }
.health-item { background: var(--color-surface-2); border-radius: var(--radius-md); padding: 12px; text-align: center; }
.health-label { display: block; font-size: 11px; color: var(--color-text-muted); margin-bottom: 4px; }
.health-value { font-size: 16px; font-weight: 700; }
.health-value.live { color: var(--color-live); }
.health-value.ok { color: var(--color-success); }
.stream-health-actions { display: flex; gap: 8px; }

/* ===== LIVE PAGE ===== */
.live-page { max-width: 1400px; margin: 0 auto; }
.live-page h1 { margin-bottom: 16px; }
.category-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-filter { padding: 6px 14px; border-radius: var(--radius-full); background: var(--color-surface); color: var(--color-text-secondary); font-size: 13px; font-weight: 600; transition: all var(--transition); }
.cat-filter.active, .cat-filter:hover { background: var(--color-primary); color: white; }
.live-search { display: flex; gap: 8px; margin-bottom: 16px; }
.live-search .search-input { flex: 1; width: auto; border-radius: var(--radius-md); }
.filter-info { color: var(--color-text-muted); font-size: 13px; margin-bottom: 16px; }

/* ===== STATIC PAGE ===== */
.static-page { max-width: 800px; margin: 0 auto; }
.static-page h1 { margin-bottom: 24px; }
.static-content { background: var(--color-surface); border-radius: var(--radius-lg); padding: 24px; line-height: 1.8; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  margin-top: 40px;
  padding: 32px 16px 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
.footer-section h4 { font-size: 14px; margin-bottom: 12px; }
.footer-section a { display: block; padding: 4px 0; color: var(--color-text-secondary); font-size: 13px; }
.footer-section a:hover { color: var(--color-primary); }
.footer-section p { font-size: 13px; color: var(--color-text-muted); }
.footer-bottom { text-align: center; padding: 16px; margin-top: 24px; border-top: 1px solid var(--color-border); }
.footer-bottom p { font-size: 12px; color: var(--color-text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .watch-page { grid-template-columns: 1fr; }
  .watch-chat { position: relative; top: 0; height: 500px; }
  .watch-main { padding-right: 0; }
}

@media (max-width: 768px) {
  .mobile-menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    z-index: 999;
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-search { margin-left: 0; width: 100%; }
  .search-form { width: 100%; }
  .search-input { width: 100%; }
  .header-actions { gap: 4px; }
  .header-coins { font-size: 12px; padding: 4px 8px; }
  
  .stream-grid { grid-template-columns: 1fr; }
  .creator-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .coin-packages-grid { grid-template-columns: 1fr 1fr; }
  .messages-layout { grid-template-columns: 1fr; }
  .conversations-list { display: none; }
  .hero-section { padding: 32px 16px; }
  .hero-content h1 { font-size: 24px; }
  .hero-content p { font-size: 14px; }
  .profile-header { flex-direction: column; align-items: center; text-align: center; }
  .profile-info { padding-top: 0; }
  .profile-stats { justify-content: center; }
  .profile-actions { justify-content: center; padding-top: 0; }
  .admin-tabs { flex-wrap: wrap; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 6px 8px; }
}

@media (max-width: 480px) {
  .coin-packages-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .header-actions .header-icon { padding: 6px; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes giftFloat { 0% { opacity: 0; transform: translateY(0) scale(0.5); } 50% { opacity: 1; transform: translateY(-50px) scale(1.2); } 100% { opacity: 0; transform: translateY(-100px) scale(0.8); } }

.chat-message { animation: fadeIn 0.2s ease; }
.live-badge { animation: pulse 2s infinite; }

/* Gift animation overlay */
.gift-animation {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 48px;
  z-index: 9999;
  pointer-events: none;
  animation: giftFloat 2s ease-out forwards;
}

/* Blocked notice */
.blocked-notice {
  text-align: center;
  padding: 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

/* ===== Admin: Systemkarten ===== */
.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
}
.admin-card h3 { margin-bottom: 10px; font-size: 16px; }
.admin-card h4 { margin: 16px 0 8px; font-size: 14px; color: var(--color-text-secondary); }
.admin-card > p { color: var(--color-text-secondary); font-size: 14px; line-height: 1.55; margin-bottom: 14px; }
.admin-card .data-table { margin-top: 4px; }
.admin-card code {
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.migrate-log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}
.migrate-log li {
  padding: 5px 9px;
  margin-bottom: 4px;
  background: var(--color-surface-2);
  border-left: 3px solid var(--color-success);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  word-break: break-word;
}

/* ===== Hinweisboxen ===== */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-info);
  background: var(--color-info-light);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.alert-warning { border-left-color: var(--color-warning); background: var(--color-warning-light); }
.alert-error   { border-left-color: var(--color-error);   background: var(--color-error-light); }
.alert-success { border-left-color: var(--color-success); background: var(--color-success-light); }

/* ===== Konfigurationsbeispiele ===== */
.code-block {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 10px 0 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  overflow-x: auto;
  white-space: pre;
}

/* ===== Kästchen mit Beschriftung ===== */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--color-primary); }

/* ============================================================
   DESIGN-VERFEINERUNG
   ============================================================
   Zusaetzliche Gestaltungsmittel, die im ganzen Projekt genutzt
   werden: weichere Abstufungen, ruhigere Schatten und ein
   einheitlicher Akzentverlauf. Die bestehenden Farben bleiben
   erhalten, es kommen nur Hilfsgroessen dazu. */

:root {
    /* Abstufungen fuer Ecken und Schatten */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.34);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.46);

    /* Akzentverlauf der Marke */
    --gradient-brand: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-violet) 100%);
    --gradient-gold: linear-gradient(135deg, #ffd700 0%, #ffa726 100%);

    /* Einheitliche Bewegungsdauer */
    --motion-fast: 120ms;
    --motion-base: 200ms;
    --motion-slow: 320ms;
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Karten bekommen mehr Tiefe, ohne unruhig zu wirken */
.card {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--motion-base) var(--ease-out),
                border-color var(--motion-base) var(--ease-out);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Schaltflaechen: klarere Reaktion auf Maus und Tastatur */
.btn {
    border-radius: var(--radius-md);
    transition: transform var(--motion-fast) var(--ease-out),
                background-color var(--motion-fast) var(--ease-out),
                box-shadow var(--motion-fast) var(--ease-out),
                border-color var(--motion-fast) var(--ease-out);
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: var(--gradient-brand);
    border-color: transparent;
}

.btn-primary:hover {
    box-shadow: 0 6px 18px rgba(145, 71, 255, 0.36);
}

/* Sichtbarer Fokusrahmen fuer Tastaturbedienung */
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Kleine Schaltflaeche, an mehreren Stellen gebraucht */
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Hinweistext unter Eingabefeldern */
.form-hint {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-muted);
}

.form-hint code {
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    word-break: break-all;
}

/* Eingabefelder reagieren einheitlich */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="number"],
input[type="date"],
select,
textarea {
    border-radius: var(--radius-sm);
    transition: border-color var(--motion-fast) var(--ease-out),
                box-shadow var(--motion-fast) var(--ease-out);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(145, 71, 255, 0.18);
}

/* Bei Wunsch nach wenig Bewegung alles beruhigen */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   PRIVATE NACHRICHTEN
   ============================================================ */

.conversations-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.conversations-head h2 {
    margin: 0;
    font-size: 1.05rem;
}

.unread-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: var(--radius-pill);
    background: var(--gradient-brand);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.conv-hint {
    margin: 0;
    padding: 0.9rem 1.1rem;
    font-size: 0.86rem;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.messages-partner {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.partner-name {
    display: block;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.partner-name:hover {
    color: var(--color-primary);
}

.messages-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Trennlinie mit Datum im Gespraechsverlauf */
.message-date-separator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.1rem 0 0.6rem;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.message-date-separator::before,
.message-date-separator::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* Hinweis- und Sperrmeldungen im Nachrichtenbereich */
.message-notice {
    margin: 0.75rem 1rem;
    padding: 0.7rem 0.9rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
    background: var(--color-surface-2);
    color: var(--color-text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.message-blocked {
    margin: 0.75rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.55;
}

.message-char-count {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}

.message-char-count.is-near-limit {
    color: var(--color-warning);
}

.message-char-count.is-at-limit {
    color: var(--color-error);
    font-weight: 600;
}

.messages-empty {
    padding: 2.5rem 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.no-conversation-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--color-text-muted);
}

.no-conversation-icon {
    font-size: 2.6rem;
    line-height: 1;
    opacity: 0.55;
}

.no-conversation-inner h2 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text);
}

.no-conversation-inner p {
    margin: 0;
    max-width: 30rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================================
   GESCHENKE: UEBERSICHT, UNTERSTUETZER UND EINNAHMEN
   ============================================================ */

.gift-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.gift-summary-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
}

.gift-summary-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.gift-summary-label {
    font-size: 0.74rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Hinweis auf das zuletzt erhaltene Geschenk */
.gift-latest {
    margin: 0 0 0.9rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: rgba(255, 215, 0, 0.1);
    border-left: 3px solid var(--color-gold);
    color: var(--color-gold);
    font-size: 0.86rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity var(--motion-base) var(--ease-out),
                max-height var(--motion-base) var(--ease-out),
                padding var(--motion-base) var(--ease-out);
}

.gift-latest.is-visible {
    max-height: 5rem;
    padding: 0.6rem 0.8rem;
    opacity: 1;
}

.studio-subhead {
    margin: 0 0 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

/* Rangliste der Unterstuetzer */
.supporter-list {
    list-style: none;
    margin: 0 0 0.9rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.supporter-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    font-size: 0.88rem;
}

.supporter-item:hover {
    background: var(--color-surface-hover);
}

/* Die ersten drei Plaetze werden hervorgehoben */
.supporter-list > .supporter-item:nth-child(1) .supporter-coins {
    color: var(--color-gold);
}

.supporter-list > .supporter-item:nth-child(2) .supporter-coins,
.supporter-list > .supporter-item:nth-child(3) .supporter-coins {
    color: var(--color-text);
}

.supporter-rank {
    flex-shrink: 0;
    width: 1.45rem;
    height: 1.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.supporter-list > .supporter-item:nth-child(1) .supporter-rank {
    background: var(--gradient-gold);
    color: #1a1400;
}

.supporter-avatar {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    object-fit: cover;
}

.supporter-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
    text-decoration: none;
    font-weight: 600;
}

a.supporter-name:hover {
    color: var(--color-primary);
}

.supporter-meta {
    flex-shrink: 0;
    font-size: 0.76rem;
    color: var(--color-text-muted);
}

.supporter-coins {
    flex-shrink: 0;
    font-weight: 700;
    color: var(--color-text-secondary);
    font-variant-numeric: tabular-nums;
}

.supporter-coins::after {
    content: " 🪙";
    font-weight: 400;
}

.supporter-empty {
    padding: 0.9rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font-size: 0.86rem;
    line-height: 1.6;
    text-align: center;
    list-style: none;
}

.supporter-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.supporter-column h3 {
    margin: 0 0 0.7rem;
    font-size: 0.95rem;
}

.supporter-list-wide .supporter-item {
    padding: 0.55rem 0.75rem;
}

/* Einnahmen im Creator-Bereich */
.earnings-card {
    margin-bottom: 1.5rem;
}

.earnings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.earnings-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.earnings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.7rem;
}

.earnings-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
}

.earnings-item-main {
    background: var(--gradient-brand);
    border-color: transparent;
}

.earnings-item-main .earnings-value,
.earnings-item-main .earnings-label {
    color: #fff;
}

.earnings-item-main .earnings-label {
    opacity: 0.85;
}

.earnings-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
    font-variant-numeric: tabular-nums;
}

.earnings-label {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.earnings-note {
    margin: 1rem 0 0;
    font-size: 0.86rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

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

    .earnings-value {
        font-size: 1.25rem;
    }
}

/* ============================================================
   LESBARKEIT: KONTRASTE NACHGEBESSERT
   ============================================================
   Gemessen wurde jeder Text gegen seinen tatsaechlichen Untergrund.
   Mehrere Farben lagen unter dem empfohlenen Verhaeltnis von 4,5:1
   und waren auf dunklem Grund schwer zu lesen. Die Markenfarbe
   #9147ff bleibt fuer Flaechen und Schaltflaechen erhalten, fuer
   Schrift gibt es jetzt einen helleren Ton. */

:root {
    /* vorher #7a7a85 - nur 3,54:1 auf der hellsten Flaeche */
    --color-text-muted: #95959f;
    /* Hellerer Violettton, ausschliesslich fuer Schrift gedacht */
    --color-primary-text: #a970ff;
}

/* Titel und Namen in Karten sollen nicht die dunkle Markenfarbe
   ihres umgebenden Links erben, sondern normale Textfarbe haben. */
.stream-card-title,
.conv-name,
.channel-card-name,
.user-card-name {
    color: var(--color-text);
}

/* Violette Schrift durchgaengig im helleren Ton */
.nav-link.active,
.section-link,
.stream-card-streamer,
.streamer-name,
.stream-category,
.link-primary,
a.text-primary {
    color: var(--color-primary-text);
}

/* Schaltflaechen ohne eigene Schriftfarbe erben sonst die dunkle
   Standardfarbe des Browsers. */
button,
.emoji-btn,
.msg-mod-btn {
    color: inherit;
}

.emoji-btn {
    color: var(--color-text);
}

/* Zeitangaben im Chat waren zu blass */
.chat-time,
.conv-time,
.message-time {
    color: var(--color-text-muted);
}

/* Weitere Stellen, die die dunkle Markenfarbe als Schrift geerbt
   haben und dadurch schwer zu lesen waren. */
.category-name,
.creator-card-name,
.category-card .category-name,
.creator-card h3 {
    color: var(--color-text);
}

.stat-card a,
.earnings-card a,
.card > a:not(.btn) {
    color: var(--color-primary-text);
}

/* Der Live-Hinweis war als Schrift zu dunkel. Fuer Flaechen bleibt
   --color-live unveraendert, fuer Schrift gibt es einen helleren Ton. */
:root {
    --color-live-text: #ff6b66;
}

.health-value.live,
.text-live,
.status-live {
    color: var(--color-live-text);
}

/* Die eigene Sprechblase wird etwas dunkler hinterlegt, damit
   weisse Schrift und die kleine Zeitangabe klar lesbar sind
   (weiss auf #9147ff ergibt nur 4,62:1, auf #6f28d9 dagegen 7,04:1). */
.message-item.sent .message-bubble {
    background: #6f28d9;
    color: #ffffff;
}

/* Zeitangabe in der eigenen Sprechblase bleibt hell. */
.message-item.sent .message-bubble .message-time {
    color: #ffffff;
    opacity: 0.92;
}

.message-item.received .message-bubble .message-time {
    color: var(--color-text-muted);
    opacity: 1;
}

/* Alle Verweise, die nicht als Schaltflaeche gestaltet sind, nutzen
   den helleren Violettton. So bleibt kein Link unleserlich, auch in
   Bereichen, die hier nicht einzeln aufgefuehrt sind. */
a:not(.btn):not(.nav-link):not(.stream-card):not(.conversation-item):not(.category-card):not(.creator-card):not(.logo):not(.cat-filter):not(.tab):not(.pagination-link):not(.chip):not(.stat-link):not(.visitor-item) {
    color: var(--color-primary-text);
}

/* Elemente mit eigener Farbflaeche behalten weisse Schrift. */
.cat-filter.active,
.cat-filter:hover,
.tab.active,
.chip.active {
    color: #ffffff;
}

/* Kachelartige Verweise sind keine Textlinks und werden nicht unterstrichen. */
a:not(.btn):not(.stat-link):not(.visitor-item):not(.stream-card):not(.category-card):not(.creator-card):not(.conversation-item):hover {
    text-decoration: underline;
}

/* ============================================================
   KORREKTUR: KOPFZEILE AUF SCHMALEN BILDSCHIRMEN
   ============================================================
   Suchfeld, Schaltflaechen und Profilbild waren zusammen breiter
   als der Bildschirm, wodurch die Kopfzeile rechts ueber den Rand
   hinauslief. Auf schmalen Geraeten wird die Suche daher in eine
   eigene Zeile gestellt und alle Teile duerfen schrumpfen. */

.header-inner {
    min-width: 0;
    flex-wrap: wrap;
}

.header-inner > * {
    min-width: 0;
}

.header-actions {
    min-width: 0;
    flex-shrink: 1;
}

@media (max-width: 720px) {
    .header-inner {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }

    /* Die Suche nimmt eine eigene, volle Zeile ein. */
    .nav-search {
        order: 10;
        flex: 1 1 100%;
        margin-left: 0;
        width: 100%;
        position: static;
    }

    .nav-search .search-form {
        width: 100%;
    }

    .nav-search .search-input,
    .nav-search input[type="search"],
    .nav-search input[type="text"] {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .header-actions {
        margin-left: auto;
        gap: 0.35rem;
    }

    /* Die Navigationsliste darf waagerecht gescrollt werden, statt
       die Kopfzeile zu sprengen. */
    .nav-menu,
    .header-nav {
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu::-webkit-scrollbar,
    .header-nav::-webkit-scrollbar {
        display: none;
    }
}

/* Sicherheitsnetz: nichts darf die Seite waagerecht aufziehen. */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================================
   ABZEICHEN, FREIGESCHALTETE FUNKTIONEN UND PROFILFELDER
   ============================================================ */

/* Kleines Abzeichen neben einem Namen, im Chat und im Profiltitel */
.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--color-text);
    vertical-align: middle;
}

.badge-chip-titel {
    background: rgba(145, 71, 255, 0.16);
    border-color: rgba(145, 71, 255, 0.45);
    padding: 1px 6px;
    font-size: 0.95rem;
}

/* Das Abzeichen direkt hinter dem Namen einer Chatzeile */
.chat-badge {
    margin-left: 3px;
    font-size: 0.88em;
    vertical-align: baseline;
    cursor: help;
}

/* ---------- Kopfbereich der Abzeichenseite ---------- */
.badges-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    align-items: center;
    justify-content: space-between;
    padding: 28px;
    margin: 24px 0 32px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(145, 71, 255, 0.18), transparent 60%),
        var(--color-surface);
}

.badges-hero-text { flex: 1 1 340px; }

.badges-hero-text h1 {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 3.4vw, 2.1rem);
}

.badges-hero-text p {
    margin: 0;
    max-width: 62ch;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.badges-hero-stats {
    display: flex;
    flex: 0 1 320px;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

/* Ringförmige Fortschrittsanzeige, gezeichnet mit einem Kegelverlauf */
.badge-ring {
    --anteil: 0;
    position: relative;
    display: grid;
    place-content: center;
    width: 118px;
    height: 118px;
    flex: 0 0 auto;
    border-radius: 50%;
    text-align: center;
    background:
        conic-gradient(var(--color-primary) calc(var(--anteil) * 1%), var(--color-surface-2) 0);
}

.badge-ring::after {
    content: '';
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--color-surface);
}

.badge-ring-value,
.badge-ring-label {
    position: relative;
    z-index: 1;
    display: block;
}

.badge-ring-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

.badge-ring-label {
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.badges-hero-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.badges-hero-list strong { color: var(--color-text); }

.badges-hero-cta {
    display: flex;
    gap: 10px;
    margin: 0;
    flex-wrap: wrap;
}

.badges-neu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ---------- Abzeichenraster ---------- */
.badges-section { margin-bottom: 36px; }

.badges-section h2,
.features-section h2 {
    margin: 0 0 6px;
    font-size: 1.22rem;
}

.section-hint {
    margin: 0 0 18px;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
    gap: 14px;
}

.badge-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 18px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    text-align: center;
    transition: border-color var(--motion-fast) var(--ease-out),
                transform var(--motion-fast) var(--ease-out);
}

.badge-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-primary);
}

.badge-erreicht {
    border-color: rgba(145, 71, 255, 0.5);
    background: linear-gradient(180deg, rgba(145, 71, 255, 0.11), var(--color-surface) 62%);
}

/* Noch nicht erreichte Abzeichen bleiben erkennbar, wirken aber ruhiger */
.badge-offen .badge-card-icon {
    filter: grayscale(1);
    opacity: 0.55;
}

.badge-card-icon {
    font-size: 2.3rem;
    line-height: 1.1;
}

.badge-card-name {
    margin: 0;
    font-size: 0.97rem;
    font-weight: 700;
    color: var(--color-text);
}

.badge-card-text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.badge-card-state {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.badge-card-state-frei {
    color: var(--color-success);
    font-weight: 600;
}

.badge-card-featured {
    font-size: 0.74rem;
    color: var(--color-gold);
}

.badge-card-reward {
    margin-top: auto;
    font-size: 0.78rem;
    color: var(--color-gold);
}

.badge-card-progress,
.feature-progress {
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-2);
    overflow: hidden;
}

.badge-card-progress-bar,
.feature-progress-bar {
    height: 100%;
    min-width: 2px;
    border-radius: var(--radius-pill);
    background: var(--gradient-brand);
    transition: width var(--motion-slow) var(--ease-out);
}

/* ---------- Funktionskarten ---------- */
.features-section { margin-bottom: 38px; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.feature-card {
    display: flex;
    gap: 13px;
    padding: 17px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
}

.feature-frei {
    border-color: rgba(145, 71, 255, 0.45);
    background: linear-gradient(180deg, rgba(145, 71, 255, 0.09), var(--color-surface) 70%);
}

.feature-icon {
    font-size: 1.55rem;
    line-height: 1.2;
    flex: 0 0 auto;
}

.feature-gesperrt .feature-icon {
    filter: grayscale(1);
    opacity: 0.6;
}

.feature-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.feature-body h3,
.feature-body h4 {
    margin: 0;
    font-size: 0.97rem;
    color: var(--color-text);
}

.feature-body p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.feature-state {
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.feature-state-frei {
    color: var(--color-success);
    font-weight: 600;
}

.feature-missing {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

/* ---------- Vitrine in den Einstellungen ---------- */
.unlock-summary {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 17px 19px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
}

.unlock-count {
    display: grid;
    place-content: center;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-size: 1.28rem;
    font-weight: 700;
}

.unlock-summary strong {
    display: block;
    color: var(--color-text);
}

.unlock-summary p {
    margin: 3px 0 0;
    font-size: 0.86rem;
    color: var(--color-text-secondary);
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.showcase-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 13px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--motion-fast) var(--ease-out);
}

.showcase-item:hover { border-color: var(--color-primary); }

.showcase-aktiv {
    border-color: var(--color-primary);
    background: rgba(145, 71, 255, 0.12);
}

.showcase-icon { font-size: 1.7rem; }

.showcase-name {
    font-size: 0.79rem;
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
}

/* Gesperrte Felder klar als solche zeigen */
.lock-hint {
    margin-left: 7px;
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--color-text-muted);
}

.form-section-title {
    margin: 30px 0 14px;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    font-size: 1.02rem;
    color: var(--color-text);
}

.color-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-field input[type="color"] {
    /* Eine allgemeinere Regel fuer Eingabefelder streckt Felder auf die volle
       Breite. Die Farbwahl bleibt deshalb ausdruecklich schmal. */
    flex: 0 0 52px;
    width: 52px;
    max-width: 52px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    cursor: pointer;
}

.color-field input[type="color"]:disabled { cursor: not-allowed; opacity: 0.5; }

.color-value {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

/* ---------- Neue Profilbereiche ---------- */
.profile-page { --profil-akzent: var(--color-primary); }

.profile-pronomen {
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: var(--radius-pill);
    background: var(--color-surface-2);
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}

.profile-status {
    margin: 8px 0 0;
    padding-left: 11px;
    border-left: 3px solid var(--profil-akzent);
    font-size: 0.94rem;
    font-style: normal;
    color: var(--color-text);
}

.profile-meta,
.profile-interessen {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.profile-meta {
    font-size: 0.86rem;
    color: var(--color-text-secondary);
}

.profile-meta a { color: var(--color-primary-text); }

.profile-interessen .chip {
    padding: 3px 11px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: var(--color-surface-2);
    font-size: 0.79rem;
    color: var(--color-text-secondary);
}

.profile-sendeplan {
    margin: 0;
    padding: 15px 17px;
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--profil-akzent);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    line-height: 1.65;
    color: var(--color-text-secondary);
}

.stat-link { text-decoration: none; }

/* Abzeichenwand im Profil */
.badge-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 11px;
}

.badge-wall-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 13px 9px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    text-align: center;
    cursor: help;
}

.badge-wall-featured {
    border-color: var(--profil-akzent);
    background: linear-gradient(180deg, rgba(145, 71, 255, 0.13), var(--color-surface) 70%);
}

.badge-wall-icon { font-size: 1.65rem; }

.badge-wall-name {
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    overflow-wrap: anywhere;
}

/* Besucherreihe */
.visitor-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.visitor-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 82px;
    text-decoration: none;
}

.visitor-item img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
    transition: border-color var(--motion-fast) var(--ease-out);
}

.visitor-item:hover img { border-color: var(--profil-akzent); }

.visitor-name {
    font-size: 0.74rem;
    color: var(--color-text-secondary);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

@media (max-width: 640px) {
    .badges-hero { padding: 20px; gap: 22px; }
    .badges-hero-stats { flex: 1 1 100%; }
    .badge-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .feature-grid { grid-template-columns: 1fr; }
    .badge-wall { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); }
}

/* Der Abzeichen-Zaehler im Profil ist ein Verweis, soll aber wie die
   uebrigen Zahlen aussehen. */
.stat-link .stat-value { color: var(--color-text); }
.stat-link:hover .stat-value { color: var(--color-primary-text); }

/* KORREKTUR: Knöpfe im Profilkopf
   .profile-header ist ein Flex-Container ohne align-items, dadurch wurde der
   Knopfbereich auf die volle Höhe gestreckt und die Knöpfe wurden zu hohen
   Blöcken. Sie richten sich jetzt oben aus und behalten ihre Höhe. */
.profile-actions {
    align-items: flex-start;
    align-self: flex-start;
    margin-left: auto;
}

.profile-info { flex: 1 1 320px; min-width: 0; }

@media (max-width: 720px) {
    .profile-actions {
        margin-left: 0;
        padding-top: 0;
        width: 100%;
    }
}
