/* ============================================================
 * CekaTFT — Pro-Stream Platform Global Stylesheet
 * Path: /assets/css/style.css
 * Version: 2.0 — Ultra Enhanced Edition
 * Design: Dark Neon Glassmorphism | TikTok-Inspired | Mobile-First
 * Features: Glassmorphism, Animations, Custom Scrollbars,
 *           Tooltips, Badges, Overlays, Responsive Grid,
 *           Sidebar Nav, Top Bar, Gift Modals, Emote Picker,
 *           Viewer Count, Stream Stats, Gift Animations,
 *           Pinned Messages, Moderator Tags, VIP Badges,
 *           Skeleton Loaders, Toast Notifications + More
 * ============================================================ */

/* ============================================================
 * 1. CSS CUSTOM PROPERTIES (Design Tokens)
 * ============================================================ */

:root {
  /* Brand Colors */
  --primary:         #ff0050;
  --primary-glow:    rgba(255, 0, 80, 0.35);
  --primary-soft:    rgba(255, 0, 80, 0.15);
  --secondary:       #00f2ea;
  --secondary-glow:  rgba(0, 242, 234, 0.3);
  --secondary-soft:  rgba(0, 242, 234, 0.12);
  --accent-gold:     #ffd700;
  --accent-purple:   #a855f7;
  --accent-blue:     #3b82f6;
  --accent-green:    #22c55e;
  --accent-orange:   #f97316;

  /* Backgrounds */
  --bg-base:         #070709;
  --bg-dark:         #0a0a0f;
  --bg-mid:          #0f0f17;
  --bg-surface:      #14141e;
  --bg-elevated:     #1a1a26;
  --bg-hover:        #1f1f2e;

  /* Glass & Borders */
  --glass-bg:        rgba(255, 255, 255, 0.06);
  --glass-bg-hover:  rgba(255, 255, 255, 0.1);
  --glass-border:    rgba(255, 255, 255, 0.09);
  --glass-border-active: rgba(255, 255, 255, 0.2);
  --glass-blur:      blur(16px) saturate(180%);

  /* Text */
  --text-primary:    #f0f0f8;
  --text-secondary:  #b8b8cc;
  --text-muted:      #6b6b80;
  --text-disabled:   #404050;

  /* Sidebar */
  --sidebar-width:   72px;
  --sidebar-bg:      rgba(7, 7, 9, 0.98);

  /* Chat */
  --chat-width:      340px;
  --chat-bg:         rgba(10, 10, 15, 0.97);

  /* Top Bar */
  --topbar-height:   56px;
  --topbar-bg:       rgba(10, 10, 15, 0.95);

  /* Shadows */
  --shadow-sm:       0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:       0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:       0 12px 40px rgba(0,0,0,0.65);
  --shadow-glow-red: 0 0 20px rgba(255, 0, 80, 0.4), 0 0 40px rgba(255, 0, 80, 0.15);
  --shadow-glow-cyan:0 0 20px rgba(0, 242, 234, 0.35), 0 0 40px rgba(0, 242, 234, 0.12);

  /* Radii */
  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-pill:999px;

  /* Transitions */
  --ease-fast:   0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-slow:   0.55s cubic-bezier(0.22, 1, 0.36, 1);
  --ease-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-base:    0;
  --z-overlay: 10;
  --z-modal:   100;
  --z-toast:   200;
  --z-topbar:  50;

  /* Typography */
  --font-display: 'Syne', 'Outfit', system-ui, sans-serif;
  --font-body:    'DM Sans', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================================
 * 2. RESET & BASE
 * ============================================================ */

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow: hidden;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: var(--font-body);
}

::selection {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
 * 3. SCROLLBARS (Global Custom)
 * ============================================================ */

::-webkit-scrollbar        { width: 4px; height: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--glass-border); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }
* { scrollbar-width: thin; scrollbar-color: var(--glass-border) transparent; }

/* ============================================================
 * 4. TOP BAR
 * ============================================================ */

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--topbar-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: var(--z-topbar);
  gap: 16px;
}

.top-bar__logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

.top-bar__search {
  flex: 1;
  max-width: 440px;
  position: relative;
}

.top-bar__search input {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  padding: 8px 16px 8px 40px;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: var(--ease-normal);
}

.top-bar__search input::placeholder { color: var(--text-muted); }

.top-bar__search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-glow-red);
  background: var(--glass-bg-hover);
}

.top-bar__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

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

.top-bar__btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--ease-fast);
  position: relative;
}

.top-bar__btn:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-active);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.top-bar__btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--bg-dark);
  animation: pulse-dot 2s infinite;
}

.top-bar__avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  border: 2px solid transparent;
  background-clip: padding-box;
  overflow: hidden;
  cursor: pointer;
  transition: var(--ease-fast);
  flex-shrink: 0;
}

.top-bar__avatar:hover {
  box-shadow: var(--shadow-glow-red);
  transform: scale(1.05);
}

/* ============================================================
 * 5. MAIN LAYOUT (Grid)
 * ============================================================ */

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding-top: var(--topbar-height);
}

.main-container {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--chat-width);
  flex: 1;
  overflow: hidden;
  height: calc(100dvh - var(--topbar-height));
}

/* ============================================================
 * 6. SIDEBAR NAVIGATION
 * ============================================================ */

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
  overflow: hidden;
  z-index: 10;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  width: 100%;
  padding: 0 8px;
}

.sidebar__item {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--ease-normal);
  position: relative;
}

.sidebar__item:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

.sidebar__item.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(255,0,80,0.3);
}

.sidebar__item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--primary);
  border-radius: 0 var(--radius-pill) var(--radius-pill) 0;
}

/* Sidebar Tooltip */
.sidebar__item::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-fast);
  box-shadow: var(--shadow-md);
  z-index: 99;
}

.sidebar__item:hover::after {
  opacity: 1;
}

.sidebar__item .notif-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--sidebar-bg);
}

.sidebar__divider {
  width: 32px;
  height: 1px;
  background: var(--glass-border);
  margin: 6px auto;
}

.sidebar__streamer-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--ease-normal);
  flex-shrink: 0;
}

.sidebar__streamer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar__streamer-avatar.is-live::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary);
  animation: live-ring 2.5s ease-in-out infinite;
}

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 10px 8px;
  width: 100%;
}

/* ============================================================
 * 7. VIDEO PLAYER SECTION
 * ============================================================ */

.video-wrapper {
  position: relative;
  background: #000;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-container {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Gradient vignette */
.video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,   rgba(0,0,0,0.7) 0%, transparent 35%),
    linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, transparent 25%),
    linear-gradient(to right,  rgba(0,0,0,0.25) 0%, transparent 20%),
    linear-gradient(to left,   rgba(0,0,0,0.25) 0%, transparent 20%);
  pointer-events: none;
  z-index: 1;
}

/* ============================================================
 * 8. STREAM OVERLAYS (HUD Elements)
 * ============================================================ */

/* LIVE Badge */
.live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 2px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  text-transform: uppercase;
  animation: pulse-live 2s infinite;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: var(--shadow-glow-red);
}

.live-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.2s steps(1) infinite;
}

/* Viewer Count */
.viewer-count {
  position: absolute;
  top: 16px;
  left: 75px;
  z-index: 5;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--glass-border);
}

.viewer-count__icon {
  color: var(--secondary);
  font-size: 0.8rem;
}

/* Stream Info (Bottom Left) */
.stream-info {
  position: absolute;
  bottom: 24px;
  left: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 55%;
}

.stream-info__streamer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stream-info__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow-red);
}

.stream-info__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-info__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}

.stream-info__title {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.stream-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.stream-tag {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  border: 1px solid var(--glass-border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  color: var(--secondary);
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Action Buttons (Right Side) */
.stream-overlay {
  position: absolute;
  bottom: 24px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  z-index: 5;
}

.action-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: var(--ease-bounce);
  position: relative;
  gap: 1px;
  font-size: 1.2rem;
}

.action-btn__count {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  line-height: 1;
}

.action-btn:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--glass-border-active);
}

.action-btn:active {
  transform: scale(0.95);
  transition: var(--ease-fast);
}

.action-btn.heart:hover       { background: rgba(255, 45, 85, 0.7); border-color: rgba(255,45,85,0.5); box-shadow: 0 0 18px rgba(255,45,85,0.5); }
.action-btn.heart.liked       { color: #ff2d55; animation: heart-pop var(--ease-bounce) both; }
.action-btn.share:hover       { background: rgba(0, 122, 255, 0.6); border-color: rgba(0,122,255,0.4); box-shadow: 0 0 18px rgba(0,122,255,0.4); }
.action-btn.gift:hover        { background: rgba(255, 215, 0, 0.25); border-color: rgba(255,215,0,0.4); box-shadow: 0 0 18px rgba(255,215,0,0.35); color: var(--accent-gold); }
.action-btn.follow:hover      { background: rgba(168, 85, 247, 0.6); border-color: rgba(168,85,247,0.4); box-shadow: 0 0 18px rgba(168,85,247,0.4); }
.action-btn.comment:hover     { background: rgba(0, 242, 234, 0.25); border-color: rgba(0,242,234,0.4); box-shadow: var(--shadow-glow-cyan); }

/* Player Controls Bar */
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity var(--ease-normal);
}

.video-wrapper:hover .player-controls {
  opacity: 1;
}

.progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-pill);
  overflow: hidden;
  cursor: pointer;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-pill);
  width: 100%;
}

.player-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  border-radius: var(--radius-xs);
  transition: var(--ease-fast);
  cursor: pointer;
  background: none;
  border: none;
}

.player-btn:hover {
  color: #fff;
  background: var(--glass-bg);
}

/* Quality Badge */
.quality-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--secondary);
  letter-spacing: 1px;
  font-family: var(--font-mono);
}

/* ============================================================
 * 9. FLOATING GIFT ANIMATIONS
 * ============================================================ */

.floating-gifts {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.gift-float {
  position: absolute;
  bottom: 0;
  font-size: 1.6rem;
  animation: float-up 3s ease-out forwards;
  opacity: 0;
}

@keyframes float-up {
  0%   { opacity: 0; transform: translateY(0) scale(0.8) rotate(-10deg); }
  15%  { opacity: 1; transform: translateY(-20px) scale(1.1) rotate(5deg); }
  50%  { opacity: 0.9; transform: translateY(-50vh) scale(1) rotate(-5deg); }
  100% { opacity: 0; transform: translateY(-95vh) scale(0.7) rotate(10deg); }
}

/* ============================================================
 * 10. CHAT PANEL
 * ============================================================ */

.chat-container {
  background: var(--chat-bg);
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Chat Header */
.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  background: rgba(10,10,15,0.98);
}

.chat-header__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-header__title span.chat-count {
  font-size: 0.72rem;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-family: var(--font-body);
}

.chat-header__tabs {
  display: flex;
  gap: 4px;
}

.chat-tab {
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--ease-fast);
  background: none;
  border: none;
}

.chat-tab:hover { color: var(--text-primary); background: var(--glass-bg); }
.chat-tab.active { color: var(--primary); background: var(--primary-soft); }

.chat-header__actions {
  display: flex;
  gap: 6px;
}

.chat-header__btn {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--ease-fast);
  background: none;
  border: none;
}

.chat-header__btn:hover {
  background: var(--glass-bg);
  color: var(--text-primary);
}

/* Pinned Message */
.pinned-message {
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,0,80,0.1), rgba(0,242,234,0.06));
  border-bottom: 1px solid var(--glass-border);
  border-left: 3px solid var(--primary);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

.pinned-message__icon {
  color: var(--primary);
  font-size: 0.75rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.pinned-message__text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pinned-message__close {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--ease-fast);
  padding: 0 2px;
  background: none;
  border: none;
}

.pinned-message__close:hover { color: var(--text-primary); }

/* Messages List */
.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overscroll-behavior: contain;
}

/* Individual Message */
.message-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.845rem;
  line-height: 1.5;
  transition: background var(--ease-fast);
  word-break: break-word;
  position: relative;
}

.message-item:hover {
  background: var(--glass-bg);
}

.message-item.new {
  animation: msg-in 0.3s var(--ease-bounce) both;
}

.message-item.highlighted {
  background: rgba(255,215,0,0.07);
  border-left: 2px solid var(--accent-gold);
  padding-left: 8px;
}

.message-item.deleted {
  opacity: 0.35;
  text-decoration: line-through;
  pointer-events: none;
}

/* Username + Badges */
.message-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2px;
}

.username {
  font-weight: 700;
  font-size: 0.825rem;
  cursor: pointer;
  transition: var(--ease-fast);
  white-space: nowrap;
}

.username:hover { opacity: 0.8; text-decoration: underline; }

/* Username Colors by role */
.username.owner      { color: var(--primary); }
.username.moderator  { color: var(--accent-blue); }
.username.vip        { color: var(--accent-gold); }
.username.subscriber { color: var(--accent-purple); }
.username.regular    { color: var(--secondary); }

/* User Badges */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
  vertical-align: middle;
}

.badge-pill.mod    { background: rgba(59,130,246,0.2); color: var(--accent-blue); border: 1px solid rgba(59,130,246,0.3); }
.badge-pill.vip    { background: rgba(255,215,0,0.15); color: var(--accent-gold); border: 1px solid rgba(255,215,0,0.3); }
.badge-pill.sub    { background: rgba(168,85,247,0.18); color: var(--accent-purple); border: 1px solid rgba(168,85,247,0.3); }
.badge-pill.new    { background: rgba(34,197,94,0.15); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.3); }
.badge-pill.owner  { background: rgba(255,0,80,0.18); color: var(--primary); border: 1px solid rgba(255,0,80,0.3); }
.badge-pill.gift   { background: rgba(249,115,22,0.18); color: var(--accent-orange); border: 1px solid rgba(249,115,22,0.3); }

/* Message Text */
.message-text {
  color: var(--text-secondary);
  font-size: 0.845rem;
}

.message-text .emote {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin: 0 1px;
  border-radius: 3px;
}

.message-text .mention {
  color: var(--secondary);
  font-weight: 600;
  cursor: pointer;
}

.message-text .link {
  color: var(--accent-blue);
  text-decoration: underline;
  cursor: pointer;
}

/* Message Timestamp */
.message-time {
  font-size: 0.65rem;
  color: var(--text-disabled);
  margin-left: 4px;
  vertical-align: bottom;
}

/* Message Action Bar (on hover) */
.message-actions {
  position: absolute;
  right: 8px;
  top: 6px;
  display: none;
  gap: 3px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 3px 5px;
  box-shadow: var(--shadow-sm);
}

.message-item:hover .message-actions {
  display: flex;
}

.msg-action-btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xs);
  font-size: 0.7rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--ease-fast);
  background: none;
  border: none;
}

.msg-action-btn:hover { background: var(--glass-bg); color: var(--text-primary); }
.msg-action-btn.ban:hover { color: var(--primary); }

/* System Messages */
.message-item.system {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 4px;
  background: none;
}

.message-item.system:hover { background: none; }

/* Gift Message */
.message-item.gift-msg {
  background: linear-gradient(135deg, rgba(255,215,0,0.07), rgba(249,115,22,0.05));
  border: 1px solid rgba(255,215,0,0.15);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  animation: gift-slide 0.4s var(--ease-bounce) both;
}

.gift-msg__inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gift-msg__emoji {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.gift-msg__info { flex: 1; }

.gift-msg__who {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.gift-msg__what {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent-gold);
}

.gift-msg__amount {
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-weight: 600;
}

/* ============================================================
 * 11. CHAT INPUT AREA
 * ============================================================ */

.chat-input-area {
  padding: 12px 12px 16px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
  background: rgba(10,10,15,0.98);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Quick Reactions */
.quick-reactions {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.quick-reactions::-webkit-scrollbar { height: 0; }

.quick-reaction {
  flex-shrink: 0;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--ease-bounce);
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  border: none;
  background: none;
  line-height: 1;
}

.quick-reaction:hover {
  transform: scale(1.3) translateY(-3px);
}

/* Input Wrapper */
.input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 8px 10px 8px 16px;
  transition: var(--ease-normal);
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft), var(--shadow-glow-red);
  background: var(--glass-bg-hover);
}

.chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
  min-width: 0;
}

.chat-input::placeholder { color: var(--text-muted); }

.chat-input-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--ease-fast);
  cursor: pointer;
  flex-shrink: 0;
  background: none;
  border: none;
}

.chat-input-btn:hover { color: var(--text-primary); background: var(--glass-bg); }

.chat-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--ease-bounce);
  flex-shrink: 0;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px var(--primary-glow);
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow-red);
}

.chat-send-btn:active {
  transform: scale(0.92);
  transition: var(--ease-fast);
}

/* Char counter */
.chat-char-count {
  text-align: right;
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chat-char-count.warning { color: var(--accent-orange); }
.chat-char-count.danger  { color: var(--primary); }

/* ============================================================
 * 12. EMOTE PICKER
 * ============================================================ */

.emote-picker {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  width: 280px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: var(--z-modal);
  display: none;
}

.emote-picker.open { display: block; animation: scale-in var(--ease-bounce) both; }

.emote-picker__header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  gap: 4px;
}

.emote-tab {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--ease-fast);
  background: none;
  border: none;
}

.emote-tab:hover  { background: var(--glass-bg); color: var(--text-primary); }
.emote-tab.active { background: var(--primary-soft); color: var(--primary); }

.emote-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.emote-item {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--ease-fast);
  border: none;
  background: none;
}

.emote-item:hover {
  background: var(--glass-bg);
  transform: scale(1.2);
}

/* ============================================================
 * 13. GIFT MODAL
 * ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-normal);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.gift-modal {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px;
  transform: translateY(100%);
  transition: transform var(--ease-slow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-overlay.open .gift-modal {
  transform: translateY(0);
}

.gift-modal__handle {
  width: 40px;
  height: 4px;
  background: var(--glass-border);
  border-radius: var(--radius-pill);
  margin: -12px auto 4px;
}

.gift-modal__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gift-item {
  background: var(--glass-bg);
  border: 1.5px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--ease-bounce);
}

.gift-item:hover {
  border-color: var(--accent-gold);
  background: rgba(255,215,0,0.08);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255,215,0,0.15);
}

.gift-item.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.gift-item__emoji { font-size: 1.8rem; }

.gift-item__name {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.gift-item__price {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 2px;
}

.gift-modal__footer {
  display: flex;
  gap: 10px;
}

.btn-primary {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), #ff3370);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--ease-bounce);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-red);
}

.btn-primary:active { transform: translateY(0); transition: var(--ease-fast); }

.btn-secondary {
  padding: 12px 20px;
  background: var(--glass-bg);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--ease-fast);
}

.btn-secondary:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-active);
  color: var(--text-primary);
}

/* ============================================================
 * 14. STREAM STATS PANEL
 * ============================================================ */

.stats-panel {
  display: flex;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--glass-border);
  overflow-x: auto;
  flex-shrink: 0;
}

.stats-panel::-webkit-scrollbar { height: 0; }

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex-shrink: 0;
  min-width: 72px;
  transition: var(--ease-fast);
  cursor: default;
}

.stat-item:hover {
  background: var(--glass-bg-hover);
  border-color: var(--glass-border-active);
}

.stat-item__value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-item__value.up   { color: var(--accent-green); }
.stat-item__value.down { color: var(--primary); }
.stat-item__value.gold { color: var(--accent-gold); }

.stat-item__label {
  font-size: 0.64rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  white-space: nowrap;
}

/* ============================================================
 * 15. TOAST NOTIFICATIONS
 * ============================================================ */

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 11px 18px;
  font-size: 0.845rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 360px;
  animation: toast-in 0.35s var(--ease-bounce) both, toast-out 0.3s 2.7s ease-in forwards;
  pointer-events: all;
}

.toast.success { border-color: rgba(34,197,94,0.35); }
.toast.error   { border-color: rgba(255,0,80,0.35); }
.toast.info    { border-color: rgba(59,130,246,0.35); }
.toast.gift    { border-color: rgba(255,215,0,0.35); }

.toast__icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast.success .toast__icon { color: var(--accent-green); }
.toast.error   .toast__icon { color: var(--primary); }
.toast.info    .toast__icon { color: var(--accent-blue); }
.toast.gift    .toast__icon { color: var(--accent-gold); }

/* ============================================================
 * 16. SKELETON LOADERS
 * ============================================================ */

@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: var(--radius-sm);
}

.skeleton-text    { height: 12px; width: 100%; }
.skeleton-text.sm { width: 60%; }
.skeleton-text.xs { width: 40%; }
.skeleton-avatar  { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; }
.skeleton-thumb   { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-md); }

.skeleton-message {
  display: flex;
  gap: 8px;
  padding: 8px;
  align-items: flex-start;
}

/* ============================================================
 * 17. USER PROFILE POPUP
 * ============================================================ */

.user-popup {
  position: absolute;
  width: 230px;
  background: var(--bg-elevated);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-modal);
  overflow: hidden;
  display: none;
}

.user-popup.open {
  display: block;
  animation: scale-in var(--ease-bounce) both;
}

.user-popup__banner {
  height: 70px;
  background: linear-gradient(135deg, var(--primary-glow), var(--secondary-glow));
  position: relative;
}

.user-popup__avatar {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 3px solid var(--bg-elevated);
  overflow: hidden;
  position: absolute;
  bottom: -20px;
  left: 14px;
  box-shadow: var(--shadow-md);
}

.user-popup__body {
  padding: 26px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-popup__name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.user-popup__stats {
  display: flex;
  gap: 12px;
}

.user-popup__stat {
  text-align: center;
  flex: 1;
}

.user-popup__stat strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-popup__stat span {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-popup__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.user-popup__action-btn {
  flex: 1;
  padding: 7px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--ease-fast);
  text-align: center;
  white-space: nowrap;
  border: none;
}

.user-popup__action-btn.follow {
  background: var(--primary);
  color: #fff;
}
.user-popup__action-btn.follow:hover { opacity: 0.85; }

.user-popup__action-btn.gift {
  background: var(--glass-bg);
  color: var(--accent-gold);
  border: 1px solid rgba(255,215,0,0.25);
}
.user-popup__action-btn.gift:hover { background: rgba(255,215,0,0.1); }

/* ============================================================
 * 18. RESPONSIVE BREAKPOINTS
 * ============================================================ */

/* Tablet */
@media (max-width: 1200px) {
  :root {
    --chat-width: 300px;
  }
}

/* Tablet - Hide chat by default */
@media (max-width: 1024px) {
  .main-container {
    grid-template-columns: var(--sidebar-width) 1fr 0;
  }

  .chat-container {
    position: fixed;
    right: 0;
    top: var(--topbar-height);
    bottom: 0;
    width: min(340px, 90vw);
    transform: translateX(100%);
    transition: transform var(--ease-slow);
    z-index: 80;
  }

  .chat-container.open {
    transform: translateX(0);
    box-shadow: -8px 0 30px rgba(0,0,0,0.5);
  }

  .chat-toggle-btn {
    display: flex;
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --topbar-height: 50px;
  }

  .main-container {
    grid-template-columns: 0 1fr 0;
  }

  .sidebar {
    width: 0;
    border: none;
    overflow: hidden;
  }

  .top-bar__search { display: none; }

  .stream-overlay {
    gap: 10px;
    bottom: 16px;
  }

  .action-btn {
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }

  .stream-info__title { max-width: 200px; }

  .gift-grid { grid-template-columns: repeat(3, 1fr); }

  .stats-panel { padding: 6px 10px; }
}

/* Very small screens */
@media (max-width: 380px) {
  .action-btn { width: 40px; height: 40px; }
  .stream-info__name { font-size: 0.85rem; }
  .gift-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

/* Large screens */
@media (min-width: 1600px) {
  :root {
    --chat-width: 380px;
  }
}

/* ============================================================
 * 19. KEYFRAME ANIMATIONS
 * ============================================================ */

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,0,80,0.7); }
  50%       { box-shadow: 0 0 0 10px rgba(255,0,80,0); }
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.4); opacity: 0.7; }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

@keyframes live-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,0,80,0.6); }
  50%       { box-shadow: 0 0 0 6px rgba(255,0,80,0); }
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gift-slide {
  from { opacity: 0; transform: translateX(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes heart-pop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.4); }
  70%  { transform: scale(0.88); }
  100% { transform: scale(1); }
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
 * 20. UTILITY CLASSES
 * ============================================================ */

/* Flex */
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* Text */
.text-xs      { font-size: 0.7rem; }
.text-sm      { font-size: 0.85rem; }
.text-base    { font-size: 1rem; }
.text-muted   { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-cyan    { color: var(--secondary); }
.text-gold    { color: var(--accent-gold); }
.font-bold    { font-weight: 700; }
.font-display { font-family: var(--font-display); }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Spacing */
.p-0 { padding: 0; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }

/* Visibility */
.hidden         { display: none !important; }
.sr-only        { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* States */
.is-loading     { pointer-events: none; opacity: 0.6; }
.is-disabled    { pointer-events: none; opacity: 0.4; cursor: not-allowed; }
.no-select      { user-select: none; -webkit-user-select: none; }

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--glass-border);
  width: 100%;
}

/* ============================================================
 * 21. DARK MODE ADJUSTMENTS (Already dark, subtle overrides)
 * ============================================================ */

@media (prefers-color-scheme: light) {
  /* Intentionally kept dark — platform is dark-native */
  :root {
    color-scheme: dark;
  }
}

/* ============================================================
 * 22. REDUCED MOTION
 * ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
 * END OF STYLESHEET — CekaTFT Pro-Stream v2.0
 * ============================================================ */
