/* ===== BlueBox Gaming Brand Design System ===== */
/* Primary: #66c0f4 | Button: #105ea8 | Border/Glow: rgba(102,192,244,0.3) */

/* Animations — brand guidelines */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes shine {
  0%   { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse-live {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 8px rgba(102,192,244,.3); }
  50%      { box-shadow: 0 0 20px rgba(102,192,244,.5); }
}
@keyframes tipFlash {
  0%   { background-color: rgba(245,158,11,.15); }
  100% { background-color: transparent; }
}

.animate-fade-up   { animation: fadeUp .5s ease both; }
.animate-fade-in   { animation: fadeIn .4s ease both; }
.animate-slide-in  { animation: slideInRight .35s ease both; }
.animate-pulse-live{ animation: pulse-live 2s ease-in-out infinite; }
.animate-glow      { animation: glow 2s ease-in-out infinite; }
.animate-tip-flash { animation: tipFlash .8s ease; }

.stagger-1 { animation-delay: .05s; }
.stagger-2 { animation-delay: .1s; }
.stagger-3 { animation-delay: .15s; }
.stagger-4 { animation-delay: .2s; }
.stagger-5 { animation-delay: .25s; }
.stagger-6 { animation-delay: .3s; }

/* Glass card — brand: bg rgba(0,0,0,0.9), border rgba(102,192,244,0.3), radius 12px */
.glass {
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(102,192,244,.3);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(102,192,244,.2);
}
.glass-strong {
  background: rgba(0,0,0,.95);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(102,192,244,.3);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(102,192,244,.2);
}
.glass-nav {
  background: rgba(0,0,0,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(102,192,244,.3);
}

/* Interactive hover lift — brand: translateY(-2px), glow on hover */
.hover-lift {
  transition: transform .2s ease, box-shadow .2s ease;
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102,192,244,.3);
}

/* Primary button — brand: #105ea8, border #66c0f4, hover #66c0f4, uppercase */
.btn-accent {
  background: #105ea8;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid #66c0f4;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.btn-accent:hover {
  background: #66c0f4;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102,192,244,.3);
  color: #fff;
  text-decoration: none;
}

.btn-ghost {
  background: rgba(102,192,244,.1);
  color: rgba(255,255,255,.9);
  font-weight: 500;
  padding: .625rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(102,192,244,.3);
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'Outfit', sans-serif;
}
.btn-ghost:hover {
  background: rgba(102,192,244,.2);
  border-color: rgba(102,192,244,.4);
  color: #fff;
  text-decoration: none;
}

.btn-danger {
  background: #ff4444;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,68,68,.5);
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.btn-danger:hover {
  box-shadow: 0 5px 15px rgba(255,68,68,.3);
  transform: translateY(-2px);
}

.btn-success {
  background: #2ecc71;
  color: #fff;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 6px;
  border: 1px solid rgba(46,204,113,.6);
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.btn-success:hover {
  box-shadow: 0 5px 15px rgba(46,204,113,.3);
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  font-weight: 600;
  padding: .625rem 1.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  font-family: 'Outfit', sans-serif;
}
.btn-gold:hover {
  box-shadow: 0 0 20px rgba(245,158,11,.3);
  transform: translateY(-1px);
}

.btn-sm {
  padding: .375rem .875rem;
  font-size: .8125rem;
}

/* Form inputs — brand border radius 8px */
.input-dark {
  background: rgba(0,0,0,.8);
  border: 1px solid rgba(102,192,244,.3);
  border-radius: 8px;
  color: #fff;
  padding: .625rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem;
  transition: border-color .2s ease, box-shadow .2s ease;
  width: 100%;
  outline: none;
}
.input-dark::placeholder { color: rgba(255,255,255,.4); }
.input-dark:focus {
  border-color: #66c0f4;
  box-shadow: 0 0 0 3px rgba(102,192,244,.2);
}

/* Data tables */
.table-dark {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-dark thead th {
  background: rgba(0,0,0,.9);
  color: rgba(255,255,255,.7);
  font-family: 'Outfit', sans-serif;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(102,192,244,.3);
}
.table-dark thead th:first-child { border-radius: 8px 0 0 0; }
.table-dark thead th:last-child  { border-radius: 0 8px 0 0; }
.table-dark tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid rgba(102,192,244,.15);
  color: rgba(255,255,255,.8);
  font-size: .9rem;
}
.table-dark tbody tr:hover td {
  background: rgba(102,192,244,.1);
}
.table-dark tbody tr:last-child td { border-bottom: none; }

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 9999px;
  font-size: .75rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}
.badge-success { background: rgba(46,204,113,.2); color: #2ecc71; }
.badge-danger  { background: rgba(255,68,68,.2); color: #ff4444; }
.badge-info    { background: rgba(102,192,244,.2); color: #66c0f4; }
.badge-warning { background: rgba(255,187,51,.2); color: #ffbb33; }
.badge-purple  { background: rgba(168,85,247,.2); color: #a855f7; }

/* Live indicator dot — brand error red */
.live-dot {
  width: 8px; height: 8px;
  background: #ff4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-live 2s ease-in-out infinite;
}

/* Scrollbars — brand guidelines (Firefox + Webkit) */
:root {
  scrollbar-width: thin;
  scrollbar-color: rgba(102,192,244,.5) transparent;
}
:root::-webkit-scrollbar { width: 6px; }
:root::-webkit-scrollbar-track { background: transparent; }
:root::-webkit-scrollbar-thumb {
  background: rgba(102,192,244,.5);
  border-radius: 3px;
}
:root::-webkit-scrollbar-thumb:hover {
  background: rgba(102,192,244,.7);
}

/* Chat */
.chat-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(102,192,244,.5) transparent;
}
.chat-scroll::-webkit-scrollbar { width: 6px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(102,192,244,.5);
  border-radius: 3px;
}
.chat-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(102,192,244,.7);
}

/* Goal progress — brand accent fill */
.progress-bar-track {
  height: 6px;
  background: rgba(0,0,0,.8);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(102,192,244,.2);
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #66c0f4, #105ea8);
  border-radius: 3px;
  transition: width .6s ease;
}

/* Dropdown — brand container */
.dropdown-dark {
  background: rgba(0,0,0,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(102,192,244,.3);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(102,192,244,.2), 0 20px 40px rgba(0,0,0,.5);
  min-width: 200px;
  padding: .375rem;
  z-index: 50;
}
.dropdown-dark a,
.dropdown-dark button,
.dropdown-dark .dropdown-item {
  display: block;
  width: 100%;
  padding: .5rem .75rem;
  color: rgba(255,255,255,.7);
  font-size: .9rem;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.dropdown-dark a:hover,
.dropdown-dark button:hover,
.dropdown-dark .dropdown-item:hover {
  background: rgba(102,192,244,.2);
  color: #fff;
}

/* Notification / flash messages */
.flash-msg {
  padding: .75rem 1rem;
  border-radius: .75rem;
  font-size: .875rem;
  border: 1px solid;
}
.flash-info    { background: rgba(102,192,244,.15); border-color: rgba(102,192,244,.3); color: #66c0f4; }
.flash-warning { background: rgba(255,187,51,.15); border-color: rgba(255,187,51,.3); color: #ffbb33; }
.flash-danger  { background: rgba(255,68,68,.15); border-color: rgba(255,68,68,.3); color: #ff4444; }
.flash-success { background: rgba(46,204,113,.15); border-color: rgba(46,204,113,.3); color: #2ecc71; }

/* Prose for legal pages — brand: headers 1.5rem uppercase, text-shadow glow */
.prose-dark h1 { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .08em; text-shadow: 0 0 10px rgba(102,192,244,.3); }
.prose-dark h2 { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 600; color: rgba(255,255,255,.9); margin-top: 2rem; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .06em; text-shadow: 0 0 10px rgba(102,192,244,.2); }
.prose-dark h3 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 600; color: rgba(255,255,255,.85); margin-top: 1.5rem; margin-bottom: .5rem; text-transform: uppercase; letter-spacing: .05em; }
.prose-dark p  { color: rgba(255,255,255,.6); line-height: 1.75; margin-bottom: 1rem; }
.prose-dark a  { color: #66c0f4; text-decoration: underline; text-underline-offset: 2px; }
.prose-dark a:hover { color: #fff; }
.prose-dark ol, .prose-dark ul { color: rgba(255,255,255,.6); line-height: 1.75; margin-bottom: 1rem; padding-left: 1.5rem; }
.prose-dark li { margin-bottom: .25rem; }
.prose-dark code { background: rgba(0,0,0,.8); padding: .15rem .4rem; border-radius: 4px; font-size: .85em; color: #66c0f4; border: 1px solid rgba(102,192,244,.2); }

/* EmojioneArea overrides for dark theme */
.emojionearea {
  background: rgba(255,255,255,.05) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: .75rem !important;
  box-shadow: none !important;
  color: #fff !important;
}
.emojionearea .emojionearea-editor {
  color: #fff !important;
  min-height: 38px !important;
}
.emojionearea.focused {
  border-color: #66c0f4 !important;
  box-shadow: 0 0 0 3px rgba(102,192,244,.2) !important;
}

/* Mobile nav */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(8,8,13,.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 5rem 2rem 2rem;
}
.mobile-menu.open { display: flex; flex-direction: column; }

/* Streamer social link icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.5);
  transition: all .2s ease;
  font-size: .8rem;
}
.social-icon:hover {
  background: rgba(102,192,244,.2);
  color: #66c0f4;
}

/* Stat card for stream view */
.stat-card {
  text-align: center;
  padding: 1rem .75rem;
}
.stat-card .stat-label {
  font-family: 'Outfit', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  margin-bottom: .375rem;
}
.stat-card .stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #f59e0b;
}

/* ===== SpankChain-Inspired Components ===== */

/* Video progress bar overlay */
.video-progress-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding: 0 12px 8px;
  pointer-events: none;
}
.video-progress-overlay .progress-bar-track {
  height: 5px;
  background: rgba(255,255,255,.15);
  border-radius: 3px;
  overflow: hidden;
}
.video-progress-overlay .progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #66c0f4, #105ea8);
  border-radius: 3px;
  transition: width .6s ease;
}

/* Progress bar percentage marker */
.progress-bar-marker {
  position: relative;
  display: inline-block;
  transform: translateX(-50%);
  background: rgba(102,192,244,.9);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 1px 7px;
  border-radius: 9999px;
  white-space: nowrap;
  pointer-events: none;
  line-height: 1.4;
  margin-bottom: 4px;
}

/* Stream card (dashboard grid) */
.stream-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
  background: rgba(255,255,255,.04);
  transition: transform .2s ease, box-shadow .2s ease;
}
.stream-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
}
.stream-card-thumb {
  aspect-ratio: 16/9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.stream-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: .75rem 1rem;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%);
}
.stream-card-overlay .stream-card-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
}
.stream-card-overlay .stream-card-title {
  font-size: .8rem;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-card-badge {
  position: absolute;
  top: .6rem;
  right: .6rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: .7rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: #fff;
}

/* Chat tabs */
.chat-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.chat-tabs .chat-tab {
  flex: 1;
  padding: .6rem .5rem;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color .2s ease;
}
.chat-tabs #chat-minimize {
  flex: 0;
  padding: .6rem .5rem;
}
.chat-tabs .chat-tab:hover {
  color: rgba(255,255,255,.6);
}
.chat-tabs .chat-tab.active {
  color: #66c0f4;
}
.chat-tabs .chat-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #66c0f4;
  border-radius: 2px;
}
.chat-tab-panel {
  display: none !important;
}
.chat-tab-panel.active {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* Tip badge (inline in chat) */
.tip-badge {
  display: inline-block;
  background: rgba(102,192,244,.2);
  color: #66c0f4;
  font-size: .7rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  padding: 1px 8px;
  border-radius: 9999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Tip bar (always-visible at chat bottom) */
.tip-bar {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.02);
}
.tip-bar .tip-stepper-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: .375rem;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  cursor: pointer;
  font-size: .8rem;
  font-weight: 700;
  transition: all .15s ease;
}
.tip-bar .tip-stepper-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.tip-bar .tip-amount-input {
  width: 60px;
  text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .375rem;
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  padding: .35rem .25rem;
  outline: none;
  -moz-appearance: textfield;
}
.tip-bar .tip-amount-input::-webkit-outer-spin-button,
.tip-bar .tip-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.tip-bar .tip-amount-input:focus {
  border-color: rgba(102,192,244,.5);
}
.tip-bar .tip-send-btn {
  margin-left: auto;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #fff;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: .78rem;
  padding: .35rem 1rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.tip-bar .tip-send-btn:hover {
  box-shadow: 0 0 16px rgba(245,158,11,.3);
  transform: translateY(-1px);
}
.tip-bar .tip-send-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Video overlay chips */
.video-overlay-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: .375rem;
  font-size: .75rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  color: rgba(255,255,255,.85);
  pointer-events: none;
}

/* Responsive stream grid — video & chat same height on desktop */
@media (max-width: 1023px) {
  #chat-column {
    min-height: 420px;
    max-height: 60vh;
  }
}
@media (min-width: 1024px) {
  .stream-grid {
    height: calc(100vh - 8rem);
    min-height: 480px;
    max-height: 900px;
  }
  #video-column {
    min-height: 0;
  }
  #chat-column {
    min-height: 0;
  }
  #chat-panel, #tipmenu-panel, #viewers-panel {
    min-height: 0;
  }
}

/* Video container enhanced */
.video-wrap-enhanced {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  position: relative;
}

/* Flat stats row (no glass) */
.stats-row-flat {
  display: grid;
}
.stats-row-flat .stat-card {
  border-right: 1px solid rgba(255,255,255,.05);
  background: none;
}
.stats-row-flat .stat-card:last-child {
  border-right: none;
}

/* Mask over Millicast's built-in controls (cog + fullscreen) */
#millicast-control-mask {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100px;
  height: 52px;
  z-index: 8;
  background: linear-gradient(to right, transparent 0%, rgba(0,0,0,.85) 30%);
  pointer-events: auto;
}

/* ===== Fullscreen Stream Overlay ===== */

#stream-fullscreen-wrapper {
  position: relative;
}

/* Fullscreen toggle button on video */
#fs-toggle {
  position: absolute;
  bottom: .75rem;
  right: .75rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  transition: all .2s ease;
  font-size: .875rem;
}
#fs-toggle:hover {
  background: rgba(0,0,0,.8);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}

/* Active fullscreen state */
#stream-fullscreen-wrapper.is-fullscreen {
  width: 100%;
  height: 100%;
  background: #000;
  display: flex;
  flex-direction: column;
}

#stream-fullscreen-wrapper.is-fullscreen #stream-grid {
  display: flex !important;
  flex: 1;
  min-height: 0 !important;
  gap: 0 !important;
  position: relative;
}

#stream-fullscreen-wrapper.is-fullscreen #video-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
  min-width: 0;
}

#stream-fullscreen-wrapper.is-fullscreen #video-player-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

#stream-fullscreen-wrapper.is-fullscreen #video-container {
  flex: 1;
  aspect-ratio: auto !important;
}

#stream-fullscreen-wrapper.is-fullscreen .fs-hide { display: none !important; }
#stream-fullscreen-wrapper.is-fullscreen .video-progress-overlay { display: none; }

/* Chat overlay panel in fullscreen */
#stream-fullscreen-wrapper.is-fullscreen #chat-column {
  position: absolute !important;
  right: 0; top: 0; bottom: 0;
  width: 340px;
  max-width: 90vw;
  z-index: 20;
  border-radius: 0 !important;
  background: rgba(8,8,13,.88) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: none !important;
  border-left: 1px solid rgba(255,255,255,.08) !important;
  min-height: 0 !important;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}

#stream-fullscreen-wrapper.is-fullscreen #chat-column.chat-minimized {
  transform: translateX(100%);
  pointer-events: none;
}

#stream-fullscreen-wrapper.is-fullscreen #chat {
  max-height: none !important;
  flex: 1;
}

/* Chat minimize button (only visible in fullscreen) */
#chat-minimize { display: none; }
#stream-fullscreen-wrapper.is-fullscreen #chat-minimize {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: .375rem;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  transition: all .2s ease;
  font-size: .625rem;
}
#stream-fullscreen-wrapper.is-fullscreen #chat-minimize:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Fullscreen overlay controls */
#fs-overlay {
  display: none;
}
#stream-fullscreen-wrapper.is-fullscreen #fs-overlay {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}
#fs-overlay > * {
  pointer-events: auto;
}

/* Chat restore tab */
#chat-restore {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8,8,13,.85);
  border: 1px solid rgba(255,255,255,.1);
  border-right: none;
  border-radius: .5rem 0 0 .5rem;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .2s ease;
  font-size: .875rem;
}
#chat-restore:hover {
  background: rgba(8,8,13,.95);
  color: #66c0f4;
}
#chat-restore.visible {
  display: flex;
}

/* Tip cog button */
#fs-tip-cog {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: all .3s ease;
  font-size: .95rem;
}
#fs-tip-cog:hover {
  background: rgba(245,158,11,.2);
  border-color: rgba(245,158,11,.4);
  color: #f59e0b;
  transform: rotate(45deg);
}

/* Tip panel from cog */
#fs-tip-panel {
  position: absolute;
  bottom: 4rem;
  left: 1rem;
  width: 280px;
  background: rgba(15,15,23,.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .75rem;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  z-index: 30;
}

/* Exit fullscreen button */
#fs-exit {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .5rem;
  color: rgba(255,255,255,.65);
  cursor: pointer;
  transition: all .2s ease;
  font-size: .875rem;
}
#fs-exit:hover {
  background: rgba(0,0,0,.8);
  color: #fff;
  border-color: rgba(255,255,255,.3);
}

/* ===== Wallet Modal ===== */

@keyframes walletSlideUp {
  from { opacity: 0; transform: translateY(40px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes walletBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cardShimmer {
  0%   { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(200%) rotate(25deg); }
}

.wallet-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: walletBackdropIn .25s ease both;
}
.wallet-modal-backdrop.closing {
  opacity: 0;
  transition: opacity .2s ease;
}

.wallet-modal-panel {
  width: 100%;
  max-width: 440px;
  margin: 1rem;
  background: rgba(15,15,23,.97);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1.25rem;
  box-shadow: 0 32px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.04) inset;
  animation: walletSlideUp .35s cubic-bezier(.22,1,.36,1) both;
  overflow: hidden;
}

/* Header bar */
.wallet-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.wallet-modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.wallet-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .5rem;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  transition: all .15s ease;
  font-size: .75rem;
}
.wallet-modal-close:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Credit card */
.wallet-card {
  position: relative;
  margin: 1.25rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 50%, #0f0f2d 100%);
  border: 1px solid rgba(255,255,255,.12);
  aspect-ratio: 1.586 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.4), 0 0 60px rgba(168,85,247,.08) inset;
  transition: box-shadow .3s ease;
}
.wallet-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.5), 0 0 80px rgba(168,85,247,.12) inset;
}
.wallet-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 60%;
  height: 200%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.04) 45%,
    rgba(255,255,255,.08) 50%,
    rgba(255,255,255,.04) 55%,
    transparent 100%
  );
  transform: rotate(25deg);
  animation: cardShimmer 4s ease-in-out infinite;
  pointer-events: none;
}

.wallet-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.wallet-card-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: .7rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.wallet-card-chip {
  width: 36px;
  height: 28px;
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(245,158,11,.6), rgba(245,158,11,.25));
  border: 1px solid rgba(245,158,11,.3);
}

.wallet-card-center {
  text-align: center;
}
.wallet-card-balance-label {
  font-family: 'Outfit', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: .25rem;
}
.wallet-card-balance {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 20px rgba(245,158,11,.25);
}

.wallet-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.wallet-card-holder {
  font-family: 'Outfit', sans-serif;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
}
.wallet-card-type {
  font-family: 'Outfit', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  color: rgba(168,85,247,.7);
  letter-spacing: .06em;
}

/* Purchase tier buttons */
.wallet-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  padding: 0 1.25rem 1.25rem;
}
.wallet-tier-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: 1rem .75rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .75rem;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.wallet-tier-btn:hover {
  background: rgba(245,158,11,.08);
  border-color: rgba(245,158,11,.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.wallet-tier-btn:active {
  transform: translateY(0);
}
.wallet-tier-amount {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  transition: color .2s ease;
}
.wallet-tier-btn:hover .wallet-tier-amount {
  color: #f59e0b;
}
.wallet-tier-label {
  font-family: 'Outfit', sans-serif;
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.3);
}
.wallet-tier-test {
  position: absolute;
  top: .35rem;
  right: .35rem;
}

/* Footer link */
.wallet-modal-footer {
  padding: 0 1.25rem 1.25rem;
  text-align: center;
}
.wallet-modal-footer a {
  font-size: .75rem;
  color: rgba(255,255,255,.25);
  text-decoration: none;
  transition: color .2s ease;
}
.wallet-modal-footer a:hover {
  color: rgba(255,255,255,.5);
}
