/* =====================================================
   MatrixMedia Mobile Demo -- Preview Stylesheet
   ===================================================== */

:root {
  /* Brand tokens (matches mm-dashboard) */
  --mm-primary: #5b5fc7;
  --mm-primary-hover: #4c50b3;
  --mm-bg: #0b0d12;
  --mm-panel: #141821;
  --mm-panel-2: #1b212d;
  --mm-border: #262c3a;
  --mm-border-strong: #353d4f;
  --mm-text: #e7ebf2;
  --mm-text-muted: #8b93a7;
  --mm-text-subtle: #5b6275;

  /* iOS palette */
  --ios-blue: #007AFF;
  --ios-green: #34C759;
  --ios-red: #FF3B30;
  --ios-bg: #000;
  --ios-grouped-bg: #000;
  --ios-card: #1C1C1E;
  --ios-card-2: #2C2C2E;
  --ios-text: #ffffff;
  --ios-secondary: #8E8E93;
  --ios-separator: #38383A;

  /* Android (Material 3) palette */
  --android-primary: #BB86FC;
  --android-primary-hover: #cda0ff;
  --android-bg: #121212;
  --android-surface: #1E1E1E;
  --android-surface-2: #2A2A2A;
  --android-text: #E1E1E1;
  --android-secondary: #A0A0A0;
  --android-border: #333;
  --android-error: #CF6679;

  /* Donation tier colors (matches mm-payment) */
  --tier-blue: #1E88E5;
  --tier-green: #43A047;
  --tier-yellow: #FDD835;
  --tier-orange: #FB8C00;
  --tier-magenta: #E91E63;
  --tier-red: #E53935;
  --tier-gold: #FFD700;

  /* Shared */
  --live-red: #ff3344;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
}

/* =====================================================
   Base
   ===================================================== */

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
               "Helvetica Neue", Arial, sans-serif;
  background: var(--mm-bg);
  color: var(--mm-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p {
  margin: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* =====================================================
   Demo banner
   ===================================================== */

.demo-banner {
  background: linear-gradient(90deg, #3a2e0a, #4a3812);
  border-bottom: 1px solid #6b5a20;
  color: #ffd87a;
  text-align: center;
  font-size: 13px;
  padding: 8px 16px;
}
.demo-banner strong {
  color: #ffe7a0;
  margin-right: 8px;
}

/* =====================================================
   Header
   ===================================================== */

.app-header {
  background: var(--mm-panel);
  border-bottom: 1px solid var(--mm-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--mm-primary), #9b4dff);
  box-shadow: 0 0 12px rgba(91, 95, 199, 0.5);
}

.app-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.platform-toggle {
  display: inline-flex;
  background: var(--mm-panel-2);
  border: 1px solid var(--mm-border);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

.platform-btn {
  background: transparent;
  border: none;
  color: var(--mm-text-muted);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 7px;
  transition: all 0.15s ease;
}

.platform-btn:hover {
  color: var(--mm-text);
}

.platform-btn.active {
  background: var(--mm-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* =====================================================
   Main layout
   ===================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 32px;
  min-height: calc(100vh - 130px);
}

.phones-area {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

/* Phone wrapper */
.phone-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone-wrapper.hidden-phone {
  display: none;
}

.phone-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--mm-text-muted);
}

/* =====================================================
   Phone frame
   ===================================================== */

.phone-frame {
  position: relative;
  width: 280px;
  height: 580px;
  background: #000;
  border-radius: 44px;
  padding: 10px;
  box-shadow:
    0 0 0 2px #2a2a2a,
    0 0 0 4px #000,
    var(--shadow-lg);
}

.phone-notch {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: #000;
  border-radius: 14px;
  z-index: 5;
}

.phone-camera-hole {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #000;
  border: 1px solid #222;
  border-radius: 50%;
  z-index: 5;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ios-screen {
  background: var(--ios-bg);
  color: var(--ios-text);
}

.android-screen {
  background: var(--android-bg);
  color: var(--android-text);
}

/* Status bar */
.ios-status-bar,
.android-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  height: 32px;
  flex-shrink: 0;
}

.ios-status-bar {
  padding-top: 14px;
}

.status-icon {
  margin-left: 6px;
  font-size: 9px;
  opacity: 0.9;
}
.status-icon.battery {
  font-size: 10px;
  transform: scaleX(2.0) scaleY(1.1);
  display: inline-block;
}

/* Nav / app bars */
.ios-nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 16px 10px;
  border-bottom: 0.5px solid var(--ios-separator);
  flex-shrink: 0;
}
.ios-nav-title {
  font-size: 15px;
  font-weight: 600;
}

.android-app-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px 14px;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}
.android-menu-btn {
  background: transparent;
  border: none;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 22px;
}
.menu-icon {
  display: block;
  height: 2px;
  background: var(--android-text);
  width: 100%;
  border-radius: 1px;
}
.android-app-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--android-text);
}

/* =====================================================
   Screen content container
   ===================================================== */

.screen-container {
  flex: 1 1 auto;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}
.screen-container::-webkit-scrollbar {
  width: 3px;
}
.screen-container::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

.ios-screen-content,
.android-screen-content {
  padding: 12px 12px 24px;
  min-height: 100%;
  position: relative;
}

.android-screen-content {
  padding: 16px 12px 24px;
}

/* =====================================================
   iOS components
   ===================================================== */

.ios-form-group {
  margin-bottom: 20px;
}
.ios-form-group.dim {
  opacity: 0.35;
}

.ios-form-header {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ios-secondary);
  padding: 2px 16px 6px;
  letter-spacing: 0.4px;
}

.ios-form-card {
  background: var(--ios-card);
  border-radius: 10px;
  overflow: hidden;
}

.ios-form-row,
.ios-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-bottom: 0.5px solid var(--ios-separator);
  font-size: 13px;
  gap: 10px;
}

.ios-form-row:last-child,
.ios-list-row:last-child {
  border-bottom: none;
}

.ios-form-label {
  color: var(--ios-text);
}
.ios-form-value {
  color: var(--ios-secondary);
  font-size: 12px;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ios-list-main {
  flex: 1;
  min-width: 0;
}
.ios-list-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ios-text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.ios-list-subtitle {
  font-size: 11px;
  color: var(--ios-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.ios-chevron {
  color: var(--ios-secondary);
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
  font-weight: 300;
}

.ios-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ios-secondary);
}
.ios-status-dot.green { background: var(--ios-green); }
.ios-status-dot.red { background: var(--ios-red); }

.ios-btn-prominent {
  display: block;
  margin: 16px 12px 0;
  width: calc(100% - 24px);
  background: var(--ios-blue);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: opacity 0.15s ease;
}
.ios-btn-prominent:hover {
  opacity: 0.9;
}

/* LIVE badge (shared) */
.live-badge {
  background: var(--live-red);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-block;
}

.lock-icon {
  color: var(--ios-secondary);
  display: inline-block;
  vertical-align: middle;
}

/* iOS stream view */
.ios-stream-header {
  padding: 12px 16px 8px;
  text-align: center;
}
.ios-stream-title {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}
.ios-stream-sub {
  font-size: 11px;
  color: var(--ios-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ios-stream-duration {
  font-variant-numeric: tabular-nums;
}

.ios-e2ee-indicator {
  margin: 4px 12px 8px;
  padding: 6px 10px;
  background: rgba(52, 199, 89, 0.15);
  border: 1px solid rgba(52, 199, 89, 0.4);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ios-green);
  font-size: 10px;
  font-weight: 500;
  justify-content: center;
}

.ios-visualizer {
  margin: 0 12px 12px;
  background: var(--ios-card);
  border-radius: 12px;
  padding: 16px;
  height: 130px;
}

.ios-stream-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 16px 12px;
  position: relative;
  z-index: 2;
}

.ios-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--ios-card-2);
  color: var(--ios-text);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.ios-circle-btn:hover {
  transform: scale(1.05);
}
.ios-btn-leave {
  background: var(--ios-red);
}

.ios-donate-btn {
  background: var(--ios-blue);
  color: #fff;
  border: none;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s ease;
}
.ios-donate-btn:hover {
  opacity: 0.9;
}

/* iOS bottom sheet */
.ios-bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ios-card);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  padding: 10px 18px 22px;
  border-top: 0.5px solid var(--ios-separator);
  animation: sheet-slide-up 0.3s ease;
}
.ios-sheet-handle {
  width: 38px;
  height: 5px;
  background: var(--ios-secondary);
  border-radius: 3px;
  margin: 0 auto 12px;
  opacity: 0.5;
}
.ios-sheet-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.ios-sheet-sub {
  text-align: center;
  font-size: 11px;
  color: var(--ios-secondary);
  margin-bottom: 14px;
}

.ios-sheet-input {
  background: var(--ios-card-2);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ios-sheet-input input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ios-text);
  font-size: 12px;
  flex: 1;
  min-width: 0;
}
.ios-sheet-input input::placeholder {
  color: var(--ios-secondary);
}
.char-count {
  font-size: 10px;
  color: var(--ios-secondary);
  white-space: nowrap;
}

@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.ios-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ios-blue);
  color: #fff;
  border: none;
  font-size: 10px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================================
   Android components
   ===================================================== */

.android-heading {
  font-size: 18px;
  font-weight: 500;
  color: var(--android-text);
  margin: 4px 4px 16px;
}

.android-tf {
  background: var(--android-surface);
  border: 1px solid var(--android-border);
  border-radius: 4px;
  padding: 8px 12px;
  margin: 0 4px 12px;
}
.android-tf label {
  display: block;
  font-size: 10px;
  color: var(--android-primary);
  margin-bottom: 2px;
}
.android-tf-value {
  font-size: 13px;
  color: var(--android-text);
}
.android-tf-value.placeholder {
  color: var(--android-secondary);
}

.android-status-card {
  background: var(--android-surface);
  border-radius: 12px;
  padding: 14px;
  margin: 8px 4px 16px;
  border: 1px solid var(--android-border);
}
.android-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.android-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--android-secondary);
}
.android-status-dot.green { background: #81C784; }
.android-status-txt {
  font-size: 13px;
  font-weight: 500;
  color: var(--android-text);
}
.android-status-user {
  font-size: 11px;
  color: var(--android-secondary);
  margin-left: 16px;
}

.android-filled-btn {
  display: block;
  width: calc(100% - 8px);
  margin: 12px 4px 0;
  background: var(--android-primary);
  color: #000;
  border: none;
  border-radius: 20px;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: background 0.15s ease;
}
.android-filled-btn:hover {
  background: var(--android-primary-hover);
}

.android-outlined-btn {
  flex: 1;
  background: transparent;
  color: var(--android-primary);
  border: 1px solid var(--android-primary);
  border-radius: 20px;
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  transition: background 0.15s ease;
}
.android-outlined-btn:hover {
  background: rgba(187, 134, 252, 0.1);
}
.android-outlined-btn.danger {
  color: var(--android-error);
  border-color: var(--android-error);
}
.android-outlined-btn.danger:hover {
  background: rgba(207, 102, 121, 0.1);
}

.android-card {
  background: var(--android-surface);
  border: 1px solid var(--android-border);
  border-radius: 12px;
  padding: 12px;
  margin: 0 4px 10px;
}
.android-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.android-card-main {
  flex: 1;
  min-width: 0;
}
.android-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--android-text);
  margin-bottom: 2px;
}
.android-card-sub {
  font-size: 11px;
  color: var(--android-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Material3 chips */
.android-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  background: var(--android-surface-2);
  color: var(--android-text);
}
.android-chip.chip-live {
  background: var(--live-red);
  color: #fff;
}

.android-filter-chip {
  background: var(--android-surface);
  color: var(--android-text);
  border: 1px solid var(--android-border);
  border-radius: 18px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.android-filter-chip:hover {
  transform: translateY(-1px);
}

.android-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--android-primary);
  color: #000;
  border: none;
  font-size: 11px;
  padding-left: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Android stream view */
.android-stream-header {
  padding: 4px 4px 8px;
}
.android-stream-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--android-text);
  margin-bottom: 6px;
}
.android-stream-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--android-secondary);
}
.android-stream-duration {
  font-variant-numeric: tabular-nums;
}

.android-e2ee-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 4px 10px;
  padding: 4px 10px;
  background: rgba(129, 199, 132, 0.15);
  border: 1px solid rgba(129, 199, 132, 0.4);
  color: #81C784;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 500;
}

.android-visualizer {
  margin: 0 4px 14px;
  background: var(--android-surface);
  border: 1px solid var(--android-border);
  border-radius: 12px;
  padding: 16px;
  height: 130px;
}

.android-stream-controls {
  display: flex;
  gap: 10px;
  padding: 0 4px 16px;
}

.android-fab {
  position: absolute;
  right: 14px;
  bottom: 72px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--android-primary);
  color: #000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
  z-index: 3;
}
.android-fab:hover {
  transform: scale(1.05);
}
.fab-icon {
  line-height: 1;
}

/* Android bottom sheet */
.android-dim-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1;
}
.android-bottom-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--android-surface);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  padding: 10px 18px 22px;
  z-index: 2;
  animation: sheet-slide-up 0.3s ease;
  border-top: 1px solid var(--android-border);
}
.android-sheet-handle {
  width: 38px;
  height: 4px;
  background: var(--android-secondary);
  border-radius: 2px;
  margin: 0 auto 12px;
  opacity: 0.5;
}
.android-sheet-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--android-text);
}
.android-sheet-sub {
  font-size: 11px;
  color: var(--android-secondary);
  margin-bottom: 14px;
}

/* =====================================================
   Donation tier buttons (shared)
   ===================================================== */

.donation-tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: center;
}

.tier-btn {
  flex: 0 0 auto;
  min-width: 56px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.tier-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.android-tiers .android-filter-chip.tier-blue,
.tier-blue { background: var(--tier-blue); color: #fff; border-color: var(--tier-blue); }

.android-tiers .android-filter-chip.tier-green,
.tier-green { background: var(--tier-green); color: #fff; border-color: var(--tier-green); }

.android-tiers .android-filter-chip.tier-yellow,
.tier-yellow { background: var(--tier-yellow); color: #222; border-color: var(--tier-yellow); }

.android-tiers .android-filter-chip.tier-orange,
.tier-orange { background: var(--tier-orange); color: #fff; border-color: var(--tier-orange); }

.android-tiers .android-filter-chip.tier-magenta,
.tier-magenta { background: var(--tier-magenta); color: #fff; border-color: var(--tier-magenta); }

.android-tiers .android-filter-chip.tier-red,
.tier-red { background: var(--tier-red); color: #fff; border-color: var(--tier-red); }

.android-tiers .android-filter-chip.tier-gold,
.tier-gold { background: var(--tier-gold); color: #1a1a00; border-color: var(--tier-gold); }

/* =====================================================
   Audio visualizer
   ===================================================== */

.audio-visualizer {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
}

.viz-bar {
  width: 5px;
  background: linear-gradient(180deg, var(--ios-blue), #4dabff);
  border-radius: 3px;
  animation: viz-bounce 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.android-visualizer .viz-bar {
  background: linear-gradient(180deg, var(--android-primary), #d1a9ff);
}

.viz-bar:nth-child(1)  { height: 30%; animation-delay: 0.00s; }
.viz-bar:nth-child(2)  { height: 60%; animation-delay: 0.05s; }
.viz-bar:nth-child(3)  { height: 45%; animation-delay: 0.10s; }
.viz-bar:nth-child(4)  { height: 80%; animation-delay: 0.15s; }
.viz-bar:nth-child(5)  { height: 55%; animation-delay: 0.20s; }
.viz-bar:nth-child(6)  { height: 90%; animation-delay: 0.25s; }
.viz-bar:nth-child(7)  { height: 40%; animation-delay: 0.30s; }
.viz-bar:nth-child(8)  { height: 70%; animation-delay: 0.35s; }
.viz-bar:nth-child(9)  { height: 50%; animation-delay: 0.40s; }
.viz-bar:nth-child(10) { height: 85%; animation-delay: 0.45s; }
.viz-bar:nth-child(11) { height: 35%; animation-delay: 0.50s; }
.viz-bar:nth-child(12) { height: 65%; animation-delay: 0.55s; }
.viz-bar:nth-child(13) { height: 50%; animation-delay: 0.60s; }
.viz-bar:nth-child(14) { height: 75%; animation-delay: 0.65s; }
.viz-bar:nth-child(15) { height: 40%; animation-delay: 0.70s; }
.viz-bar:nth-child(16) { height: 60%; animation-delay: 0.75s; }

@keyframes viz-bounce {
  0%, 100% { transform: scaleY(0.35); }
  50%      { transform: scaleY(1); }
}

/* =====================================================
   Donation overlay (appears over stream view)
   ===================================================== */

.donation-overlay {
  position: absolute;
  right: 10px;
  top: 80px;
  width: calc(100% - 24px);
  max-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  z-index: 3;
}

.donation-card {
  background: var(--tier-blue);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow-md);
  animation: donation-slide-in 0.4s ease forwards;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.donation-card.removing {
  animation: donation-slide-out 0.4s ease forwards;
}
.donation-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.donation-card-name {
  font-size: 11px;
}
.donation-card-amount {
  font-size: 13px;
  font-weight: 800;
}
.donation-card-msg {
  font-size: 10px;
  opacity: 0.9;
  line-height: 1.3;
}

.donation-card.tier-yellow,
.donation-card.tier-gold { color: #1a1a00; }

@keyframes donation-slide-in {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes donation-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

/* =====================================================
   Sidebar
   ===================================================== */

.sidebar {
  background: var(--mm-panel);
  border: 1px solid var(--mm-border);
  border-radius: 14px;
  padding: 20px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: sticky;
  top: 24px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--mm-text-muted);
  margin-bottom: 2px;
}

.scenario-buttons,
.sim-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scenario-btn,
.sim-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--mm-panel-2);
  color: var(--mm-text);
  border: 1px solid var(--mm-border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-size: 13px;
  transition: all 0.15s ease;
}
.scenario-btn:hover,
.sim-btn:hover {
  border-color: var(--mm-border-strong);
  background: #20273a;
}

.scenario-btn.active {
  background: rgba(91, 95, 199, 0.2);
  border-color: var(--mm-primary);
  color: #fff;
}
.scenario-btn.active .scenario-icon {
  opacity: 1;
}

.scenario-icon,
.sim-icon {
  width: 22px;
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
  flex-shrink: 0;
}

.scenario-label {
  flex: 1;
}

/* Info box */
.info-box {
  background: var(--mm-panel-2);
  border: 1px solid var(--mm-border);
  border-left: 3px solid var(--mm-primary);
  border-radius: 8px;
  padding: 12px 14px;
}
.info-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--mm-text);
  margin-bottom: 4px;
}
.info-desc {
  font-size: 12px;
  color: var(--mm-text-muted);
  line-height: 1.45;
}

.sidebar-footer {
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--mm-border);
  font-size: 10px;
  color: var(--mm-text-subtle);
  line-height: 1.5;
}
.footer-line { display: block; }

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 1100px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sidebar {
    position: static;
    order: -1;
  }
}

@media (max-width: 720px) {
  .app-header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .main-layout {
    padding: 16px;
  }
  .phones-area {
    gap: 24px;
  }
  .phone-frame {
    width: 260px;
    height: 540px;
  }
}
