/* CSS Design System for MineTV - A Premium Minecraft OmeTV Experience */

:root {
  /* HSL Tailored Colors */
  --bg-obsidian-darker: #08090c;
  --bg-obsidian-dark: #0f121a;
  --bg-obsidian-glass: rgba(15, 18, 26, 0.75);
  --bg-card-glass: rgba(26, 31, 44, 0.55);
  --bg-chat-bubble-user: rgba(0, 229, 255, 0.15);
  --bg-chat-bubble-stranger: rgba(255, 153, 0, 0.15);
  
  --color-gold-glowing: #ffaa00;
  --color-gold-hover: #ffcc00;
  --color-gold-border: rgba(255, 170, 0, 0.35);
  
  --color-diamond: #00e5ff;
  --color-emerald: #00e676;
  --color-redstone: #ff1744;
  --color-text-primary: #f0f4f8;
  --color-text-secondary: #90a4ae;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-retro: 'Press Start 2P', monospace;
  
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(16px);
}

/* Reset & Scrollbar */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-gold-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-gold-glowing);
}

body {
  background-color: var(--bg-obsidian-darker);
  background-image: radial-gradient(circle at 50% 50%, #171b26 0%, var(--bg-obsidian-darker) 80%);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Background Particle System */
#particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.xp-particle {
  position: absolute;
  background: radial-gradient(circle, var(--color-emerald) 30%, rgba(0, 230, 118, 0) 70%);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-emerald);
  pointer-events: none;
  bottom: -20px;
  animation: floatUp linear forwards;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.5) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-105vh) scale(1.2) rotate(360deg);
    opacity: 0;
  }
}

/* App Outer Wrapper */
#app-wrapper {
  position: relative;
  z-index: 2;
  width: 95%;
  max-width: 1280px;
  height: 90vh;
  max-height: 820px;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Glass Panels */
.glass-panel {
  width: 100%;
  height: 100%;
  background: var(--bg-obsidian-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow);
  display: none;
  flex-direction: column;
  padding: 24px;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.glass-panel.active {
  display: flex;
  animation: scaleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  0% {
    transform: scale(0.92);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* LANDING / LOGIN SCREEN STYLES */
#login-screen {
  justify-content: space-between;
  align-items: center;
  max-width: 1080px;
  height: auto;
  max-height: 95vh;
  padding: 36px;
}

.logo-area {
  text-align: center;
  margin-bottom: 32px;
  margin-top: 10px;
}

.glow-text {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 5rem; /* Spacious and large! */
  letter-spacing: -2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.logo-hugo {
  color: #000000;
  /* Premium drop shadow so black text is beautifully readable on dark obsidian background */
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.25), 0 0 4px rgba(255, 255, 255, 0.6);
}

.logo-ome {
  color: #ff8800; /* Glowing warm orange */
  text-shadow: 0 0 20px rgba(255, 136, 0, 0.65), 0 0 8px rgba(255, 136, 0, 0.45);
}

.logo-tv {
  color: #000000;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.25), 0 0 4px rgba(255, 255, 255, 0.6);
}

.tagline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  margin-top: 8px;
  font-weight: 300;
}

.login-box-container {
  display: flex;
  width: 100%;
  gap: 32px;
  margin: 16px 0;
  align-items: stretch;
}

.login-form {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
}

/* Welcome Message Box */
.welcome-message {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 28px;
  text-align: left;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.02);
}

.welcome-message h2 {
  font-family: var(--font-title);
  color: var(--color-gold);
  font-size: 1.9rem;
  margin-bottom: 12px;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
  font-weight: 700;
}

.welcome-message p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  line-height: 1.65;
  margin: 0;
}

/* Microphone Selector Settings Panel */
.mic-settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-bottom: 8px;
  text-align: left;
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.02);
}

.mic-settings-group label {
  font-family: var(--font-title);
  color: var(--color-gold);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mic-select {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  outline: none;
  width: 100%;
  transition: all 0.25s ease;
}

.mic-select:focus, .mic-select:hover {
  border-color: var(--color-gold);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}

.mic-select option {
  background: #111111;
  color: #ffffff;
}

/* Shuffle Skin Button */
.shuffle-skin-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.shuffle-skin-btn:hover {
  background: var(--color-gold);
  color: #000000;
  border-color: var(--color-gold);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.45);
  transform: translateY(-2px);
}

.shuffle-skin-btn:active {
  transform: translateY(0);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 1px;
  color: var(--color-gold-glowing);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 19px 24px;
  border-radius: 14px;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: 1.25rem;
  outline: none;
  transition: all 0.3s ease;
}

.input-wrapper input:focus {
  border-color: var(--color-gold-glowing);
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.2);
}

.pulse-indicator {
  position: absolute;
  right: 18px;
  width: 8px;
  height: 8px;
  background: var(--color-gold-glowing);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold-glowing);
  animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.4; }
  100% { transform: scale(1); opacity: 1; }
}

.input-hint {
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-style: italic;
}

.skin-quick-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skin-quick-select .label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 11px 18px;
  border-radius: 10px;
  color: var(--color-text-primary);
  font-size: 0.98rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 170, 0, 0.15);
  border-color: var(--color-gold-glowing);
  transform: translateY(-2px);
}

.dimension-select {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dimension-select label {
  font-family: var(--font-title);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.05rem;
  letter-spacing: 1px;
  color: var(--color-gold-glowing);
}

.dimension-radio-group {
  display: flex;
  gap: 12px;
}

.dim-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 10px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.dim-card input[type="radio"] {
  display: none;
}

.dim-icon {
  font-size: 1.85rem;
  margin-bottom: 6px;
}

.dim-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dim-card:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.dim-card.active.overworld {
  border-color: var(--color-emerald);
  background: rgba(0, 230, 118, 0.08);
  box-shadow: 0 0 15px rgba(0, 230, 118, 0.15);
}
.dim-card.active.nether {
  border-color: var(--color-redstone);
  background: rgba(255, 23, 68, 0.08);
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.15);
}
.dim-card.active.end {
  border-color: var(--color-diamond);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

/* Retro Pixel Button */
.pixel-btn {
  background: linear-gradient(135deg, var(--color-gold-glowing) 0%, #d47a00 100%);
  border: 2px solid #000;
  box-shadow: inset -4px -4px 0px 0px #8b5000, inset 4px 4px 0px 0px rgba(255,255,255,0.4);
  padding: 20px 32px;
  border-radius: 4px;
  color: #000;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 16px;
  text-align: center;
}

.pixel-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(255, 170, 0, 0.4), inset -4px -4px 0px 0px #8b5000, inset 4px 4px 0px 0px rgba(255,255,255,0.4);
}

.pixel-btn:active {
  transform: translateY(2px);
  box-shadow: inset 4px 4px 0px 0px #8b5000, inset -4px -4px 0px 0px rgba(255,255,255,0.4);
}

/* Skin Preview Area */
.skin-preview-wrapper {
  flex: 0.8;
  display: flex;
  justify-content: center;
  align-items: center;
}

.preview-card {
  width: 100%;
  max-width: 320px;
  height: 440px;
  background: var(--bg-card-glass);
  border: var(--glass-border);
  border-radius: 24px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.preview-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(255,255,255,0.1);
  padding: 4px 10px;
  border-radius: 20px;
  color: var(--color-text-secondary);
}

.preview-renderer {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.preview-renderer img {
  height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
  transition: transform 0.5s ease;
}

.preview-renderer img:hover {
  transform: scale(1.05) rotate(5deg);
}

/* Minecraft Nametag */
.minecraft-nametag {
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.login-footer {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 16px;
  margin-top: 16px;
}

/* MAIN SCREEN STYLES (OmeTV REDESIGN) */
#main-screen {
  height: 100%;
  gap: 20px;
}

.main-screen-ometv {
  flex-direction: row !important;
  gap: 20px;
  overflow: hidden;
  height: 100%;
  width: 100%;
}

/* OmeTV Sidebar Left */
.ometv-sidebar {
  width: 320px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 4px;
}

.sidebar-stats {
  display: flex;
}

.sidebar-stats .online-counter {
  width: 100%;
  justify-content: center;
}

/* Dimension & Filter Selector */
.ometv-filters {
  background: var(--bg-card-glass);
  border: var(--glass-border);
  border-radius: 14px;
  padding: 10px 12px;
}

.ometv-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ometv-filters label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-select-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 10px;
  height: 38px;
}

.filter-icon {
  font-size: 1rem;
  margin-right: 8px;
}

.filter-dropdown {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: not-allowed;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Sidebar Nav Controls at the bottom */
.ometv-sidebar .nav-controls {
  display: flex;
  gap: 10px;
}

.ometv-sidebar .nav-btn {
  flex: 1;
  padding: 14px 10px;
  font-size: 0.95rem;
  border-radius: 10px;
}

/* Sidebar Integrated Action Dock */
.ometv-sidebar .action-dock {
  display: flex;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  justify-content: space-between;
}

.ometv-sidebar .action-btn {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: var(--glass-border);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
}

.ometv-sidebar .action-btn:hover {
  background: rgba(255, 170, 0, 0.1);
  border-color: var(--color-gold-glowing);
  transform: translateY(-2px);
}

.ometv-sidebar .action-btn .emoji {
  font-size: 1.25rem;
}

.ometv-sidebar .action-btn .action-label {
  display: none;
}

/* Video container splits screen */
.ometv-video-container {
  flex: 1 !important;
  display: flex;
  gap: 20px;
  min-height: 0;
  height: 100%;
}

.ometv-video-container .video-card {
  flex: 1 1 50%;
  width: 50%;
  height: 100%;
}

/* Header Bar Fallback */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-logo {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.7rem;
  letter-spacing: -0.8px;
  text-transform: uppercase;
}

.online-counter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.indicator-green {
  width: 8px;
  height: 8px;
  background: var(--color-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-emerald);
  animation: pulseGlow 1.8s infinite;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: rgba(255, 170, 0, 0.15);
  border-color: var(--color-gold-glowing);
  transform: scale(1.05);
}

/* Split Video Container */
.video-container {
  flex: 1;
  display: flex;
  gap: 20px;
  min-height: 0; /* Important for flex child layout sizing */
}

.video-card {
  flex: 1;
  background: var(--bg-card-glass);
  border: var(--glass-border);
  border-radius: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.card-badge {
  position: absolute;
  z-index: 10;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.card-badge.top-left {
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.5);
  color: var(--color-text-primary);
  border: 1px solid rgba(255,255,255,0.1);
}

.card-badge.stranger-status-badge {
  color: var(--color-gold-glowing);
  border-color: var(--color-gold-border);
}

.card-badge.top-right {
  top: 14px;
  right: 14px;
}

.location {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}

/* Dimension Badges */
#my-dimension-badge, .dim-overworld { background: rgba(0, 230, 118, 0.25); }
.dim-nether { background: rgba(255, 23, 68, 0.25); }
.dim-end { background: rgba(0, 229, 255, 0.25); }

/* Avatar Holder */
.avatar-holder {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: radial-gradient(circle at center, #1b2130 0%, #0a0d14 100%);
  overflow: hidden;
}

.glow-bg {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
  z-index: 2;
  pointer-events: none;
}

.blue-glow { background: var(--color-diamond); }
.gold-glow { background: var(--color-gold-glowing); }

.minecraft-avatar {
  height: 75%;
  max-height: 260px;
  z-index: 3;
  object-fit: contain;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6));
  transition: all 0.1s ease;
  transform-origin: bottom center;
}

/* Animations */
.minecraft-avatar.bobbing {
  animation: avatarBob 4s ease-in-out infinite;
}

@keyframes avatarBob {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* Avatar Waving Emote */
.avatar-wave {
  animation: avatarWave 0.8s ease-in-out;
}
@keyframes avatarWave {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(8deg) translateY(-5px); }
  75% { transform: rotate(-8deg) translateY(-5px); }
  100% { transform: rotate(0deg); }
}

/* Avatar Heart/Love Emote */
.avatar-love {
  animation: avatarLove 0.8s ease-in-out;
}
@keyframes avatarLove {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1) translateY(-10px); filter: drop-shadow(0 15px 25px var(--color-redstone)); }
}

/* Avatar Laugh Emote */
.avatar-laugh {
  animation: avatarLaugh 0.2s ease infinite alternate;
}
@keyframes avatarLaugh {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-12px) scaleY(1.05); }
}

/* Avatar Dance Emote */
.avatar-dance {
  animation: avatarDance 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite;
}
@keyframes avatarDance {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-20px) scale(0.95, 1.05) rotate(5deg); }
  50% { transform: translateY(0) scale(1.05, 0.95); }
  75% { transform: translateY(-20px) scale(0.95, 1.05) rotate(-5deg); }
}

/* Avatar Damage PvP Emote */
.avatar-pvp {
  animation: avatarDamage 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes avatarDamage {
  0%, 100% { transform: translate3d(0, 0, 0); filter: drop-shadow(0 15px 25px rgba(0,0,0,0.6)); }
  15%, 45%, 75% { transform: translate3d(-6px, 0, 0) scale(0.95); filter: brightness(0.6) sepia(1) saturate(10) hue-rotate(-50deg) drop-shadow(0 0 25px var(--color-redstone)); }
  30%, 60%, 90% { transform: translate3d(6px, 0, 0) scale(0.95); filter: brightness(0.6) sepia(1) saturate(10) hue-rotate(-50deg) drop-shadow(0 0 25px var(--color-redstone)); }
}

/* Search Screen Loader Overlay */
.searching-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 13, 20, 0.9);
  z-index: 5;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.searching-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

#searching-text {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  font-weight: 500;
  max-width: 80%;
  animation: pulseOpacity 1.5s infinite alternate;
}

@keyframes pulseOpacity {
  0% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Minecraft block style spinner loader */
.minecraft-spinner {
  display: flex;
  gap: 8px;
}

.spinner-block {
  width: 16px;
  height: 16px;
  background: var(--color-gold-glowing);
  box-shadow: 0 0 8px var(--color-gold-glowing);
  animation: spinnerJump 1.2s infinite ease-in-out;
}

.spinner-block:nth-child(2) {
  animation-delay: 0.2s;
  background: var(--color-diamond);
  box-shadow: 0 0 8px var(--color-diamond);
}

.spinner-block:nth-child(3) {
  animation-delay: 0.4s;
  background: var(--color-emerald);
  box-shadow: 0 0 8px var(--color-emerald);
}

@keyframes spinnerJump {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-24px); }
}

/* Dynamic floating visual emotes (heart / smileys) */
.floating-effect-holder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}

.floating-text-effect {
  position: absolute;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
  font-size: 1.2rem;
  animation: floatFadeOut 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-emoji {
  position: absolute;
  font-size: 2.2rem;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
  animation: floatEmoji 1.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes floatFadeOut {
  0% { transform: translateY(120px) scale(0.6); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: translateY(-40px) scale(1.1); opacity: 0; }
}

@keyframes floatEmoji {
  0% { transform: translateY(150px) translateX(0) scale(0.5) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-100px) translateX(var(--drift-x, 30px)) scale(1.3) rotate(var(--rot, 15deg)); opacity: 0; }
}

/* Card footer username tag */
.card-footer {
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4;
}

.video-card .username {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Lower Interaction Container */
.interaction-container {
  display: flex;
  gap: 20px;
  height: 200px;
}

.control-panel {
  flex: 1.3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: space-between;
}

/* Emoji / Action Dock */
.action-dock {
  display: flex;
  gap: 10px;
  width: 100%;
}

.action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: var(--glass-border);
  border-radius: 12px;
  padding: 12px 6px;
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.action-btn .emoji {
  font-size: 1.6rem;
  transition: transform 0.2s ease;
}

.action-btn .action-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-secondary);
}

.action-btn:hover {
  background: rgba(255, 170, 0, 0.1);
  border-color: var(--color-gold-glowing);
  transform: translateY(-4px);
}

.action-btn:hover .emoji {
  transform: scale(1.2);
}

.action-btn.pvp:hover {
  background: rgba(255, 23, 68, 0.15);
  border-color: var(--color-redstone);
}

/* Main Nav Navigation Controls (Stop & Next) */
.nav-controls {
  display: flex;
  gap: 16px;
}

.nav-btn {
  flex: 1;
  padding: 18px 24px;
  border-radius: 12px;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.stop-btn {
  background: rgba(255, 23, 68, 0.08);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: #ff5252;
}

.stop-btn:hover {
  background: rgba(255, 23, 68, 0.2);
  border-color: var(--color-redstone);
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.25);
  transform: translateY(-2px);
}

.next-btn {
  background: linear-gradient(135deg, var(--color-emerald) 0%, #00b0ff 100%);
  border: none;
  color: #000;
  box-shadow: 0 4px 15px rgba(0, 230, 118, 0.25);
  font-weight: 900;
}

.next-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.45);
  transform: translateY(-2px);
}

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

/* Chat Panel Area */
.chat-panel {
  flex: 1;
  background: var(--bg-card-glass);
  border: var(--glass-border);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,0.25);
}

.chat-header {
  padding: 12px 18px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#chat-connection-status {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
}
.status-searching { background: rgba(255, 170, 0, 0.15); color: var(--color-gold-glowing); }
.status-connected { background: rgba(0, 230, 118, 0.15); color: var(--color-emerald); }
.status-disconnected { background: rgba(255, 23, 68, 0.15); color: var(--color-redstone); }

.chat-history {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
  animation: messageSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chat-bubble.you {
  background: var(--bg-chat-bubble-user);
  border: 1px solid rgba(0, 229, 255, 0.2);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-bubble.stranger {
  background: var(--bg-chat-bubble-stranger);
  border: 1px solid rgba(255, 153, 0, 0.2);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.sender-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.chat-bubble.you .sender-name { color: var(--color-diamond); }
.chat-bubble.stranger .sender-name { color: var(--color-gold-glowing); }

.system-msg {
  text-align: center;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
  font-style: italic;
  margin: 4px 0;
}

@keyframes messageSlideIn {
  0% { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* Chat Input Field */
.chat-input-area {
  display: flex;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  gap: 8px;
}

.chat-input-area input {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 16px;
  color: #fff;
  outline: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.chat-input-area input:focus {
  border-color: var(--color-gold-glowing);
  background: rgba(255, 255, 255, 0.08);
}

.chat-input-area input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pixel-send-btn {
  background: var(--color-gold-glowing);
  border: 1.5px solid #000;
  box-shadow: inset -2px -2px 0px 0px #8b5000;
  color: #000;
  padding: 0 16px;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pixel-send-btn:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.pixel-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Queue Panel Styling */
.queue-panel {
  width: 90%;
  max-width: 320px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 12px 16px;
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}

.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 6px;
}

.queue-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-gold-glowing);
  letter-spacing: 0.5px;
}

.queue-badge {
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid rgba(0, 230, 118, 0.25);
  color: var(--color-emerald);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  animation: pulseGlow 1.8s infinite;
}

.queue-heads-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  flex-wrap: wrap;
}

.queue-head-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.queue-head-wrapper:hover {
  transform: scale(1.15) translateY(-2px);
  border-color: var(--color-gold-glowing);
  box-shadow: 0 4px 10px rgba(255, 170, 0, 0.3);
}

.queue-head-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated; /* Retro pixel alignment */
}

.queue-head-wrapper::after {
  content: attr(data-name);
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.45rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.queue-head-wrapper:hover::after {
  opacity: 1;
}

.queue-log {
  font-size: 0.68rem;
  color: var(--color-text-secondary);
  font-style: italic;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 14px;
}

/* Lobby Stats on Login Screen */
.lobby-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 8px 20px;
  margin-top: 14px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
}

.lobby-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.lobby-stat-item strong {
  color: var(--color-text-primary);
  font-weight: 700;
}

.lobby-stat-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
}

.indicator-yellow {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--color-gold-glowing);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold-glowing);
}

.indicator-yellow.pulse {
  animation: pulseGlow 1.5s infinite;
}

.indicator-blue {
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: #00bfff; /* Diamond blue */
  border-radius: 50%;
  box-shadow: 0 0 8px #00bfff;
}

.indicator-blue.pulse {
  animation: pulseGlow 1.6s infinite;
}

/* Helper Utilities */
.hidden {
  display: none !important;
}

.animate-enter {
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* RESPONSIVE LAYOUT (MOBILE AND TABLET OPTIMIZATIONS) */
@media (max-width: 900px) {
  #app-wrapper {
    height: 98vh;
    max-height: none;
  }
  
  .glass-panel {
    padding: 16px;
  }
  
  .login-box-container {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  .login-form {
    width: 100%;
  }
  
  .skin-preview-wrapper {
    width: 100%;
    order: -1; /* Place skin preview above form on mobile */
  }
  
  .preview-card {
    height: 280px;
  }
  
  .preview-renderer img {
    height: 180px;
  }

  /* Game Interface Stacking (OmeTV Mobile Redesign) */
  #main-screen {
    overflow-y: auto;
  }
  
  .main-screen-ometv {
    flex-direction: column !important;
    overflow-y: auto;
    padding: 10px;
    gap: 12px;
  }

  .ometv-sidebar {
    width: 100% !important;
    height: auto !important;
    flex-shrink: 0;
    gap: 10px;
  }

  .ometv-video-container {
    flex-direction: column;
    height: 480px;
    flex: none;
    gap: 10px;
    order: -1; /* Place video feeds above controls on mobile screens */
  }

  .ometv-video-container .video-card {
    height: 50% !important;
  }

  .ometv-sidebar .chat-panel {
    height: 220px;
    flex: none;
  }

  .ometv-sidebar .action-dock {
    padding: 4px 8px;
  }

  .ometv-sidebar .action-btn {
    padding: 6px 2px;
  }

  .minecraft-avatar {
    height: 85%;
    max-height: 150px;
  }
}

/* Live P2P WebRTC Video Feed Styling */
.video-feed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  z-index: 2;
  display: none; /* Hidden by default, shown when video is active */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.video-feed.active {
  display: block;
  opacity: 1;
}

/* Ensure the floating effects overlays and badges render on top of the live video stream */
.card-badge {
  z-index: 10 !important;
}

.floating-effect-holder {
  z-index: 8 !important;
}

.card-footer {
  z-index: 10 !important;
}

/* DEDICATED MATCHMAKING SCREEN */
#matchmaking-screen {
  display: none;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
}

#matchmaking-screen.active {
  display: flex;
}

.matchmaking-portal-container {
  display: flex;
  width: 100%;
  justify-content: space-around;
  align-items: center;
  margin: 32px 0;
  gap: 32px;
}

.match-player-card {
  flex: 1;
  max-width: 260px;
  height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--glass-card-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-card-shadow);
  backdrop-filter: var(--glass-blur);
}

.match-player-card .badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--color-gold);
  color: #000;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.match-player-card.you .badge {
  background: var(--color-diamond);
}

.match-player-card .match-avatar-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  width: 100%;
}

.match-player-card .match-avatar-wrapper img {
  height: 230px;
  object-fit: contain;
  animation: idleBobbing 3s ease-in-out infinite;
}

.match-player-card .match-username {
  font-family: var(--font-title);
  color: #fff;
  font-size: 1.35rem;
  margin-top: 12px;
  font-weight: 700;
  text-shadow: var(--minecraft-shadow);
  text-transform: uppercase;
}

/* Stranger Silhouette Overlay */
.stranger-silhouette img {
  filter: brightness(0) drop-shadow(0 0 15px var(--color-gold-glowing));
}

/* Portal Vortex in Center */
.portal-vortex-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.portal-vortex {
  position: relative;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, #501d7a 20%, #15002b 70%, #000 100%);
  box-shadow: 0 0 35px rgba(142, 68, 173, 0.8), inset 0 0 25px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 4px solid #4a156e;
}

.portal-layer {
  position: absolute;
  width: 140%;
  height: 140%;
  border-radius: 40%;
  background: repeating-linear-gradient(45deg, rgba(142, 68, 173, 0.15) 0px, rgba(142, 68, 173, 0.15) 20px, rgba(74, 21, 110, 0.25) 20px, rgba(74, 21, 110, 0.25) 40px);
}

.portal-layer.layer1 {
  animation: rotatePortal 12s linear infinite;
}

.portal-layer.layer2 {
  width: 115%;
  height: 115%;
  border-radius: 35%;
  background: radial-gradient(circle, rgba(155, 89, 182, 0.25) 10%, transparent 60%);
  animation: rotatePortalInverse 7s linear infinite;
}

.portal-layer.layer3 {
  width: 95%;
  height: 95%;
  border-radius: 45%;
  background: repeating-radial-gradient(circle, rgba(74, 21, 110, 0.12) 0px, rgba(74, 21, 110, 0.12) 10px, rgba(155, 89, 182, 0.12) 10px, rgba(155, 89, 182, 0.12) 20px);
  animation: rotatePortal 4.5s linear infinite;
}

@keyframes rotatePortal {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes rotatePortalInverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

.portal-status {
  font-family: var(--font-title);
  color: var(--color-gold);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: goldPulse 1.5s infinite ease-in-out;
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
}

@keyframes goldPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; text-shadow: 0 0 18px rgba(255, 215, 0, 0.7); }
}

/* Matchmaking Details Console */
.matchmaking-details {
  width: 100%;
  border-radius: 16px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 24px;
}

.details-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-gold);
  font-family: var(--font-title);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.pulse-indicator-gold {
  width: 8px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--color-gold);
  animation: pulseGlowGold 1.5s infinite;
}

@keyframes pulseGlowGold {
  0%, 100% { transform: scale(1); box-shadow: 0 0 8px var(--color-gold); }
  50% { transform: scale(1.2); box-shadow: 0 0 16px var(--color-gold); }
}

.details-queue-heads {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  min-height: 24px;
}

.details-queue-heads img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  animation: idleBobbing 3s ease-in-out infinite;
}

.details-log {
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  max-height: 60px;
  overflow-y: auto;
  line-height: 1.55;
  text-align: left;
  white-space: pre-line;
}

/* Cancel Matchmaking Button */
.cancel-btn {
  width: auto;
  padding: 14px 44px;
  font-size: 1.1rem;
}

.cancel-btn.red-border {
  border-color: #ff3333;
}

.cancel-btn.red-border::after {
  background: #ff3333;
}

.cancel-btn.red-border:hover span {
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.65);
}

/* AUTHENTICATION GATE (LOGIN / REGISTER) */
#auth-container {
  display: flex;
  flex-direction: column;
  max-width: 480px;
  width: 100%;
  padding: 32px;
  border-radius: 20px;
  margin: 32px auto;
  gap: 24px;
  background: var(--glass-card-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-card-shadow);
  backdrop-filter: var(--glass-blur);
  animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#auth-container.hidden {
  display: none;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 8px;
  gap: 16px;
  justify-content: center;
}

.auth-tab-btn {
  background: none;
  border: none;
  color: var(--color-text-secondary);
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 800;
  padding: 10px 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  border-bottom: 3px solid transparent;
  outline: none;
}

.auth-tab-btn:hover {
  color: #fff;
}

.auth-tab-btn.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.auth-form.active {
  display: flex;
}

.auth-form .input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .input-group label {
  font-family: var(--font-title);
  color: var(--color-gold);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.auth-form .input-group input {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 16px;
  border-radius: 8px;
  outline: none;
  transition: all 0.25s ease;
  width: 100%;
}

.auth-form .input-group input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.25);
}

.auth-error-msg {
  color: #ff3333;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  min-height: 24px;
  text-shadow: 0 0 8px rgba(255, 51, 51, 0.25);
}

/* Hide matchmaking controls panel until logged in */
.login-box-container {
  display: none !important;
}

.login-box-container.active {
  display: flex !important;
}

/* Red Hover styling for Logout button */
.shuffle-skin-btn.red-hover:hover {
  background: #ff3333 !important;
  color: #ffffff !important;
  border-color: #ff3333 !important;
  box-shadow: 0 0 15px rgba(255, 51, 51, 0.45) !important;
}

/* Discord Authentication Layout */
.discord-auth-layout {
  padding: 30px !important;
  max-width: 440px !important;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-header-title {
  text-align: center;
  margin-bottom: 5px;
}

.discord-badge {
  display: inline-block;
  background: rgba(88, 101, 242, 0.15);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  box-shadow: 0 0 10px rgba(88, 101, 242, 0.1);
}

.auth-header-title h2 {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-text-primary);
  margin-bottom: 6px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.auth-header-title p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

/* Key login form styling */
#key-login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.discord-blue-btn {
  background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%) !important;
  border: 1px solid rgba(88, 101, 242, 0.4) !important;
  color: white !important;
  transition: all 0.3s ease !important;
}

.discord-blue-btn:hover {
  background: linear-gradient(135deg, #4752C4 0%, #3C45A5 100%) !important;
  box-shadow: 0 0 20px rgba(88, 101, 242, 0.45) !important;
  transform: translateY(-2px);
}

/* Discord Promo Card */
.discord-promo-card {
  background: rgba(15, 18, 26, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.05) !important;
  border-radius: 12px;
  padding: 18px !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.discord-logo-svg {
  fill: #5865F2;
  transition: transform 0.3s ease;
}

.discord-promo-card:hover .discord-logo-svg {
  transform: scale(1.1) rotate(-8deg);
}

.discord-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discord-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: rgba(88, 101, 242, 0.2);
  color: #5865F2;
  border: 1px solid rgba(88, 101, 242, 0.3);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Discord Join Button */
.discord-join-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  background: rgba(88, 101, 242, 0.1) !important;
  border: 1px dashed rgba(88, 101, 242, 0.4) !important;
  border-radius: 6px;
  color: #5865F2;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-align: center;
}

.discord-join-btn:hover {
  background: rgba(88, 101, 242, 0.2) !important;
  border-style: solid !important;
  box-shadow: 0 0 15px rgba(88, 101, 242, 0.25) !important;
  transform: scale(1.02);
}

/* ====================================================
   CAMERA & MICROPHONE PERMISSION REQUEST MODAL
   ==================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal-content {
  width: 90%;
  max-width: 500px;
  background: var(--bg-card-glass);
  border: 2px solid var(--color-gold-border);
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 170, 0, 0.15);
}

.modal-header-title {
  margin-bottom: 18px;
}

.modal-header-title h2 {
  font-family: var(--font-title);
  color: var(--color-text-primary);
  font-size: 1.8rem;
  font-weight: 900;
  margin-top: 10px;
  text-transform: uppercase;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge-warning {
  background: rgba(255, 23, 68, 0.2);
  color: var(--color-redstone);
  border: 1px solid rgba(255, 23, 68, 0.4);
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.1);
}

.modal-instruction-text {
  color: var(--color-text-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.permission-steps-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
  text-align: left;
}

.permission-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.permission-step-item .icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: -1px;
}

.permission-step-item span {
  color: var(--color-text-primary);
  font-size: 0.92rem;
  line-height: 1.5;
}

.permission-step-item strong {
  color: var(--color-gold-glowing);
}

.modal-btn-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.modal-btn-row .pixel-btn {
  width: 100%;
  padding: 16px;
  font-size: 1.1rem;
}

.modal-btn-row .shuffle-skin-btn {
  width: 100%;
  padding: 12px;
  justify-content: center;
}

@keyframes ownerNameGlow {
  0% { filter: hue-rotate(0deg) drop-shadow(0 0 2px rgba(255, 170, 0, 0.4)); }
  50% { filter: hue-rotate(20deg) drop-shadow(0 0 6px rgba(255, 85, 85, 0.6)); }
  100% { filter: hue-rotate(0deg) drop-shadow(0 0 2px rgba(255, 170, 0, 0.4)); }
}

.chat-bubble .message-text {
  word-break: break-word;
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--color-text-primary);
}

/* OmeTV Speech Bubble Logo Branding */
.ometv-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ometv-bubble {
  position: relative;
  background: #007aff; /* OmeTV Blue */
  border-radius: 40px;
  padding: 14px 34px;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 3.2rem;
  letter-spacing: -1.5px;
  box-shadow: 0 8px 30px rgba(0, 122, 255, 0.35);
  display: flex;
  align-items: center;
  text-transform: uppercase;
}

.ometv-bubble::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 45px;
  border-width: 12px 12px 0;
  border-style: solid;
  border-color: #007aff transparent;
  display: block;
  width: 0;
}

.logo-ome-text {
  color: #fff;
}

.logo-tv-text {
  color: #ffd60a; /* Yellow screen contrast like OmeTV logo */
  text-shadow: 0 0 15px rgba(255, 214, 10, 0.4);
}

/* Conical OmeTV Circular Radar Search Scanner */
.ometv-radar-scanner {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 2px solid rgba(0, 122, 255, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, rgba(0, 122, 255, 0.08) 0%, rgba(0, 0, 0, 0.6) 100%);
  box-shadow: 0 0 40px rgba(0, 122, 255, 0.25);
  overflow: hidden;
  z-index: 5;
}

.ometv-radar-scanner::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg, rgba(0, 122, 255, 0.7) 0deg, rgba(0, 122, 255, 0) 180deg);
  border-radius: 50%;
  animation: radarSweep 2.2s linear infinite;
  mask: radial-gradient(circle, transparent 30%, black 30%);
  -webkit-mask: radial-gradient(circle, transparent 30%, black 30%);
}

.ometv-radar-circle {
  position: absolute;
  border: 1px dashed rgba(0, 122, 255, 0.35);
  border-radius: 50%;
}
.ometv-radar-circle.c1 { width: 75%; height: 75%; }
.ometv-radar-circle.c2 { width: 45%; height: 45%; }

.ometv-radar-crosshair-h {
  position: absolute;
  width: 90%;
  height: 1px;
  background: linear-gradient(90deg, rgba(0,122,255,0) 0%, rgba(0,122,255,0.4) 50%, rgba(0,122,255,0) 100%);
}
.ometv-radar-crosshair-v {
  position: absolute;
  width: 1px;
  height: 90%;
  background: linear-gradient(180deg, rgba(0,122,255,0) 0%, rgba(0,122,255,0.4) 50%, rgba(0,122,255,0) 100%);
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* OmeTV Flat Solid Button Overrides */
.nav-btn {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0.5px;
  border: none !important;
  text-transform: uppercase;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.stop-btn {
  background: #ff3b30 !important; /* Authentic Stop Red */
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(255, 59, 48, 0.25) !important;
}

.stop-btn:hover {
  background: #e02d22 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(255, 59, 48, 0.4) !important;
}

.next-btn {
  background: #007aff !important; /* Authentic OmeTV blue */
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25) !important;
}

.next-btn:hover {
  background: #0066d6 !important;
  filter: none !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(0, 122, 255, 0.4) !important;
}

/* Adjust searching overlay inside video feed to use new radar */
.searching-overlay {
  background: radial-gradient(circle at center, #0a0e17 0%, #03050a 100%) !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

/* Center the spinner/radar inside the overlay */
.searching-overlay .minecraft-spinner {
  display: none !important; /* Hide old spinner block */
}

/* Position text beautifully under radar spinner */
#searching-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  z-index: 5;
  margin-top: 10px;
}



/* ==========================================================================
   VOICE ACTIVITY DETECTION & SPEAKING EFFECTS
   ========================================================================== */
.video-card.speaking {
  border-color: #00e676 !important;
  transform: translateY(-2px) scale(1.005);
}

.video-card.speaking .avatar-holder {
  box-shadow: inset 0 0 0 5px #00e676, 0 0 25px rgba(0, 230, 118, 0.5) !important;
  background: radial-gradient(circle at center, rgba(0, 230, 118, 0.18) 0%, #0a0d14 100%) !important;
}

.video-card.speaking .glow-bg {
  background: #00e676 !important;
  opacity: 0.9 !important;
  filter: blur(30px) !important;
}
