/* ===================================================
   МЕЖДУ НАМИ — STYLESHEET
   Bright, beautiful, romantic & neon nightclub aesthetic
   =================================================== */

:root {
  --bg-main: #0c0714;
  --bg-card: rgba(26, 16, 43, 0.85);
  --bg-card-border: rgba(255, 42, 109, 0.25);
  --neon-pink: #ff2a6d;
  --neon-cyan: #05d9e8;
  --neon-gold: #ffd700;
  --neon-purple: #9d4edd;
  --ruby-red: #d90429;
  --ruby-glow: 0 0 15px rgba(217, 4, 41, 0.6);
  --gold-glow: 0 0 20px rgba(255, 215, 0, 0.7);
  --pink-glow: 0 0 20px rgba(255, 42, 109, 0.6);
  --cyan-glow: 0 0 18px rgba(5, 217, 232, 0.5);
  --text-main: #ffffff;
  --text-muted: #b8b5c9;
  --font-main: 'Montserrat', sans-serif;
  --font-logo: 'Pacifico', cursive;
  --table-felt: #1a0f26;
  --table-border: #4a2266;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(255, 42, 109, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(5, 217, 232, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(157, 78, 221, 0.08) 0%, transparent 60%);
}

/* App Container */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ================= HEADER ================= */
.app-header {
  height: 72px;
  background: rgba(18, 10, 31, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 42, 109, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
}

.header-left, .header-center, .header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.logo-icon {
  font-size: 32px;
  animation: heartPulse 2s infinite ease-in-out;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(255, 42, 109, 0.6)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(255, 42, 109, 0.9)); }
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-logo);
  font-size: 24px;
  color: #fff;
  background: linear-gradient(45deg, #ff2a6d, #ff9e00, #ff007f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(255, 42, 109, 0.4);
}

.logo-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Buttons in Header */
.btn-header {
  background: rgba(43, 26, 68, 0.6);
  border: 1px solid rgba(255, 42, 109, 0.3);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header:hover {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--neon-pink);
  transform: translateY(-1px);
  box-shadow: var(--pink-glow);
}

.btn-header .badge {
  background: var(--neon-pink);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}

.btn-bonus {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.2), rgba(255, 215, 0, 0.2));
  border-color: rgba(255, 215, 0, 0.4);
}

.badge-gold {
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  color: #1a0022;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  box-shadow: var(--gold-glow);
}

/* Ruby Balance Card in Header */
.ruby-balance-card {
  background: linear-gradient(135deg, #360714, #540b22) !important;
  border: 1.5px solid #ff003c !important;
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.5) !important;
  padding: 6px 14px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ruby-balance-card:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 0, 60, 0.8) !important;
}

/* RED RUBIES - Crimson Faceted Gem */
.ruby-icon, .red-ruby {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  animation: rubyFloat 3s infinite ease-in-out;
}

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

.ruby-val {
  font-weight: 800;
  font-size: 15px;
  color: #ff4d6d !important;
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.8);
  letter-spacing: 0.5px;
}

/* Logout buttons */
.btn-logout-header {
  background: rgba(255, 77, 109, 0.15) !important;
  border-color: rgba(255, 77, 109, 0.3) !important;
  color: #ffb3c1 !important;
}

.btn-logout-header:hover {
  background: rgba(217, 4, 41, 0.4) !important;
  border-color: #ff003c !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(255, 0, 60, 0.5) !important;
}

.btn-profile-logout {
  background: rgba(217, 4, 41, 0.2) !important;
  border-color: #ff4d6d !important;
  color: #ffd1dc !important;
}

.btn-profile-logout:hover {
  background: #d90429 !important;
  color: #fff !important;
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.6) !important;
}

.btn-topup-plus {
  background: var(--neon-pink);
  color: #fff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 42, 109, 0.8);
}

/* User Profile Snippet in Header */
.user-header-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 6px;
  border-radius: 24px;
  background: rgba(35, 21, 58, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-header-profile:hover {
  background: rgba(50, 30, 80, 0.85);
  border-color: rgba(255, 255, 255, 0.25);
}

.user-header-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  background: #1a0f26;
}

.user-header-avatar.admin-glow {
  border-color: var(--neon-gold) !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.85), 0 0 32px rgba(255, 140, 0, 0.6) !important;
  animation: goldBacklight 2.2s infinite alternate ease-in-out !important;
}

@keyframes goldBacklight {
  0% {
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.7), 0 0 25px rgba(255, 140, 0, 0.5);
  }
  50% {
    border-color: #fff275;
    box-shadow: 0 0 24px rgba(255, 215, 0, 1), 0 0 42px rgba(255, 180, 0, 0.85);
  }
  100% {
    border-color: #ffd700;
    box-shadow: 0 0 14px rgba(255, 215, 0, 0.75), 0 0 28px rgba(255, 140, 0, 0.55);
  }
}

.user-header-details {
  display: flex;
  flex-direction: column;
}

.user-header-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  max-width: 140px;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role-badge {
  font-size: 10px;
  color: var(--text-muted);
}

.user-role-badge.admin-text {
  color: var(--neon-gold);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.btn-admin-toggle {
  background: rgba(255, 215, 0, 0.15);
  border-color: var(--neon-gold);
  color: var(--neon-gold);
  padding: 8px 12px;
}

.btn-admin-toggle:hover {
  background: rgba(255, 215, 0, 0.3);
  box-shadow: var(--gold-glow);
}

.btn-admin-header-nav {
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
  transition: all 0.25s ease;
}

.btn-admin-header-nav.hidden,
.btn-admin-toggle.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Royal Blue for Admin (#4169e1) - strictly reserved for Administrator */
.admin-royal-blue {
  color: #4169e1 !important;
  text-shadow: 0 0 10px rgba(65, 105, 225, 0.6) !important;
}

.chat-msg-bubble.admin-chat-bubble {
  color: #4169e1 !important;
  font-weight: 600;
}

.wa-bubble.admin-pm-bubble {
  color: #4169e1 !important;
  font-weight: 600;
}

.btn-admin-header-nav:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.btn-admin-header-nav.is-admin-active {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 170, 0, 0.25));
  border-color: #ffd700;
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.7);
  font-weight: 700;
}

.admin-auth-error {
  background: rgba(255, 59, 48, 0.18);
  border: 1px solid rgba(255, 59, 48, 0.5);
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  margin-bottom: 14px;
  font-weight: 600;
  animation: fadeIn 0.2s ease-out;
}

/* ================= MAIN CONTENT LAYOUT ================= */
.main-content {
  display: flex;
  flex: 1;
  height: calc(100vh - 72px);
  overflow: hidden;
}

/* ================= 12-SEAT TABLE SECTION (MEDITERRANEAN SEASIDE GAZEBO WITH TURQUOISE SOFAS & OVAL TABLE) ================= */
.table-section {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background: #142a38;
  overflow: hidden;
  perspective: 1200px;
}

/* ================= GAZEBO ENVIRONMENT (ТОЧНО КАК НА ФОТО ПОЛЬЗОВАТЕЛЯ) ================= */
.gazebo-environment {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

/* Background Layer: High Resolution 1536x1024 Seaside Gazebo Lounge from User Photo */
.gazebo-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../assets/gazebo_room_hd.webp') center 48% / cover no-repeat;
  filter: contrast(1.02) saturate(1.06);
}

/* Subtle Warm Sea Breeze Overlay */
.gazebo-light-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(255, 235, 190, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Ambient glow under table */
.table-ambience {
  position: absolute;
  width: 620px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 180, 216, 0.3) 0%, rgba(15, 163, 177, 0.15) 50%, transparent 75%);
  pointer-events: none;
  filter: blur(40px);
  z-index: 2;
}

/* ================= ARENA WRAPPER (OVAL PROPORTIONS) ================= */
.arena-wrapper {
  position: relative;
  width: 860px;
  height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  z-index: 10;
}

/* Seats Container */
.seats-container {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

/* Individual Seat */
.seat-item {
  position: absolute;
  width: 110px;
  height: 112px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.25s ease, filter 0.25s ease;
  z-index: 25;
}

.seat-item:hover {
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 35;
}

/* ================= PLAYER SPOT: БЕЗ РАМКИ, ПРОСТО АВАТАР, ИМЯ И ВОЗРАСТ ================= */
.player-spot,
.seat-sofa-module {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Hide any legacy sofa cushions, pillows, or frames — strictly frameless */
.sofa-cushion-seat,
.sofa-throw-pillow,
.sofa-tuft-point {
  display: none !important;
}

.empty-seat-plus {
  font-size: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 300;
  line-height: 1;
}

/* Empty Seat Sofa Icon */
.sofa-empty-icon {
  font-size: 26px;
  opacity: 0.75;
}

/* ================= FRAMELESS AVATARS (АВАТАРКИ БЕЗ РАМКИ) ================= */
.avatar-ring,
.avatar-ring.frameless,
.player-avatar-circle {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  border: none !important;
  outline: none !important;
  background: transparent;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.avatar-ring svg, .avatar-ring img,
.player-avatar-circle svg, .player-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: none !important;
}

.avatar-ring.empty-seat {
  background: transparent;
  border: none !important;
  box-shadow: none !important;
}

.seat-item.is-human .avatar-ring {
  border: none !important;
}

.seat-item.is-admin .avatar-ring,
.profile-avatar-frame.admin-glow,
.chat-msg-avatar.admin-glow,
.player-avatar-circle.admin-glow,
.user-header-avatar.admin-glow,
.lead-avatar.admin-glow {
  border: none !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.95), 0 0 32px rgba(255, 165, 0, 0.75) !important;
  animation: goldBacklight 2.2s infinite alternate ease-in-out !important;
}

@keyframes goldBacklight {
  from { box-shadow: 0 0 10px rgba(255, 215, 0, 0.75), 0 0 20px rgba(255, 140, 0, 0.5); }
  to { box-shadow: 0 0 24px rgba(255, 215, 0, 1), 0 0 42px rgba(255, 140, 0, 0.9); }
}

/* Active Turn & Target Spotlights - glowing aura on frameless avatar */
.seat-item.is-spinner .player-avatar-circle {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.95), 0 0 38px rgba(255, 215, 0, 0.75) !important;
  animation: spinnerPulse 1.2s infinite alternate ease-in-out;
}

.seat-item.is-target .player-avatar-circle {
  box-shadow: 0 0 25px rgba(255, 42, 109, 1), 0 0 45px rgba(255, 42, 109, 0.85), 0 0 16px #ffd700 !important;
  animation: targetPulse 0.7s infinite alternate ease-in-out;
}

@keyframes spinnerPulse {
  0% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.5); }
  100% { box-shadow: 0 0 32px rgba(255, 215, 0, 1), 0 0 48px rgba(255, 215, 0, 0.8); }
}

@keyframes targetPulse {
  0% { box-shadow: 0 0 15px rgba(255, 42, 109, 0.7); }
  100% { box-shadow: 0 0 40px rgba(255, 42, 109, 1), 0 0 52px rgba(255, 215, 0, 0.9); }
}

/* Seat Floating Gift Badge */
.seat-gift-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  background: rgba(20, 15, 30, 0.95);
  border: 1px solid #ffd700;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  animation: none !important;
  z-index: 25;
}

/* "Подарки из категории напитки, еда и цветы добавляются на аватарку на месте игрока в правом нижнем углу, их хорошо видно. Не исчезают, пока игрок не получит другой подарок из этой категории." */
.player-avatar-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible !important;
}

.player-avatar-wrap .seat-corner-gifts-cluster,
.seat-corner-gifts-cluster {
  position: absolute;
  bottom: -6px;
  right: -14px;
  display: flex;
  align-items: center;
  z-index: 45;
  pointer-events: auto;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.9));
}

.player-avatar-wrap .seat-gift-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 45;
}

.corner-gift-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2e1744, #120520);
  border: 2.5px solid #ffd700;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.95), 0 0 16px rgba(255, 215, 0, 0.8);
  margin-left: -10px;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), z-index 0.2s;
  cursor: pointer;
  animation: cornerGiftPop 0.4s ease-out;
}

.corner-gift-badge:first-child {
  margin-left: 0;
}

.corner-gift-badge:hover {
  transform: scale(1.4) translateY(-4px);
  z-index: 55;
}

.corner-gift-badge.drinks-badge {
  border-color: #00f0ff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.95), 0 0 16px rgba(0, 240, 255, 0.9);
}

.corner-gift-badge.food-badge {
  border-color: #ff9f1c;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.95), 0 0 16px rgba(255, 159, 28, 0.9);
}

.corner-gift-badge.flowers-badge {
  border-color: #ff2a6d;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.95), 0 0 16px rgba(255, 42, 109, 0.9);
}

/* Seat Floating Gift Badge (Large & Bright) */
.seat-gift-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2e1744, #120520);
  border: 2px solid #ffd700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 14px rgba(255, 215, 0, 0.75);
  animation: none !important;
  z-index: 45;
}

@keyframes cornerGiftPop {
  0% { transform: scale(0.2) rotate(-20deg); opacity: 0; }
  70% { transform: scale(1.2) rotate(10deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* "Подарки из категории головные уборы одеваются на аватарку. Верхний правый угол, наискосок без рамок и свечения. Все подарки на прозрачном фоне. Чтобы было ощущение, что головной убор одет на аватар." */
.avatar-worn-headwear {
  position: absolute;
  top: -27px;
  left: -2px;
  width: 64px;
  height: 64px;
  z-index: 48;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  transform: rotate(-30deg) scale(1.12);
  transform-origin: 50% 70%;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s ease;
  user-select: none;
}

.avatar-worn-headwear.hat-behind {
  z-index: 4 !important;
}

.avatar-worn-headwear-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  pointer-events: none;
  user-select: none;
}

.avatar-worn-headwear.text-icon {
  font-size: 38px;
  line-height: 1;
}

/* Worn headwear on profile modal avatar (124px avatar) */
.profile-avatar-frame {
  position: relative !important;
  overflow: visible !important;
}

.profile-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #140b20;
  position: relative;
  z-index: 5;
}

.avatar-worn-headwear.profile-headwear {
  top: -45px;
  left: -3px;
  width: 108px;
  height: 108px;
  transform: rotate(-30deg) scale(1.12);
  transform-origin: 50% 70%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.7));
}

/* Header Avatar (38px avatar) */
.user-header-avatar {
  position: relative !important;
  overflow: visible !important;
}

.header-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  z-index: 5;
}

.avatar-worn-headwear.header-headwear {
  top: -14px;
  left: -1px;
  width: 33px;
  height: 33px;
  transform: rotate(-30deg) scale(1.12);
  transform-origin: 50% 70%;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.55));
}

/* ===== ГОРИЗОНТАЛЬНАЯ ЛЕНТА: категория «Головные уборы» ===== */
.gifts-grid-scroll.hats-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  grid-template-columns: none;
  gap: 12px;
  max-height: 300px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding: 16px;
}

.gifts-grid-scroll.hats-horizontal .gift-card {
  flex: 0 0 148px;
  min-width: 148px;
  scroll-snap-align: start;
}

.gifts-grid-scroll.hats-horizontal .gift-card-img {
  width: 96px;
  height: 96px;
}

.gifts-grid-scroll.hats-horizontal::-webkit-scrollbar {
  height: 8px;
}

.gifts-grid-scroll.hats-horizontal::-webkit-scrollbar-thumb {
  background: rgba(255, 42, 109, 0.45);
  border-radius: 4px;
}

.gifts-grid-scroll.hats-horizontal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
}

/* ===== ВЕРТИКАЛЬНОЕ МЕНЮ: категория «Головные уборы» (список колонкой) ===== */
.profile-collection-section {
  display: none; /* в профиле показываем только счётчики, без коллекции полученных подарков */
}
.gifts-grid-scroll.hats-vertical {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  grid-template-columns: none;
  gap: 10px;
  max-height: 420px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px;
}

.gifts-grid-scroll.hats-vertical .gift-card {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 12px;
  text-align: left;
  width: 100%;
}

.gifts-grid-scroll.hats-vertical .gift-card-img {
  width: 64px;
  height: 64px;
  margin-bottom: 0;
  flex: 0 0 64px;
}

.gifts-grid-scroll.hats-vertical .gift-card-icon {
  margin-bottom: 0;
  font-size: 30px;
}

.gifts-grid-scroll.hats-vertical .gift-card-name {
  height: auto;
  margin-bottom: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
  text-align: left;
  font-size: 12px;
}

.gifts-grid-scroll.hats-vertical .gift-card-price {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.gifts-grid-scroll.hats-vertical .btn-send-gift-act {
  flex: 0 0 auto;
  margin-left: 4px;
}

/* Gift Card in Catalog Modal */
.gift-card-img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  margin-bottom: 6px;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.65));
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-card:hover .gift-card-img {
  transform: scale(1.12) rotate(-6deg);
}

.gift-card:hover .gift-card-img {
  transform: scale(1.12) rotate(4deg);
}

/* Collected gift chips in profile */
.chip-gift-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 4px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

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

/* ================= TABLE SEATS: PLAYER SPOT & LABEL (СТРОГО В ОДНУ СТРОЧКУ) ================= */
.player-spot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 100px;
  position: relative;
}

.player-avatar-circle {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  border: none !important;
  outline: none !important;
  background: transparent;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 5;
}

.player-avatar-circle svg,
.player-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  border: none !important;
}

/* ================= EMPTY SEAT STYLING (МЕСТА ИГРОКОВ ЗА СТОЛОМ) ================= */
.player-avatar-circle.empty-seat {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.seat-item:hover .player-avatar-circle.empty-seat {
  background: rgba(255, 42, 109, 0.25);
  border-color: rgba(255, 215, 0, 0.8) !important;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
  transform: scale(1.08);
}

.empty-seat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* Frameless Seat Label - Strictly 1 Line (Ник и возраст крупнее, строго в одну строчку) */
.player-label-wrap {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
  margin-top: 5px;
  max-width: 180px;
  text-align: center;
  pointer-events: auto !important;
  cursor: pointer;
  line-height: 1.2;
  padding: 2px 6px;
  border-radius: 12px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.player-label-wrap:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.player-nickname-single {
  display: inline-block;
  white-space: nowrap !important;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.9);
  vertical-align: middle;
}

.player-age-single {
  display: inline-block;
  white-space: nowrap !important;
  font-size: 13px;
  font-weight: 800;
  color: #f2f2f2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.85);
  flex-shrink: 0;
  vertical-align: middle;
}

.player-name-age {
  display: inline-block;
  white-space: nowrap !important;
  max-width: 145px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 0 8px rgba(0, 0, 0, 0.9);
  vertical-align: middle;
}

/* Legacy Seat Plate fallback */
.seat-name-plate {
  margin-top: 4px;
  background: rgba(10, 30, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  max-width: 125px;
  z-index: 6;
  backdrop-filter: blur(4px);
}

.seat-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-gender-icon {
  font-size: 10px;
}

.seat-admin-crown {
  color: var(--neon-gold);
  font-size: 11px;
}

/* ================= OVAL RUSTIC WOODEN TABLE (ТОЧНО КАК НА ФОТО ПОЛЬЗОВАТЕЛЯ, БЕЗ НАДПИСИ) ================= */
.table-surface,
.table-surface.table-rustic-wood,
.table-surface.table-gazebo-oval {
  position: relative;
  width: 530px;
  height: 315px;
  border-radius: 50%;
  
  /* Natural warm rustic wood plank texture from user photo */
  background: 
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.35) 100%),
    url('../assets/rustic_wood_table.webp') center/cover no-repeat;
  
  /* Solid warm rustic dark timber border */
  border: 8px solid #5a3416;
  outline: 3px solid #361f0d;
  box-shadow: 
    /* 3D solid edge thickness */
    0 4px 0 #281406,
    0 8px 0 #1c0e04,
    0 16px 28px rgba(0, 0, 0, 0.75),
    /* Warm timber ambient glow */
    0 0 30px rgba(90, 52, 22, 0.35),
    /* Inner shadow along wood planks edge */
    inset 0 3px 12px rgba(0, 0, 0, 0.7),
    inset 0 0 25px rgba(25, 12, 4, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  transition: all 0.3s ease;
  z-index: 10;
}

/* ================= BOTTLE STAGE ================= */
.bottle-center-stage {
  position: absolute;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 18;
  cursor: pointer;
}

.bottle-shadow {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.75) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.bottle-shadow.is-spinning {
  width: 125px;
  height: 125px;
  filter: blur(12px);
  opacity: 0.9;
  animation: shadowPulse 0.4s infinite alternate ease-in-out;
}

@keyframes shadowPulse {
  0% { transform: scale(0.95); opacity: 0.75; }
  100% { transform: scale(1.08); opacity: 0.95; }
}

/* Glowing Spinning Vortex Ring on Table */
.bottle-spin-vortex {
  position: absolute;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 42, 109, 0.55);
  box-shadow: 0 0 35px rgba(255, 42, 109, 0.4), inset 0 0 25px rgba(255, 215, 0, 0.3);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  animation: vortexSpin 1.2s infinite linear;
  z-index: 6;
}

.bottle-spin-vortex.active {
  opacity: 1;
}

@keyframes vortexSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.gem-spark-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ffd700, #ff2a6d);
  box-shadow: 0 0 10px #ff2a6d, 0 0 15px #ffd700;
  pointer-events: none;
  z-index: 25;
  animation: gemSparkFade 0.7s forwards ease-out;
}

@keyframes gemSparkFade {
  0% { transform: translate(0, 0) scale(1.2); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0.2); opacity: 0; }
}



.bottle-spin-hint {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff2a6d, #d90429);
  color: #ffffff;
  border: 1.5px solid #ffd700;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 0 18px rgba(255, 42, 109, 0.85), 0 0 8px rgba(255, 215, 0, 0.7);
  pointer-events: none;
  z-index: 35;
  animation: hintBouncePulse 1.2s infinite alternate ease-in-out;
}

@keyframes hintBouncePulse {
  0% { transform: translateX(-50%) translateY(0); box-shadow: 0 0 12px rgba(255, 42, 109, 0.7); }
  100% { transform: translateX(-50%) translateY(-6px); box-shadow: 0 0 25px rgba(255, 42, 109, 1), 0 0 12px #ffd700; }
}

.bottle-wrapper {
  position: absolute;
  width: 72px;
  height: 228px;
  /* Rotation pivot is set exactly to bottle center */
  transform-origin: 50% 50%;
  transition: transform 0.05s linear;
  cursor: pointer;
}

.bottle-wrapper.can-spin {
  animation: bottleCanSpinGlow 1.3s infinite alternate ease-in-out;
}

@keyframes bottleCanSpinGlow {
  0% {
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(255, 42, 109, 0.6));
  }
  100% {
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 28px rgba(255, 42, 109, 1)) drop-shadow(0 0 36px rgba(255, 215, 0, 0.9));
  }
}

.bottle-wrapper.can-spin:hover {
  filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 36px #ff2a6d) drop-shadow(0 0 45px #ffd700) !important;
}

.bottle-wrapper.is-spinning {
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 24px rgba(255, 42, 109, 0.9)) drop-shadow(0 0 35px rgba(255, 215, 0, 0.8));
}

.bottle-wrapper.is-spinning .luxury-bottle-img {
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 16px rgba(255, 42, 109, 0.7)) blur(0.6px);
}

.luxury-bottle-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 12px rgba(255, 215, 0, 0.4));
  pointer-events: auto;
  cursor: pointer;
}

.ruby-pointer-arrow {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  line-height: 1;
  color: #ff1a53;
  text-shadow: 0 0 8px #ff1a53, 0 0 16px #ffd700;
  animation: rubyPointerPulse 1.4s infinite alternate ease-in-out;
  z-index: 12;
  pointer-events: none;
}

@keyframes rubyPointerPulse {
  0% { transform: translateX(-50%) translateY(0) scale(0.95); opacity: 0.8; }
  100% { transform: translateX(-50%) translateY(-3px) scale(1.2); opacity: 1; }
}

.bottle-svg {
  width: 100%;
  height: 100%;
}

/* ================= BOTTLE CONTROLS HUD ================= */
.bottle-controls-hud {
  position: absolute;
  bottom: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 25;
  width: 320px;
}

.turn-status-bar {
  background: rgba(20, 10, 32, 0.85);
  border: 1px solid rgba(255, 42, 109, 0.4);
  padding: 4px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.turn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-pink);
  box-shadow: 0 0 8px var(--neon-pink);
  animation: turnDotBlink 1s infinite alternate;
}

@keyframes turnDotBlink {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* Spin Button */
.btn-spin-action {
  background: linear-gradient(135deg, #ff2a6d, #ff007f);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 42, 109, 0.7);
  animation: spinBtnPulse 1.5s infinite alternate ease-in-out;
  transition: all 0.2s ease;
}

.btn-spin-action:hover {
  transform: scale(1.06);
  box-shadow: 0 0 35px rgba(255, 42, 109, 0.95);
}

@keyframes spinBtnPulse {
  from { transform: scale(1); box-shadow: 0 0 15px rgba(255, 42, 109, 0.6); }
  to { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 42, 109, 0.9); }
}

/* Decision Actions Box (Kiss / Slap) */
.decision-actions-box {
  background: rgba(18, 9, 32, 0.96);
  border: 2px solid var(--neon-pink);
  border-radius: 26px;
  padding: 10px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 0 35px rgba(255, 42, 109, 0.7), 0 0 15px rgba(255, 215, 0, 0.4);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 25;
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.decision-timer-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}

.decision-time-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #05d9e8, #ff2a6d);
  transition: width 1s linear;
}

.decision-buttons-row {
  display: flex;
  gap: 14px;
  width: 100%;
  justify-content: center;
}

.btn-decision {
  border: none;
  border-radius: 26px;
  padding: 11px 22px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
}

.btn-kiss {
  background: linear-gradient(135deg, #ff2a6d, #d90429);
  color: #fff;
  box-shadow: 0 0 18px rgba(255, 42, 109, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-kiss:hover:not(:disabled) {
  transform: scale(1.08);
  box-shadow: 0 0 28px rgba(255, 42, 109, 0.95), 0 0 12px #ffd700;
}

.btn-slap {
  background: linear-gradient(135deg, #495057, #212529);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.6);
}

.btn-slap:hover:not(:disabled) {
  background: linear-gradient(135deg, #f77f00, #d62828);
  transform: scale(1.08);
  box-shadow: 0 0 25px rgba(247, 127, 0, 0.85);
}

.btn-decision:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-decision.btn-chosen {
  background: linear-gradient(135deg, #00f0ff, #05d9e8) !important;
  color: #051622 !important;
  font-weight: 900 !important;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.95) !important;
  transform: scale(1.05) !important;
  border-color: #ffffff !important;
}

.btn-decision.btn-dimmed {
  opacity: 0.35 !important;
  transform: scale(0.92) !important;
}

.seat-item.is-target .player-avatar-circle {
  border-color: #ff2a6d !important;
  box-shadow: 0 0 25px #ff2a6d, 0 0 45px rgba(255, 215, 0, 0.9) !important;
  animation: targetSeatPulse 0.85s infinite alternate ease-in-out !important;
}

@keyframes targetSeatPulse {
  0% { transform: scale(1.05); }
  100% { transform: scale(1.22); }
}

.seat-item.is-spinner .player-avatar-circle {
  border-color: #05d9e8 !important;
  box-shadow: 0 0 20px #05d9e8, 0 0 35px rgba(5, 217, 232, 0.6) !important;
}

/* Outcome Result Banner */
.outcome-banner {
  background: rgba(18, 10, 30, 0.95);
  border: 2px solid var(--neon-gold);
  border-radius: 24px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  box-shadow: var(--gold-glow);
  animation: outcomePop 0.4s ease-out;
}

@keyframes outcomePop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ================= RIGHT SIDEBAR CHAT ================= */
.chat-sidebar {
  width: 360px;
  background: rgba(18, 10, 28, 0.92);
  backdrop-filter: blur(15px);
  border-left: 1px solid rgba(255, 42, 109, 0.2);
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: -4px 0 25px rgba(0, 0, 0, 0.6);
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(28, 16, 44, 0.6);
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.chat-quiz-pill {
  background: rgba(157, 78, 221, 0.25);
  border: 1px solid rgba(157, 78, 221, 0.5);
  padding: 4px 12px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
}

/* Active Quiz Banner in Chat */
.active-quiz-card {
  margin: 10px 12px 6px;
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.8), rgba(157, 78, 221, 0.6));
  border: 1.5px solid var(--neon-gold);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.35);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { transform: translateY(-15px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.quiz-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.quiz-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-gold);
}

.quiz-reward-badge {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid var(--neon-gold);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}

.quiz-question-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 8px;
}

.quiz-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.btn-quiz-opt {
  background: rgba(30, 15, 50, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-quiz-opt:hover {
  background: var(--neon-pink);
  border-color: #fff;
  box-shadow: var(--pink-glow);
}

.quiz-progress-line {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.quiz-timer-line {
  height: 100%;
  width: 100%;
  background: var(--neon-gold);
  transition: width 1s linear;
}

/* Chat Feed */
.chat-feed {
  flex: 1;
  padding: 12px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

.chat-feed::-webkit-scrollbar {
  width: 5px;
}
.chat-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 42, 109, 0.3);
  border-radius: 10px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  animation: fadeInMsg 0.2s ease-out;
}

@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  flex-shrink: 0;
  background: #190e28;
}

.chat-msg-avatar.admin-glow {
  border-color: var(--neon-gold);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.chat-msg-avatar svg, .chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-msg-body {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-msg-author {
  font-size: 11px;
  font-weight: 700;
  color: #ff9e00;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-msg-author.admin-author {
  color: var(--neon-gold);
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

.chat-msg-bubble {
  background: rgba(43, 26, 68, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 0 12px 12px 12px;
  font-size: 13.5px;   /* v92: сообщения игроков чуть крупнее (было 12px) */
  line-height: 1.38;
  color: #fff;
  margin-top: 2px;
  word-break: break-word;
}

.chat-msg.is-self {
  flex-direction: row-reverse;
}

.chat-msg.is-self .chat-msg-body {
  align-items: flex-end;
}

.chat-msg.is-self .chat-msg-bubble {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.55), rgba(157, 78, 221, 0.55));
  border-color: rgba(255, 42, 109, 0.4);
  border-radius: 12px 0 12px 12px;
}

/* System Messages in Chat */
.chat-msg.system-msg {
  justify-content: center;
}

.sys-content {
  background: rgba(255, 42, 109, 0.12);
  border: 1px dashed rgba(255, 42, 109, 0.35);
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  color: #ffd1dc;
  text-align: center;
  line-height: 1.35;
}

.sys-content.kiss {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.3);
}

.sys-content.slap {
  background: rgba(247, 127, 0, 0.2);
  border-color: #f77f00;
  color: #ffe5b4;
}

.sys-content.quiz-winner {
  background: rgba(255, 215, 0, 0.2);
  border-color: var(--neon-gold);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--gold-glow);
}

/* Quick Stickers & Emoji Bar */
.chat-emojis-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(24, 13, 38, 0.85);
  overflow: visible;
}

/* Stickers Toggle Button */
.btn-stickers-toggle {
  flex: 1.15;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.4), rgba(255, 158, 0, 0.4));
  border: 1.5px solid rgba(255, 158, 0, 0.65);
  color: #fff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  padding: 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 2px 10px rgba(255, 158, 0, 0.25);
}

.btn-stickers-toggle:hover {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.65), rgba(255, 158, 0, 0.65));
  border-color: #ffd166;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 16px rgba(255, 158, 0, 0.6);
}

.sticker-toggle-icon {
  font-size: 17px;
  display: inline-block;
  animation: wiggleSticker 3s infinite ease-in-out;
}

@keyframes wiggleSticker {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(-10deg); }
  20%, 40% { transform: rotate(10deg); }
  50% { transform: rotate(0deg); }
}

.sticker-toggle-text {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
}

.sticker-toggle-badge {
  font-size: 9px;
  font-weight: 900;
  background: #ff2a6d;
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(255, 42, 109, 0.8);
}

/* Quick Addon Button beside Chat Input */
.btn-chat-addon-sticker {
  background: rgba(45, 24, 70, 0.8);
  border: 1.5px solid rgba(255, 158, 0, 0.45);
  color: #fff;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-chat-addon-sticker:hover {
  background: rgba(255, 158, 0, 0.3);
  border-color: #ffd166;
  transform: scale(1.12);
  box-shadow: 0 0 12px rgba(255, 158, 0, 0.6);
}

/* Toggle Button for Standard Unicode Emoji Picker */
.btn-emoji-toggle {
  flex: 0.85;
  background: rgba(45, 24, 70, 0.7);
  border: 1px solid rgba(255, 42, 109, 0.4);
  color: #fff;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.btn-emoji-toggle:hover {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--neon-pink);
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(255, 42, 109, 0.45);
}

.emoji-toggle-icon {
  font-size: 16px;
}

.emoji-toggle-text {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

/* Standard Emoji Picker Popup Drawer */
.emoji-picker-drawer {
  position: absolute;
  bottom: 50px;
  left: 8px;
  right: 8px;
  background: rgba(22, 11, 36, 0.98);
  border: 1.5px solid rgba(255, 42, 109, 0.55);
  border-radius: 16px;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 42, 109, 0.35);
  backdrop-filter: blur(16px);
  z-index: 85;
  display: flex;
  flex-direction: column;
  max-height: 350px;
  overflow: hidden;
  animation: slideUpEmoji 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpEmoji {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.emoji-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(36, 18, 58, 0.7);
}

.emoji-picker-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.btn-close-emoji-picker {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-close-emoji-picker:hover {
  background: var(--neon-pink);
  transform: scale(1.1);
}

/* Category Tabs */
.emoji-category-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(18, 9, 30, 0.85);
  overflow-x: auto;
}

.btn-emoji-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 6px 0;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
}

.btn-emoji-tab:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}

.btn-emoji-tab.active {
  opacity: 1;
  background: rgba(255, 42, 109, 0.25);
  box-shadow: inset 0 -2px 0 var(--neon-pink);
}

/* Standard Emoji Grid */
.emoji-picker-grid {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  overflow-y: auto;
  max-height: 250px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
}

.emoji-picker-grid::-webkit-scrollbar {
  width: 4px;
}
.emoji-picker-grid::-webkit-scrollbar-thumb {
  background: var(--neon-pink);
  border-radius: 6px;
}

/* Individual Standard Emoji Item Button */
.emoji-picker-item {
  background: transparent;
  border: none;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Android Emoji", sans-serif;
  font-size: 24px;
  line-height: 1.2;
  cursor: pointer;
  padding: 6px 2px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
  user-select: none;
}

.emoji-picker-item:hover {
  transform: scale(1.22);
  background: rgba(255, 255, 255, 0.12);
}

.emoji-picker-item:active {
  transform: scale(0.95);
}

/* ================== STICKERS GRID & CARDS ================== */
.emoji-picker-grid.stickers-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 8px !important;
  padding: 8px !important;
  max-height: 270px;
  overflow-y: auto;
}

.cat-sticker-picker-item {
  background: rgba(45, 24, 70, 0.65);
  border: 1.5px solid rgba(255, 158, 0, 0.3);
  border-radius: 12px;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  user-select: none;
  aspect-ratio: 1;
}

.cat-sticker-picker-item:hover {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.45), rgba(255, 158, 0, 0.45));
  border-color: #ffd166;
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5), 0 0 12px rgba(255, 158, 0, 0.5);
}

.cat-sticker-picker-item:active {
  transform: scale(0.95);
}

.sticker-thumb-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9px;
}

.sticker-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.cat-sticker-picker-item:hover .sticker-thumb-img {
  transform: scale(1.08);
}

.sticker-thumb-title {
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 82px;
}

/* ================== CHAT STICKER MESSAGE ================== */
.chat-msg-sticker .chat-msg-body {
  max-width: 85%;
}

.chat-sticker-bubble {
  margin-top: 5px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
}

.chat-msg.is-self .chat-sticker-bubble {
  align-items: flex-end;
}

.cat-sticker-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55), 0 0 14px rgba(255, 158, 0, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(25, 12, 40, 0.7);
  padding: 4px;
  transition: all 0.22s ease;
}

.cat-sticker-frame:hover {
  border-color: rgba(255, 158, 0, 0.85);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.65), 0 0 20px rgba(255, 158, 0, 0.5);
}

.cat-sticker-img {
  width: 135px;
  height: 135px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cat-sticker-img:hover {
  transform: scale(1.05);
}

.sticker-pop-anim {
  animation: stickerPop 0.45s ease;
}

@keyframes stickerPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.2) rotate(4deg); }
  70% { transform: scale(0.92) rotate(-3deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.cat-sticker-caption {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* PM Sticker Bubble */
.pm-sticker-bubble {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

/* Chat Input Form */
.chat-input-form {
  padding: 10px 14px 14px;
  display: flex;
  gap: 8px;
  background: rgba(20, 11, 32, 0.95);
  border-top: 1px solid rgba(255, 42, 109, 0.2);
}

.chat-input-form input {
  flex: 1;
  background: rgba(43, 26, 68, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 14px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.chat-input-form input:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.4);
}

.btn-send-chat {
  background: var(--neon-pink);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 42, 109, 0.6);
  transition: all 0.2s ease;
}

.btn-send-chat:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.9);
}

/* ================= MODAL BASE STYLING ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 5, 18, 0.82);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  background: linear-gradient(145deg, #1d102f, #12091f);
  border: 1.5px solid rgba(255, 42, 109, 0.35);
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 42, 109, 0.25);
  width: 90%;
  max-width: 600px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalScale 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 16, 48, 0.6);
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-wrap .m-icon {
  font-size: 26px;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.modal-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: #bbb;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-close-modal:hover {
  color: var(--neon-pink);
  transform: rotate(90deg);
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 12, 36, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-primary-action {
  background: linear-gradient(135deg, #ff2a6d, #d90429);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.5);
  transition: all 0.2s ease;
}

.btn-primary-action:hover {
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(255, 42, 109, 0.8);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-gold-action {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #1a0022;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--gold-glow);
  transition: all 0.2s ease;
}

.btn-gold-action:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.9);
}

/* ================= 1. AUTH MODAL ================= */
.auth-dialog {
  max-width: 480px;
  width: 95vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-header {
  padding: 16px 20px 8px;
  text-align: center;
  flex-shrink: 0;
}

.auth-badge {
  display: inline-block;
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid var(--neon-pink);
  color: #fff;
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-title {
  font-family: var(--font-logo);
  font-size: 30px;
  background: linear-gradient(45deg, #ff2a6d, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2px;
}

.auth-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Auth Mode Tabs (Вход / Регистрация) */
.auth-tabs-row {
  display: flex;
  background: rgba(18, 10, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 4px;
  gap: 6px;
  margin-bottom: 6px;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, #ff2a6d, #ff9f1c);
  color: #fff;
  box-shadow: 0 3px 12px rgba(255, 42, 109, 0.45);
}

.auth-error-banner {
  background: rgba(255, 42, 109, 0.18);
  border: 1px solid #ff2a6d;
  color: #ff80ab;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 6px;
  text-align: center;
  font-weight: 600;
  animation: authErrShake 0.3s ease;
}

@keyframes authErrShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.auth-tab-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-body {
  padding: 10px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.auth-body::-webkit-scrollbar {
  width: 5px;
}
.auth-body::-webkit-scrollbar-thumb {
  background: var(--neon-pink);
  border-radius: 6px;
}

.auth-footer {
  padding: 12px 20px 16px;
  background: rgba(20, 10, 32, 0.98);
  border-top: 1px solid rgba(255, 42, 109, 0.25);
  flex-shrink: 0;
  z-index: 20;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 16px;
}

.input-with-icon input {
  width: 100%;
  background: rgba(35, 20, 55, 0.8);
  border: 1px solid rgba(255, 42, 109, 0.3);
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  outline: none;
}

.input-with-icon input:focus {
  border-color: var(--neon-pink);
  box-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

/* Gender Selector */
.gender-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option input {
  display: none;
}

.gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: rgba(35, 20, 55, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gender-option.active .gender-btn.female {
  border-color: var(--neon-pink);
  background: rgba(255, 42, 109, 0.25);
  box-shadow: 0 0 15px rgba(255, 42, 109, 0.4);
}

.gender-option.active .gender-btn.male {
  border-color: var(--neon-cyan);
  background: rgba(5, 217, 232, 0.25);
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.4);
}

/* Avatar Selection Box */
.avatar-selection-box {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.current-avatar-preview {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid var(--neon-pink);
  background: #140b20;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.current-avatar-preview svg, .current-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-upload-avatar {
  background: rgba(5, 217, 232, 0.2);
  border: 1px solid var(--neon-cyan);
  color: #fff;
  padding: 8px 14px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.btn-upload-avatar:hover {
  background: rgba(5, 217, 232, 0.35);
  box-shadow: var(--cyan-glow);
}

.avatar-or-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.avatar-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 125px;
  overflow-y: auto;
  padding: 6px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preset-avatar-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: #140d21;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.preset-avatar-item:hover {
  border-color: #05d9e8;
  transform: scale(1.12);
  box-shadow: 0 0 14px rgba(5, 217, 232, 0.5);
  z-index: 2;
}

.preset-avatar-item.selected {
  border-color: #ff2a6d;
  transform: scale(1.16);
  box-shadow: 0 0 18px rgba(255, 42, 109, 0.7);
  z-index: 3;
}

.required-star {
  color: var(--neon-pink);
  font-weight: bold;
}

.profile-age-badge {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.preset-avatar-img,
.custom-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.admin-auth-accordion {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.btn-toggle-admin-fields {
  background: transparent;
  border: none;
  color: var(--neon-gold);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-fields-wrapper {
  margin-top: 8px;
  background: rgba(255, 215, 0, 0.08);
  border: 1px dashed var(--neon-gold);
  padding: 10px;
  border-radius: 12px;
}

.admin-hint {
  font-size: 11px;
  color: #ffe5b4;
  margin-bottom: 6px;
  line-height: 1.3;
}

.admin-fields-wrapper input {
  width: 100%;
  background: rgba(20, 10, 30, 0.9);
  border: 1px solid var(--neon-gold);
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

.btn-enter-game {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  margin-top: 6px;
}

/* ================= 2. GIFTS MODAL ================= */
.gifts-dialog {
  max-width: min(1180px, 96vw);
  width: min(1180px, 96vw);
}

.gifts-categories-nav {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(22, 12, 36, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.btn-cat {
  background: rgba(43, 26, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ddd;
  padding: 7px 14px;
  border-radius: 16px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-cat:hover, .btn-cat.active {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 42, 109, 0.5);
}

.gifts-grid-scroll {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
}

.gift-card {
  background: rgba(35, 20, 55, 0.65);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.gift-card:hover {
  border-color: var(--neon-pink);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 42, 109, 0.3);
}

.gift-card-icon {
  font-size: 34px;
  margin-bottom: 6px;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.gift-card-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.25;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gift-card-price {
  background: rgba(217, 4, 41, 0.2);
  border: 1px solid var(--ruby-red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.btn-send-gift-act {
  width: 100%;
  background: linear-gradient(135deg, #ff2a6d, #d90429);
  border: none;
  color: #fff;
  padding: 6px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-send-gift-act:hover {
  transform: scale(1.05);
  box-shadow: var(--pink-glow);
}

/* ================= 3. PROFILE MODAL ================= */
.profile-dialog {
  max-width: 550px;
}

.profile-hero {
  padding: 24px 22px;
  background: rgba(30, 16, 48, 0.6);
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-avatar-frame {
  width: 124px;
  height: 124px;
  flex-shrink: 0;
  position: relative !important;
  overflow: visible !important;
  transition: transform 0.3s ease;
}

.profile-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 0;
  border: 3px solid rgba(255, 42, 109, 0.6) !important;
  overflow: hidden;
  background: #140b20;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 24px rgba(255, 42, 109, 0.4);
}

.profile-avatar-frame:hover {
  transform: scale(1.05);
}

.profile-avatar-circle svg, .profile-avatar-circle img,
.profile-avatar-frame svg, .profile-avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
  display: block;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap !important;
  flex-wrap: nowrap !important;
}

.profile-name-row h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.profile-role-badge {
  background: rgba(255, 42, 109, 0.2);
  border: 1px solid var(--neon-pink);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
}

.profile-rubies-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: #ffe5b4;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 16px 20px;
}

.stat-card {
  background: rgba(35, 20, 55, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-icon {
  font-size: 22px;
  margin-bottom: 2px;
}

.stat-val {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
}

.profile-collection-section {
  padding: 0 20px 20px;
}

.collection-title {
  font-size: 13px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 10px;
}

.profile-gifts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 140px;
  overflow-y: auto;
}

.collected-gift-chip {
  background: rgba(43, 26, 68, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 4px 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
}

.no-gifts-yet {
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ================= 4. LEADERBOARD MODAL ================= */
.leaderboard-dialog {
  max-width: 580px;
}

.leaderboard-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(22, 12, 36, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-lead-tab {
  flex: 1;
  background: rgba(43, 26, 68, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ddd;
  padding: 8px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-lead-tab.active, .btn-lead-tab:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.4);
}

.leaderboard-scroll {
  padding: 12px 16px;
  max-height: 420px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lead-row {
  background: rgba(35, 20, 55, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 14px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.lead-row:hover {
  background: rgba(50, 30, 80, 0.8);
  transform: translateX(4px);
}

.lead-rank {
  font-size: 14px;
  font-weight: 800;
  width: 24px;
  text-align: center;
  color: var(--text-muted);
}

.lead-rank.top-1 { color: #ffd700; font-size: 18px; }
.lead-rank.top-2 { color: #e0e0e0; font-size: 16px; }
.lead-rank.top-3 { color: #cd7f32; font-size: 16px; }

.lead-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--neon-pink);
  overflow: hidden;
  background: #150a22;
}

.lead-avatar svg, .lead-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-info {
  flex: 1;
}

.lead-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.lead-score {
  font-size: 14px;
  font-weight: 800;
  color: var(--neon-pink);
}

/* ================= 5. MUSIC PLAYER & PLAYLIST STYLING ================= */
.btn-music-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 16, 50, 0.85);
  border: 1.5px solid rgba(255, 42, 109, 0.4);
  padding: 5px 12px 5px 7px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 0 12px rgba(255, 42, 109, 0.25);
}

.btn-music-header:hover {
  transform: translateY(-2px) scale(1.03);
  border-color: var(--neon-pink);
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.6);
}

.header-vinyl-disc {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #2b2b2b 20%, #111 25%, #222 50%, #111 75%, #333 100%);
  border: 2px solid #555;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spinVinyl 3.5s linear infinite;
}

@keyframes spinVinyl {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.header-vinyl-grooves {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.header-vinyl-center {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--neon-pink);
  font-size: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.music-header-title {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.2px;
}

.music-header-queue {
  font-size: 10px;
  color: var(--neon-cyan);
  font-weight: 700;
}

/* Active Header Switch Table Button */
.btn-switch-table-active {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.25), rgba(75, 20, 120, 0.35)) !important;
  border: 1.5px solid rgba(255, 42, 109, 0.65) !important;
  box-shadow: 0 0 12px rgba(255, 42, 109, 0.4) !important;
  font-weight: 700 !important;
}

.btn-switch-table-active:hover {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.5), rgba(120, 30, 200, 0.6)) !important;
  border-color: #ffd700 !important;
  box-shadow: 0 0 20px rgba(255, 42, 109, 0.8), 0 0 10px #ffd700 !important;
  transform: translateY(-1px) scale(1.04) !important;
}

/* Gazebo Room Turntable Widget */
.gazebo-turntable-widget {
  position: absolute;
  top: 14px;
  right: 18px;
  z-index: 40;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gazebo-turntable-widget:hover {
  transform: translateY(-2px) scale(1.05);
}

.turntable-chassis {
  background: rgba(22, 12, 36, 0.92);
  border: 1.5px solid rgba(255, 42, 109, 0.55);
  border-radius: 18px;
  padding: 6px 14px 6px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(255, 42, 109, 0.35);
  backdrop-filter: blur(8px);
}

/* Music Volume Slider HUD on main game screen directly under Music button */
.main-music-volume-hud {
  margin-top: 6px;
  background: rgba(22, 12, 36, 0.94);
  border: 1.5px solid rgba(255, 42, 109, 0.5);
  border-radius: 14px;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 42, 109, 0.25);
  backdrop-filter: blur(8px);
  cursor: default;
}

.main-vol-icon {
  font-size: 13px;
  color: var(--neon-cyan);
  user-select: none;
  cursor: pointer;
}

.main-volume-slider {
  width: 90px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  accent-color: #ff2a6d;
}

.main-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ff2a6d;
  box-shadow: 0 0 8px #ff2a6d;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.main-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.turntable-disc-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turntable-vinyl-disc {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 20%, #111 25%, #2a2a2a 45%, #111 65%, #333 100%);
  border: 2px solid #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.turntable-vinyl-disc.rotating {
  animation: spinVinyl 3s linear infinite;
}

.vinyl-micro-grooves {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
}

.vinyl-gold-center {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--neon-pink);
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.turntable-arm-bar {
  position: absolute;
  top: 3px;
  right: 2px;
  width: 3px;
  height: 22px;
  background: linear-gradient(to bottom, #ffd700, #b8860b);
  border-radius: 2px;
  transform-origin: top center;
  transform: rotate(24deg);
  pointer-events: none;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
}

.turntable-badge-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.turntable-badge-btn {
  background: linear-gradient(135deg, #ff2a6d, #9b51e0);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(255, 42, 109, 0.4);
}

.turntable-queue-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
}

/* Playlist Dialog */
.music-playlist-dialog {
  max-width: 600px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.music-playlist-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* Now Playing Card */
.now-playing-panel {
  background: rgba(30, 15, 50, 0.75);
  border: 1.5px solid rgba(5, 217, 232, 0.35);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  gap: 16px;
  align-items: center;
  box-shadow: 0 0 18px rgba(5, 217, 232, 0.15);
}

.now-playing-disc-box {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.now-playing-vinyl-disc {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 20%, #111 25%, #2a2a2a 45%, #111 65%, #333 100%);
  border: 3px solid #ffd700;
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.now-playing-vinyl-disc.rotating {
  animation: spinVinyl 3s linear infinite;
}

.vinyl-groove-rings {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.2);
}

.vinyl-center-art {
  font-size: 14px;
}

.now-playing-info-box {
  flex: 1;
  min-width: 0;
}

.now-playing-tag-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

.now-playing-tag {
  background: var(--neon-pink);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.now-playing-order-badge {
  background: rgba(5, 217, 232, 0.15);
  border: 1px solid var(--neon-cyan);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

.now-playing-song-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing-song-artist {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audio-progress-wrap {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.audio-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  border-radius: 3px;
  transition: width 0.3s ease;
}

.audio-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sound-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-sound-ctrl {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 5px 12px;
  border-radius: 12px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-sound-ctrl:hover {
  background: rgba(255, 42, 109, 0.25);
  border-color: var(--neon-pink);
  transform: translateY(-1px);
}

.volume-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 12px;
}

.vol-icon {
  font-size: 13px;
  opacity: 0.8;
  user-select: none;
}

.vol-pct-badge {
  font-size: 11px;
  font-weight: 700;
  color: #ff9ec6;
  min-width: 32px;
  text-align: right;
  user-select: none;
}

.volume-slider-group input[type="range"] {
  width: 110px;
  accent-color: var(--neon-pink);
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

/* LARGE + ADD SONG BUTTON */
.btn-big-add-song {
  background: linear-gradient(135deg, #ff2a6d 0%, #a82aff 100%);
  border: none;
  border-radius: 18px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 42, 109, 0.45);
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-align: left;
  width: 100%;
}

.btn-big-add-song:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 42, 109, 0.7);
}

.btn-big-add-song:active {
  transform: scale(0.98);
}

.plus-circle-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-big-add-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.btn-big-add-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}

.btn-big-add-subtitle {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

/* Playlist Queue (7 Slots, strictly non-preemptible) */
.playlist-queue-section {
  background: rgba(20, 10, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.queue-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.queue-section-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.queue-counter-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(5, 217, 232, 0.15);
  border: 1px solid rgba(5, 217, 232, 0.3);
  padding: 2px 8px;
  border-radius: 8px;
}

.queue-items-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.queue-slot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(30, 16, 48, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 12px;
}

.queue-slot-row.active {
  background: rgba(255, 42, 109, 0.18);
  border-color: rgba(255, 42, 109, 0.5);
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.2);
}

.queue-slot-row.empty {
  border: 1px dashed rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  justify-content: center;
  font-style: italic;
  font-size: 11px;
}

.slot-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.slot-num-badge {
  font-weight: 800;
  color: var(--neon-gold);
  width: 22px;
  font-size: 12px;
}

.slot-row-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.slot-song-title {
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot-song-artist {
  font-size: 11px;
  color: var(--text-muted);
}

.slot-added-by {
  font-size: 10px;
  color: var(--neon-cyan);
  white-space: nowrap;
}

.queue-strict-note {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 4px;
}

/* ================= 5B. SEPARATE SONG CATALOG MODAL ================= */
.song-catalog-dialog {
  max-width: 640px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.song-catalog-body {
  padding: 14px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.catalog-search-bar {
  position: relative;
  display: flex;
  align-items: center;
}

.catalog-search-bar .search-ico {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.catalog-search-bar input {
  width: 100%;
  background: rgba(20, 10, 30, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 10px 36px;
  color: #fff;
  font-size: 13px;
  font-family: var(--font-main);
  transition: all 0.2s ease;
}

.catalog-search-bar input:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(5, 217, 232, 0.3);
}

.btn-clear-txt {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* Admin & Universal Player MP3 Upload Card */
.admin-upload-card,
.player-upload-card {
  background: rgba(255, 215, 0, 0.08);
  border: 1.5px dashed var(--neon-gold);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-upload-header,
.player-upload-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-crown,
.upload-badge-ico {
  font-size: 24px;
  filter: drop-shadow(0 2px 6px rgba(255, 215, 0, 0.5));
}

.adm-upload-titles h4,
.player-upload-titles h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--neon-gold);
}

.adm-upload-titles p,
.player-upload-titles p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-mp3-form,
.player-mp3-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-form-row,
.player-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.admin-form-row input,
.player-form-row input {
  background: rgba(20, 10, 30, 0.9);
  border: 1px solid var(--neon-gold);
  padding: 8px 12px;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
}

.admin-file-row,
.player-file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-file-select {
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid var(--neon-gold);
  color: #fff;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-file-select:hover {
  background: var(--neon-gold);
  color: #1a0022;
}

.btn-file-select input[type="file"] {
  display: none;
}

.selected-file-name {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.catalog-price-tag {
  color: var(--neon-pink);
  font-weight: 700;
}

/* Song Cards List */
.song-cards-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
}

.song-cards-list::-webkit-scrollbar {
  width: 4px;
}
.song-cards-list::-webkit-scrollbar-thumb {
  background: var(--neon-cyan);
  border-radius: 4px;
}

.song-catalog-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(28, 14, 44, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.song-catalog-row:hover {
  background: rgba(45, 22, 70, 0.9);
  border-color: rgba(5, 217, 232, 0.4);
}

.song-row-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.song-row-idx {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  width: 22px;
}

.song-row-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.song-row-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-row-artist {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.song-row-dur {
  color: var(--neon-cyan);
}

.btn-add-to-playlist {
  background: linear-gradient(135deg, #ff2a6d, #9b51e0);
  border: none;
  color: #fff;
  padding: 7px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 42, 109, 0.35);
}

.btn-add-to-playlist:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 42, 109, 0.6);
}

.btn-add-to-playlist:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.8);
}

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

.btn-delete-track-admin {
  background: rgba(255, 42, 109, 0.15);
  border: 1px solid rgba(255, 42, 109, 0.45);
  color: #ff2a6d;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-delete-track-admin:hover:not(:disabled) {
  background: rgba(255, 42, 109, 0.35);
  border-color: #ff2a6d;
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.4);
}

/* ================= 6. TOP-UP & PAYMENTS MODAL ================= */
.topup-dialog {
  max-width: 620px;
}

.topup-packages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 18px 20px;
}

.package-card {
  background: rgba(35, 20, 55, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.package-card:hover, .package-card.selected {
  border-color: var(--neon-pink);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(255, 42, 109, 0.4);
}

.package-card.featured {
  border-color: rgba(255, 215, 0, 0.5);
  background: linear-gradient(145deg, rgba(50, 25, 75, 0.8), rgba(30, 15, 45, 0.8));
}

.package-card.vip {
  border-color: var(--neon-gold);
  background: linear-gradient(145deg, rgba(70, 35, 20, 0.8), rgba(40, 20, 15, 0.8));
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.pkg-badge {
  position: absolute;
  top: -9px;
  background: var(--neon-pink);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 8px;
}

.pkg-badge.vip {
  background: linear-gradient(45deg, #ffd700, #ff8c00);
  color: #1a0022;
}

.pkg-gem {
  font-size: 26px;
  margin-bottom: 4px;
}

.pkg-amount {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  display: block;
  line-height: 1;
}

.pkg-unit {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.pkg-price {
  font-size: 16px;
  font-weight: 800;
  color: #ffd700;
  margin-bottom: 8px;
}

.btn-select-pkg {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 6px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.package-card.selected .btn-select-pkg {
  background: var(--neon-pink);
}

.payment-methods-box {
  padding: 0 20px 16px;
}

.pay-methods-title {
  font-size: 12px;
  font-weight: 700;
  color: #ddd;
  margin-bottom: 8px;
  display: block;
}

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

.pay-method-option input {
  display: none;
}

.pay-method-card {
  background: rgba(35, 20, 55, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pay-method-option.active .pay-method-card {
  border-color: var(--neon-cyan);
  background: rgba(5, 217, 232, 0.15);
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.4);
}

.pay-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

.pay-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.pay-note {
  font-size: 9px;
  color: var(--text-muted);
}

/* ================= 7. CHECKOUT MODAL ================= */
.checkout-dialog {
  max-width: 460px;
}

.checkout-body {
  padding: 18px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.secure-badge {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #00f5d4;
  background: rgba(0, 245, 212, 0.1);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 212, 0.3);
}

.checkout-summary-card {
  background: rgba(35, 20, 55, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chk-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.chk-row strong {
  color: #fff;
}

.chk-row.total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 8px;
  font-size: 15px;
}

.chk-row.total strong {
  color: #ffd700;
  font-size: 18px;
}

.qr-pay-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
}

.qr-inst {
  font-size: 11px;
  color: #333;
  font-weight: 600;
  margin-top: 8px;
  line-height: 1.3;
}

.btn-complete-pay {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* ================= 8. DAILY STREAK MODAL ================= */
.streak-dialog {
  max-width: 600px;
}

.streak-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.streak-cards-track {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.streak-day-card {
  background: rgba(35, 20, 55, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.streak-day-card.active-today {
  border-color: var(--neon-gold);
  background: linear-gradient(145deg, rgba(70, 40, 15, 0.8), rgba(40, 20, 10, 0.8));
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
  transform: scale(1.06);
}

.streak-day-card.claimed {
  opacity: 0.6;
  border-color: #00f5d4;
}

.st-day-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.st-gem-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.st-reward {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
}

.st-status {
  font-size: 10px;
  color: var(--neon-cyan);
  font-weight: 700;
}

.btn-claim-bonus {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

.streak-timer-note {
  background: rgba(10, 20, 35, 0.88);
  border: 1px solid rgba(0, 245, 212, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.streak-timer-note .countdown-val {
  color: #00f5d4;
  font-weight: 800;
  font-size: 18px;
  font-family: monospace;
  letter-spacing: 1px;
}

.streak-timer-note .msk-time-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.btn-claimed-state {
  background: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.55) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

.badge-ready {
  background: #ff2a6d !important;
  color: #fff !important;
  animation: bonusBadgePulse 1.5s infinite alternate ease-in-out;
}

@keyframes bonusBadgePulse {
  0% { transform: scale(1); box-shadow: 0 0 4px #ff2a6d; }
  100% { transform: scale(1.1); box-shadow: 0 0 12px #ff2a6d; }
}

.badge-done {
  background: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* ================= 9. TABLES SWITCHER MODAL ================= */
.tables-dialog {
  max-width: 680px;
  max-height: 85vh;
}

.tables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding: 18px 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.table-card {
  background: rgba(35, 20, 55, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-card:hover {
  border-color: var(--neon-pink);
  transform: translateY(-3px);
  box-shadow: var(--pink-glow);
}

.table-card.current {
  border-color: var(--neon-gold);
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  background: rgba(55, 30, 85, 0.85);
}

.tb-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tb-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.tb-occupancy {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
  background: rgba(5, 217, 232, 0.15);
  padding: 2px 6px;
  border-radius: 8px;
}

.tb-occupancy.full {
  color: #ff0055;
  background: rgba(255, 0, 85, 0.18);
}

.tb-desc {
  font-size: 11px;
  color: var(--text-muted);
}

.btn-join-table {
  background: var(--neon-pink);
  border: none;
  color: #fff;
  padding: 8px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.btn-join-table:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.1);
}

/* ================= 10. ADMIN MODAL (ГОРИЗОНТАЛЬНАЯ ПАНЕЛЬ) ================= */
.admin-dialog {
  max-width: 900px;
  width: 94vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px 22px 22px;
  align-items: stretch;
}

@media (max-width: 780px) {
  .admin-panel-grid {
    grid-template-columns: 1fr;
  }
}

/* Chat Navigation Tabs (Общий чат / Личные сообщения ЛС) */
.chat-tab-nav {
  display: flex;
  gap: 4px;
  background: rgba(15, 8, 25, 0.6);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-chat-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
  transition: all 0.2s ease;
}

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

.btn-chat-tab.active {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.8), rgba(155, 81, 224, 0.8));
  color: #fff;
  box-shadow: 0 0 10px rgba(255, 42, 109, 0.4);
}

.pm-unread-badge {
  background: #ff2a6d;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  box-shadow: 0 0 8px rgba(255, 42, 109, 0.8);
}

.chat-view-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* PM (Личные сообщения) UI */
.pm-recipient-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(28, 14, 44, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pm-to-label {
  font-size: 11px;
  font-weight: 700;
  color: #ffd700;
  white-space: nowrap;
}

.pm-recipient-select {
  flex: 1;
  background: rgba(15, 8, 25, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: #fff;
  font-size: 12px;
  padding: 5px 8px;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
}

.pm-recipient-select:focus {
  border-color: #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.pm-feed {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-empty-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  padding: 30px 15px;
  margin: auto 0;
}

.pm-msg-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  max-width: 82%;
  word-wrap: break-word;
  font-size: 13px;
  line-height: 1.4;
}

.pm-msg.is-self .pm-msg-bubble {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.35), rgba(155, 81, 224, 0.35));
  border: 1px solid rgba(255, 42, 109, 0.5);
  align-self: flex-end;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.pm-msg:not(.is-self) .pm-msg-bubble {
  background: rgba(35, 18, 52, 0.85);
  border: 1px solid rgba(5, 217, 232, 0.35);
  align-self: flex-start;
  color: #fff;
  border-bottom-left-radius: 4px;
}

/* Button "Написать в ЛС" in profile */
.btn-send-pm-profile {
  background: linear-gradient(135deg, rgba(5, 217, 232, 0.25), rgba(155, 81, 224, 0.35));
  border: 1.5px solid var(--neon-cyan);
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-send-pm-profile:hover {
  background: var(--neon-cyan);
  color: #000;
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.6);
  transform: translateY(-1px);
}

/* Admin Announcement Banner in Chat (Крупное и яркое) */
.chat-msg-announcement {
  margin: 8px 4px;
  animation: pulseGold 2s infinite alternate ease-in-out;
}

.announcement-banner-card {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 42, 109, 0.22));
  border: 2px solid #ffd700;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.55), inset 0 0 12px rgba(255, 215, 0, 0.15);
}

.announcement-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
  padding-bottom: 4px;
}

.announcement-author {
  display: flex;
  align-items: center;
  gap: 6px;
}

.announcement-crown {
  font-size: 16px;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.8));
}

.announcement-author-name {
  font-size: 13px;
  font-weight: 900;
  color: #ffd700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.announcement-time-badge {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
}

.announcement-card-content {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Profanity Alert in Chat for Administrator */
.chat-msg-profanity-alert {
  margin: 8px 4px;
}

.profanity-alert-card {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.25), rgba(15, 8, 25, 0.9));
  border: 2px solid #ff2a6d;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 0 16px rgba(255, 42, 109, 0.6);
}

.profanity-alert-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #ff2a6d;
  margin-bottom: 6px;
}

.profanity-alert-body {
  font-size: 13px;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.btn-jump-to-violator-table {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: none;
  color: #000;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.btn-jump-to-violator-table:hover {
  transform: scale(1.04);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.8);
}

/* Modal: Admin All Players Directory */
.players-directory-dialog {
  max-width: 680px;
  width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.players-directory-body {
  display: flex;
  flex-direction: column;
  padding: 14px 18px 18px;
  gap: 12px;
  overflow: hidden;
  flex: 1;
}

.directory-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.directory-filter-bar input {
  flex: 1;
  background: rgba(15, 8, 25, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  padding: 9px 12px;
  border-radius: 10px;
  outline: none;
}

.directory-filter-bar input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.directory-stats-badge {
  font-size: 12px;
  font-weight: 700;
  color: #ffd700;
  white-space: nowrap;
}

.directory-players-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 55vh;
  padding-right: 4px;
}

.player-directory-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 16, 48, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s ease;
}

.player-directory-row:hover {
  background: rgba(45, 22, 70, 0.9);
  border-color: rgba(255, 215, 0, 0.4);
}

.player-dir-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-dir-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.player-dir-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.player-dir-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-dir-sub {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-dir-status {
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
}

.player-dir-status.is-online {
  background: rgba(0, 230, 118, 0.2);
  color: #00e676;
  border: 1px solid rgba(0, 230, 118, 0.5);
}

.player-dir-status.is-offline {
  background: rgba(255, 255, 255, 0.08);
  color: #888;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.player-dir-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.player-dir-rubies {
  font-size: 12px;
  font-weight: 800;
  color: #ffd700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-sit-to-player {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: none;
  color: #000;
  font-weight: 800;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sit-to-player:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.btn-sit-to-player:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(1);
}

/* GAME RUBY IMAGES (Crimson Faceted Gem from User Photo) */
.game-ruby-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 6px rgba(255, 30, 60, 0.85));
  display: inline-block;
}

.game-ruby-img-inline {
  width: 17px;
  height: 17px;
  object-fit: contain;
  vertical-align: -2px;
  filter: drop-shadow(0 0 4px rgba(255, 30, 60, 0.75));
  display: inline-block;
  margin: 0 2px;
}

.game-ruby-img-lg {
  width: 38px;
  height: 38px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 10px rgba(255, 30, 60, 0.9));
  display: inline-block;
}

/* Profile Modal Scroll & Ruby Gifting Block */
.profile-dialog {
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto !important;
}

.player-gift-rubies-block {
  background: linear-gradient(135deg, rgba(35, 18, 52, 0.95), rgba(20, 10, 32, 0.95));
  border: 1.5px solid rgba(255, 215, 0, 0.7);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.25s ease-out;
}

.player-gift-rubies-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #ffd700;
}

.player-gift-rubies-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pgr-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 120px;
}

.pgr-ruby-icon {
  position: absolute;
  left: 8px;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.pgr-amount-input {
  width: 100%;
  background: rgba(10, 5, 18, 0.9);
  border: 1.5px solid #ffd700;
  border-radius: 10px;
  color: #ffd700;
  font-size: 14px;
  font-weight: 900;
  padding: 8px 8px 8px 30px;
  text-align: center;
  box-sizing: border-box;
}

.btn-pgr-send {
  flex: 1;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: none;
  color: #120520;
  font-weight: 900;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.6);
  transition: all 0.2s ease;
  user-select: none;
}

.btn-pgr-send:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 0 22px rgba(255, 215, 0, 0.9);
}

.btn-pgr-send:active {
  transform: translateY(1px) scale(0.98);
}

/* Directory direct gift button */
.btn-gift-rubies-dir {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #ffd700;
  color: #ffd700;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-gift-rubies-dir:hover {
  background: #ffd700;
  color: #000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.admin-card {
  background: rgba(30, 16, 48, 0.8);
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  border-radius: 14px;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.admin-card.admin-moderation-card {
  min-width: 0;
}

.adm-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adm-icon {
  font-size: 20px;
}

.adm-card-head h4 {
  font-size: 13px;
  font-weight: 800;
  color: var(--neon-gold);
}

.admin-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.adm-input-row {
  display: flex;
  gap: 6px;
}

.adm-input-row input {
  flex: 1;
  background: rgba(20, 10, 30, 0.8);
  border: 1px solid var(--neon-gold);
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 11px;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 10, 32, 0.95);
  border: 1.5px solid var(--neon-pink);
  box-shadow: 0 0 25px rgba(255, 42, 109, 0.6);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  z-index: 9999;
  animation: toastFade 0.3s ease-out;
}

/* ================= MODERATION & BAN STYLING ================= */

/* 15-Minute Mute Banner in Chat */
.chat-mute-banner {
  background: linear-gradient(135deg, rgba(217, 4, 41, 0.9), rgba(128, 15, 47, 0.95));
  border: 1.5px solid #ff4d6d;
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.5);
  margin: 6px 14px 0;
  padding: 8px 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: pulseMute 1.5s infinite alternate ease-in-out;
}

@keyframes pulseMute {
  from { box-shadow: 0 0 10px rgba(217, 4, 41, 0.4); }
  to { box-shadow: 0 0 22px rgba(255, 77, 109, 0.8); }
}

.mute-icon {
  font-size: 20px;
}

.mute-text {
  display: flex;
  flex-direction: column;
}

.mute-text strong {
  font-size: 11px;
  color: #fff;
}

#muteCountdownText {
  font-size: 12px;
  font-weight: 800;
  color: #ffd700;
}

.btn-admin-self-unmute {
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(205, 174, 255, .9);
  border-radius: 999px;
  padding: 7px 11px;
  color: #fff;
  background: linear-gradient(135deg, #8b35e8, #422080);
  box-shadow: 0 0 12px rgba(164, 105, 255, .45);
  font: 800 11px/1.1 var(--font-main);
  white-space: nowrap;
  cursor: pointer;
}
.btn-admin-self-unmute:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 17px rgba(190, 145, 255, .68);
}
.btn-admin-self-unmute:disabled {
  opacity: .65;
  cursor: wait;
}

.chat-input-form.is-muted input {
  background: rgba(40, 10, 20, 0.8) !important;
  border-color: #d90429 !important;
  color: #ff99aa !important;
  cursor: not-allowed;
}

.chat-input-form.is-muted button {
  background: #555 !important;
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none !important;
}

/* Permanent Ban Button in Profile Modal */
.btn-ban-permanent {
  background: linear-gradient(135deg, #d90429, #7a0016);
  border: 1px solid #ff4d6d;
  color: #fff;
  padding: 10px 16px;
  border-radius: 20px;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.5);
  transition: all 0.2s ease;
}

.btn-ban-permanent:hover {
  transform: scale(1.05);
  background: #ff0033;
  box-shadow: 0 0 25px rgba(255, 0, 51, 0.8);
}

/* Permanent Ban Screen (Full lock) */
.banned-dialog {
  max-width: 480px;
  background: linear-gradient(145deg, #2b080f, #150205) !important;
  border: 2px solid #d90429 !important;
  box-shadow: 0 0 50px rgba(217, 4, 41, 0.8) !important;
}

.banned-content-box {
  padding: 36px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.banned-icon-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(217, 4, 41, 0.2);
  border: 3px solid #d90429;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 0 30px rgba(217, 4, 41, 0.6);
  animation: shake 2s infinite ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.banned-main-title {
  font-size: 24px;
  font-weight: 900;
  color: #ff4d6d;
  letter-spacing: 1px;
}

.banned-desc {
  font-size: 14px;
  color: #f1f1f1;
  line-height: 1.4;
}

.banned-reason-plate {
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed rgba(255, 77, 109, 0.5);
  padding: 10px 16px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.banned-reason-plate .lbl {
  font-size: 11px;
  color: #aaa;
}

.banned-reason-plate strong {
  font-size: 13px;
  color: #ffd700;
}

.banned-contact-note {
  font-size: 11px;
  color: #888;
}

/* Admin Moderation Management in Admin Panel */
.admin-players-mod-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 6px;
}

.mod-player-row {
  background: rgba(20, 10, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mod-p-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.mod-p-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.mod-p-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.mod-p-avatar svg, .mod-p-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-p-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mod-p-rubies-tag {
  font-size: 11px;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Pill on table seats showing player rubies exclusively to administrator - positioned under nickname and age */
.seat-admin-rubies-pill {
  position: relative !important;
  top: auto !important;
  margin-top: 3px;
  background: rgba(15, 8, 25, 0.95);
  border: 1px solid #ffd700;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  color: #ffd700;
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 10px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  animation: fadeIn 0.25s ease-out;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-mini-ban {
  background: #d90429;
  border: none;
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-mini-ban:hover {
  background: #ff0033;
  box-shadow: 0 0 10px rgba(255, 0, 51, 0.6);
}

.admin-banned-list {
  max-height: 100px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banned-entry-row {
  background: rgba(40, 10, 15, 0.7);
  border: 1px solid rgba(217, 4, 41, 0.3);
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.btn-mini-unban {
  background: #2a9d8f;
  border: none;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, 15px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1000;
}

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

/* Mobile & Tablet Adjustments */
@media (max-width: 1100px) {
  .arena-wrapper {
    width: 680px;
    height: 480px;
  }
  .table-surface,
  .table-surface.table-gazebo-oval,
  .table-surface.table-rustic-wood {
    width: 440px;
    height: 270px;
  }
  .chat-sidebar {
    width: 300px;
  }
}

@media (max-width: 800px) {
  .app-header {
    height: auto;
    padding: 6px 12px;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
  }
  .header-left {
    gap: 8px;
  }
  .header-center {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
  }
  .header-right {
    gap: 8px;
  }
  .gazebo-turntable-widget {
    top: 8px;
    right: 8px;
    transform: scale(0.85);
    transform-origin: top right;
  }
  .arena-wrapper {
    width: 500px;
    height: 420px;
  }
  .table-surface,
  .table-surface.table-gazebo-oval {
    width: 340px;
    height: 210px;
  }
  .table-kilim-runner {
    width: 200px;
    height: 110px;
  }
  .seat-sofa-module {
    transform: scale(0.85);
  }
}

/* ================== WHATSAPP STYLE MESSENGER ================== */
.messenger-dialog {
  width: 920px;
  max-width: 95vw;
  height: 620px;
  max-height: 90vh;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  background: #120b1c;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.85), 0 0 25px rgba(255, 215, 0, 0.2);
}

.messenger-header {
  height: 52px;
  background: linear-gradient(90deg, #1f122f, #2a163e);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
}

.messenger-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.messenger-brand .wa-icon {
  font-size: 22px;
}

.messenger-brand .messenger-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
}

.messenger-body {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

/* Sidebar / Left Column (Chats list) */
.messenger-sidebar {
  width: 310px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  background: rgba(18, 10, 28, 0.95);
}

.messenger-search-bar {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.messenger-search-bar input {
  width: 100%;
  background: rgba(35, 20, 52, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.messenger-search-bar input:focus {
  border-color: #ffd700;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.25);
}

.messenger-chats-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.messenger-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.18s ease;
  user-select: none;
  position: relative;
}

.messenger-chat-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.messenger-chat-item.active {
  background: linear-gradient(90deg, rgba(255, 42, 109, 0.25), rgba(155, 81, 224, 0.25));
  border-left: 3px solid #ffd700;
}

.messenger-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  background: #1f122f;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.messenger-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #00e676;
  border: 2px solid #120b1c;
  border-radius: 50%;
}

/* v93: игрок не в сети — серая точка вместо зелёной */
.messenger-online-dot.is-offline {
  background: #6c6a7a;
}

.messenger-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.messenger-item-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.messenger-item-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.messenger-item-time {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}

.messenger-item-row-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.messenger-item-preview {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.messenger-unread-pill {
  background: #00e676;
  color: #000;
  font-size: 11px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}

/* Right Column (Chat Pane) */
.messenger-chat-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #0d0714;
  position: relative;
  min-width: 0;
}

.messenger-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.45);
  gap: 12px;
  padding: 20px;
  text-align: center;
}

.messenger-empty-icon {
  font-size: 48px;
  opacity: 0.8;
}

.messenger-chat-header {
  height: 52px;
  background: rgba(28, 16, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  flex-shrink: 0;
}

.messenger-recipient-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 215, 0, 0.4);
  background: #1f122f;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.messenger-recipient-details {
  display: flex;
  flex-direction: column;
}

.messenger-recipient-name {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
}

.messenger-recipient-status {
  font-size: 11px;
  color: #00e676;
}

/* v93: «Не в сети» — серый текст */
.messenger-recipient-status.is-offline {
  color: #9a97a8;
}

/* "Сделать возможность из Личных сообщений подсесть к игроку за стол" */
.btn-messenger-sit-player {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: linear-gradient(135deg, #ff9f1c, #ff2a6d);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(255, 42, 109, 0.4);
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
}

.btn-messenger-sit-player:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 18px rgba(255, 42, 109, 0.65);
  filter: brightness(1.1);
}

.btn-messenger-sit-player:active {
  transform: translateY(1px);
}

.btn-messenger-sit-player .btn-sit-icon {
  font-size: 16px;
}

/* WhatsApp Messages Feed */
.messenger-messages-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
}

.wa-msg {
  display: flex;
  flex-direction: column;
  max-width: 72%;
  word-wrap: break-word;
  position: relative;
}

.wa-msg.is-self {
  align-self: flex-end;
}

.wa-msg:not(.is-self) {
  align-self: flex-start;
}

.wa-bubble {
  padding: 8px 12px 6px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.45;
  color: #fff;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.wa-msg.is-self .wa-bubble {
  background: linear-gradient(135deg, #0b6848, #0e8058);
  border: 1px solid rgba(0, 230, 118, 0.35);
  border-top-right-radius: 2px;
}

.wa-msg:not(.is-self) .wa-bubble {
  background: #251638;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-left-radius: 2px;
}

.wa-time {
  float: right;
  margin-left: 10px;
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

/* WhatsApp Sticker */
.wa-sticker-card {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wa-sticker-card:hover {
  transform: scale(1.05);
}

.wa-sticker-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* WhatsApp Input Form */
.messenger-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #180e25;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.btn-messenger-emoji {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.15s ease;
  line-height: 1;
}

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

.messenger-input-bar input {
  flex: 1;
  background: rgba(35, 20, 52, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 9px 16px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.messenger-input-bar input:focus {
  border-color: #00e676;
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.3);
}

.btn-send-messenger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00c853, #00e676);
  border: none;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-send-messenger:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.6);
}

/* Messenger Emoji Drawer */
.messenger-emoji-drawer {
  position: absolute;
  bottom: 58px;
  left: 10px;
  width: 340px;
  background: #1f122f;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow: hidden;
}

.messenger-emoji-tabs {
  display: flex;
  background: rgba(15, 8, 25, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 6px;
  gap: 4px;
}

.messenger-emoji-grid {
  padding: 8px;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

/* ================= EDIT PROFILE MODAL & BUTTONS ================= */
.btn-edit-profile-profile {
  background: linear-gradient(135deg, #05d9e8, #0056b3);
  box-shadow: 0 4px 15px rgba(5, 217, 232, 0.4);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-edit-profile-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 217, 232, 0.6);
}

.btn-edit-name-inline {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 13px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.2s ease;
}

.btn-edit-name-inline:hover {
  background: var(--neon-cyan);
  color: #000;
  transform: scale(1.15);
}

.profile-avatar-edit-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  background: rgba(5, 217, 232, 0.95);
  color: #0d0221;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  z-index: 52;
  transition: transform 0.2s ease;
}

.profile-avatar-edit-badge:hover {
  transform: scale(1.15);
  background: #fff;
}

.edit-profile-dialog {
  max-width: 520px;
  max-height: 88vh;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1.5px solid rgba(5, 217, 232, 0.4);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(5, 217, 232, 0.3);
  position: relative;
  z-index: 100000;
}

.edit-profile-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
}

.edit-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #c9b8e8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: block;
}

.edit-avatar-header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px;
  background: rgba(20, 10, 35, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.edit-avatar-preview-box {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid var(--neon-cyan);
  box-shadow: 0 0 16px rgba(5, 217, 232, 0.45);
  background: #140b20;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.edit-avatar-preview-box img,
.edit-avatar-preview-box svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-avatar-upload-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-upload-avatar-file {
  display: inline-block;
  background: linear-gradient(135deg, #ff2a6d, #d90429);
  color: #fff;
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 42, 109, 0.35);
}

.btn-upload-avatar-file:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 42, 109, 0.5);
}

.hidden-file-input {
  display: none !important;
}

.edit-upload-hint {
  font-size: 11px;
  color: #9d8db9;
}

.edit-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px;
  background: rgba(15, 8, 25, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.edit-preset-item {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  background: #190c2a;
}

.edit-preset-item:hover {
  transform: scale(1.1);
  border-color: rgba(5, 217, 232, 0.7);
}

.edit-preset-item.selected {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 14px rgba(5, 217, 232, 0.8) !important;
  transform: scale(1.12);
}

.edit-preset-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.edit-text-input {
  width: 100%;
  background: rgba(25, 12, 40, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  padding: 10px 14px 10px 38px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.edit-text-input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(5, 217, 232, 0.35);
}

.edit-profile-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 9, 31, 0.98);
  flex-shrink: 0 !important;
  position: relative;
  z-index: 100001;
}

.btn-cancel-edit {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  pointer-events: auto !important;
}

.btn-cancel-edit:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-save-profile {
  background: linear-gradient(135deg, #05d9e8, #0056b3);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(5, 217, 232, 0.4);
  transition: all 0.2s ease;
  position: relative;
  z-index: 100002;
  pointer-events: auto !important;
}

.btn-save-profile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(5, 217, 232, 0.6);
}

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

/* ================= REGISTRATION IMMUTABLE WARNING ================= */
.registration-immutable-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 170, 0, 0.12);
  border: 1.5px solid rgba(255, 180, 0, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(255, 170, 0, 0.15);
}
.registration-immutable-warning .warning-icon {
  font-size: 22px;
  line-height: 1.2;
  flex-shrink: 0;
}
.registration-immutable-warning .warning-text {
  font-size: 12.5px;
  color: #ffdf9e;
  line-height: 1.45;
}
.registration-immutable-warning .warning-text strong {
  color: #ffe8b3;
  font-weight: 700;
}

/* ================= PROFILE AVATAR CAMERA & ZOOM ================= */
.profile-avatar-circle {
  cursor: pointer;
  position: relative;
  transition: transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.profile-avatar-circle:hover {
  transform: scale(1.04);
}
.profile-avatar-zoom-hint {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.profile-avatar-circle:hover .profile-avatar-zoom-hint {
  opacity: 1;
}

.profile-avatar-edit-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #05d9e8, #ff2a6d);
  color: #fff;
  border: 2.5px solid #140b20;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 0 12px rgba(5, 217, 232, 0.7);
  z-index: 55;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 0;
  outline: none;
}
.profile-avatar-edit-badge:hover {
  transform: scale(1.15) rotate(-6deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.9), 0 0 18px rgba(255, 42, 109, 0.9);
}

/* ================= IMMUTABLE INFO BAR IN EDIT MODAL ================= */
.edit-immutable-info-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.immutable-info-item {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.immutable-info-item .info-lbl {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}
.immutable-info-item .info-val {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex: 1;
}
.immutable-info-item .lock-icon {
  font-size: 14px;
  opacity: 0.7;
}

/* ================= ENLARGED AVATAR LIGHTBOX ================= */
.avatar-viewer-dialog {
  max-width: 480px;
  width: 92%;
  background: #12091f;
  border: 1.5px solid rgba(255, 42, 109, 0.5);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 30px rgba(255, 42, 109, 0.35);
}
.avatar-viewer-body {
  padding: 18px 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar-viewer-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  border-radius: 0;
  overflow: hidden;
  background: radial-gradient(circle, #25133d 0%, #0d0718 100%);
  border: 2px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-viewer-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* Увеличенное фото: аватар занимает ВЕСЬ квадрат без скруглений */
.avatar-viewer-content img,
.avatar-viewer-content svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
  display: block;
}
.avatar-viewer-content img,
.avatar-viewer-content .avatar-img,
.avatar-viewer-content .avatar-3d-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
  -webkit-touch-callout: none !important;
}
.avatar-viewer-content .avatar-emoji-fallback {
  font-size: 140px;
  line-height: 1;
  pointer-events: none !important;
  user-select: none !important;
}
.photo-protection-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  background: transparent;
  pointer-events: auto;
  cursor: default;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
}
.avatar-viewer-footer-info {
  margin-top: 14px;
  text-align: center;
}
.protection-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #05d9e8;
  background: rgba(5, 217, 232, 0.12);
  border: 1px solid rgba(5, 217, 232, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ================= ANTI-SAVE & ANTI-SCREENSHOT PROTECTION ================= */
img,
.player-avatar-circle,
.profile-avatar-circle,
.avatar-viewer-container,
.avatar-worn-headwear,
.corner-gift-badge,
.collected-gift-chip {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-user-drag: none !important;
}

/* Anti-Screenshot Overlay Curtain */
.screenshot-shield-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #080311;
  z-index: 99999999;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  user-select: none !important;
}
.screenshot-shield-content {
  background: rgba(20, 10, 35, 0.96);
  border: 2px solid #ff2a6d;
  box-shadow: 0 0 50px rgba(255, 42, 109, 0.8), 0 0 100px rgba(255, 42, 109, 0.4);
  padding: 36px 42px;
  border-radius: 24px;
  max-width: 440px;
}
.screenshot-shield-content .shield-icon {
  font-size: 54px;
  margin-bottom: 14px;
  animation: pulse 1s infinite alternate;
}
.screenshot-shield-content .shield-title {
  font-size: 20px;
  font-weight: 800;
  color: #ff2a6d;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(255, 42, 109, 0.7);
}
.screenshot-shield-content .shield-desc {
  font-size: 13.5px;
  color: #fff;
  line-height: 1.5;
  opacity: 0.9;
}

/* v82: затемнение при потере активности окна (защита от скриншотов второго экрана) */
.focus-guard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #05010c;
  z-index: 99999998;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.focus-guard-overlay.hidden { display: none !important; }
.focus-guard-box {
  max-width: 460px;
  padding: 30px 34px;
  border-radius: 22px;
  border: 2px solid #ff2a6d;
  background: rgba(20, 10, 35, 0.96);
  box-shadow: 0 0 50px rgba(255, 42, 109, 0.7);
}
.focus-guard-icon { font-size: 52px; margin-bottom: 12px; animation: pulse 1s infinite alternate; }
.focus-guard-title {
  font-size: 20px;
  font-weight: 800;
  color: #ff2a6d;
  margin-bottom: 10px;
  text-shadow: 0 0 12px rgba(255, 42, 109, 0.7);
}
.focus-guard-desc { font-size: 13.5px; color: #fff; line-height: 1.5; opacity: 0.92; }

/* Privacy Blur Shield on Focus Loss (Snipping tool interception) */
body.privacy-shield-active .app-container {
  filter: blur(35px) brightness(0.2) !important;
  transition: filter 0.05s ease;
  pointer-events: none !important;
}
body.privacy-shield-active::before {
  content: '🚫 Скриншоты в игре запрещены!';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(14, 6, 24, 0.96);
  border: 2px solid #ff2a6d;
  box-shadow: 0 0 40px rgba(255, 42, 109, 0.8);
  padding: 20px 32px;
  border-radius: 16px;
  font-size: 20px;
  font-weight: 800;
  color: #ff2a6d;
  z-index: 9999999;
  text-align: center;
  pointer-events: none;
}

/* Print Media Protection */
@media print {
  html, body, * {
    display: none !important;
    visibility: hidden !important;
  }
}

/* ==========================================================================
   ПОДАРКИ И РУБИНЫ (Gifts & Rubies Polish)
   ========================================================================== */

/* 3. Отключи анимацию подарков: статические подарки на аватарках больше не скачут и не пульсируют */
.seat-gift-badge,
.seat-corner-gift-badge,
.corner-gift-badge,
.seat-corner-gifts-cluster,
.seat-corner-gift-slot,
.avatar-worn-headwear,
.active-gift-slot {
  animation: none !important;
  transition: none !important;
}

/* 2 & 4. Анимация полета подарков и красных рубинов от отправителя к получателю */
#flyingGiftsOverlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999999;
  overflow: hidden;
}

.flying-gift-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 54px;
  height: 54px;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform, opacity;
  filter: drop-shadow(0 0 16px rgba(255, 30, 60, 0.95)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7));
  z-index: 999999;
}

.flying-gift-item.ruby-fly {
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 0 22px rgba(255, 0, 55, 1)) drop-shadow(0 0 10px rgba(255, 215, 0, 0.85));
}

.flying-gift-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.flying-gift-item.text-icon {
  font-size: 42px;
  line-height: 1;
}

.gift-landing-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 10px currentColor;
  z-index: 999999;
  transition: transform 0.35s ease-out, opacity 0.35s ease-out;
}

.avatar-gift-received-pulse {
  animation: giftReceivedPulse 0.45s ease-out !important;
}

@keyframes giftReceivedPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 42, 109, 0)); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 24px rgba(255, 30, 60, 1)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 42, 109, 0)); }
}

/* 5. Чат: системное сообщение о подарке с именами, количеством и бейджем подарка */
.chat-msg.gift-system-msg,
.chat-msg.system-msg {
  width: 100% !important;
  max-width: 100% !important;
}

.sys-content.gift-notice {
  width: 100% !important;
  box-sizing: border-box !important;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.28) 0%, rgba(138, 43, 226, 0.32) 100%) !important;
  border: 1.5px solid rgba(255, 42, 109, 0.75) !important;
  border-radius: 14px !important;
  padding: 10px 14px !important;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(255, 42, 109, 0.35), 0 0 12px rgba(255, 215, 0, 0.25) !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 6px 0 !important;
  font-size: 14px !important;
  line-height: 1.45 !important;
  text-align: left !important;
}

.chat-gift-lead-icon {
  font-size: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

.chat-gift-lead-text {
  flex: 1;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chat-gift-verb {
  color: #e0d8ff;
  font-weight: 500;
  font-size: 13px;
}

.chat-gift-item-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.5);
  border-radius: 999px;
  padding: 2px 9px 2px 7px;
  font-weight: 700;
  color: #ffd700;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.chat-gift-item-pill.ruby-pill {
  background: linear-gradient(135deg, rgba(255, 20, 50, 0.35), rgba(180, 0, 30, 0.45));
  border-color: rgba(255, 40, 70, 0.85);
  color: #ffccd5;
  box-shadow: 0 0 10px rgba(255, 0, 60, 0.4);
}

.chat-gift-thumb {
  width: 20px;
  height: 20px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}



/* ========== ПОЦЕЛУИ: отпечаток на аватарке получателя (v25) ========== */
.kiss-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 92px;
  height: 92px;
  object-fit: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 60;
  animation: kissStamp 0.8s ease forwards;
}
@keyframes kissStamp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
  35% { opacity: 1; transform: translate(-50%, -50%) scale(0.95); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ========== v29: картинки подарков в угловых бейджах — маленькие, не закрывают аватарку ========== */
.corner-gift-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.corner-gift-badge.food-badge {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

/* ========== v30: бейдж еды крупнее и без рамки/обводки/свечения ========== */
.corner-gift-badge.food-badge {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  box-shadow: none;
  margin-left: -6px;
}
.corner-gift-badge.food-badge .corner-gift-img {
  border-radius: 50%;
  box-shadow: none;
  outline: none;
}

/* ========== v31: аватарки на местах крупнее (84px), всё помещается как раньше ========== */
.player-avatar-circle {
  width: 84px;
  height: 84px;
}
.avatar-worn-headwear {
  top: -31px;
  left: -2px;
  width: 72px;
  height: 72px;
}
.player-avatar-wrap .seat-corner-gifts-cluster,
.seat-corner-gifts-cluster {
  bottom: -10px;
  right: -18px;
}
.seat-name-plate {
  margin-top: 6px;
}

/* ========== v32: аватарки на местах ещё немного крупнее (92px) ========== */
.player-avatar-circle {
  width: 92px;
  height: 92px;
}
.avatar-worn-headwear {
  top: -34px;
  left: -2px;
  width: 80px;
  height: 80px;
}
.player-avatar-wrap .seat-corner-gifts-cluster,
.seat-corner-gifts-cluster {
  bottom: -14px;
  right: -22px;
}
.seat-name-plate {
  margin-top: 9px;
}

/* ========== v42: напитки — мельче в витрине, крупнее у аватара на месте игрока ========== */
.gift-card-img.drink-card-img {
  width: 44px;
  height: 44px;
  margin-bottom: 26px;
}
.corner-gift-badge.food-badge.drink-badge {
  width: 48px;
  height: 48px;
  margin-left: -6px;
  margin-bottom: -3px;
}

/* ===== v51: витрина «Цветы и игрушки», количество, «всем за столом» ===== */
/* Все вкладки категорий должны помещаться и быть видны при открытии витрины */
.gifts-categories-nav {
  flex-wrap: wrap !important;
  row-gap: 8px;
}
.gifts-categories-nav .btn-cat {
  flex: 0 1 auto;
  white-space: nowrap;
}

/* Счётчик количества подарков */
.gift-qty-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 12px;
  margin: 2px 0 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 120, 200, 0.25);
  border-radius: 12px;
  color: #f7e9ff;
  font-size: 15px;
}
.gift-qty-box .gift-qty-label { opacity: 0.85; }
.gift-qty-box b {
  min-width: 30px;
  text-align: center;
  font-size: 17px;
  color: #ffd166;
}
.gift-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff5fae, #c63dff);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}
.gift-qty-btn:hover { filter: brightness(1.1); }
.gift-qty-btn:active { transform: scale(0.94); }

/* Кнопка «Всем за столом» в шапке */
#btnGiftAllTable.btn-header {
  background: linear-gradient(135deg, #ff5fae, #c63dff);
  color: #fff;
}
#btnGiftAllTable.btn-header:hover { filter: brightness(1.08); }

/* Бейдж раздела «Цветы и игрушки» — крупный, изображение ЦЕЛИКОМ (без обрезки) */
.corner-gift-badge.toys-badge {
  width: 64px;
  height: 64px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: none;
  margin-left: -2px;
  margin-bottom: -6px;
  /* v54: ещё немного вправо от аватарки */
  position: relative;
  left: 7px;
}
.corner-gift-badge.toys-badge .corner-gift-img {
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
/* Напитки тоже показываем целиком, без обрезки краёв */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img {
  object-fit: contain;
  border-radius: 0;
}

/* Карточки раздела: изображения чуть крупнее напитков, но компактные */
.gift-card-img.toys-card-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 14px;
}

/* ===== v52: количество/цена/итого под каждым подарком; кнопка «Подарки всем» под ползунком музыки ===== */
.gift-qty-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 0 3px;
}
.gift-qty-row .gift-qty-btn {
  width: 26px;
  height: 26px;
  font-size: 15px;
  border-radius: 8px;
}
.gift-qty-val {
  min-width: 22px;
  text-align: center;
  font-weight: 800;
  color: #ffd166;
  font-size: 14px;
}
.gift-card-total {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #9ff0c0;
  margin: 0 0 7px;
}
.gift-card-total .game-ruby-img-inline {
  width: 14px;
  height: 14px;
}

/* Кнопка «Подарки всем» — под ползунком громкости музыки */
#btnGiftAllTable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px auto 0;
  padding: 8px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff5fae, #c63dff);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(198, 61, 255, 0.45);
  white-space: nowrap;
}
#btnGiftAllTable:hover { filter: brightness(1.1); }
#btnGiftAllTable:active { transform: scale(0.96); }

/* ===== v56: списки заблокированных в панели администратора ===== */
.admin-card-wide { grid-column: 1 / -1; }
.admin-blocked-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.admin-blocked-col h5 {
  margin: 0 0 8px;
  font-size: 13px;
  color: #ffb3d9;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-blocked-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 4px;
}
.admin-blocked-empty {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13px;
  padding: 6px 2px;
}
.admin-blocked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 90, 90, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
}
.admin-blocked-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.admin-blocked-info b {
  font-size: 14px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-blocked-info span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.btn-unblock-player {
  flex: 0 0 auto;
  border: none;
  border-radius: 9px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
}
.btn-unblock-player:hover { filter: brightness(1.1); }

/* ===== v57: кнопки списков блоков + окна + кнопки бана в профиле ===== */
.admin-blocked-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.admin-blocked-modal-body {
  padding: 16px;
  max-height: 55vh;
  overflow-y: auto;
}
.btn-ban-profile {
  background: linear-gradient(135deg, #e74c3c, #c0392b) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 800;
}
/* v57: ряд действий в профиле — аккуратный перенос кнопок */
.profile-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
}
.profile-actions-row .btn-ban-profile {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
}
/* v57 fix2: бан-кнопки в профиле — каждая на своей строке, без наложений */
.profile-actions-row .btn-ban-profile {
  flex: 1 1 100%;
  width: 100%;
  justify-content: center;
  margin: 2px 0;
}

/* ===== v58: красная точка НО на значке сообщений ===== */
.pm-red-dot {
  position: absolute;
  top: -3px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff2d2d;
  border: 2px solid #2b0a12;
  box-shadow: 0 0 6px rgba(255, 45, 45, 0.9);
  z-index: 5;
}
.pm-red-dot.hidden { display: none; }
/* ===== v58: кнопка Помощь ===== */
.btn-help-header .icon { font-size: 18px; }
/* ===== v58: вкладки мессенджера ===== */
.messenger-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  flex-wrap: wrap;
}
.btn-messenger-tab {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #ffd9e8;
}
.btn-messenger-tab.active {
  background: linear-gradient(135deg, #ff5f9e, #d6336c);
  color: #fff;
}
.btn-messenger-tab.hidden { display: none; }
.messenger-extra-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.messenger-extra-view.hidden { display: none; }
.messenger-extra-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffd166;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
}
.messenger-extra-feed {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.help-msg-card, .security-alert-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
}
.help-msg-card .hm-head, .security-alert-card .sa-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  color: #8ce99a;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.security-alert-card { border-color: rgba(255, 80, 80, 0.55); }
.security-alert-card .sa-head { color: #ff8787; }
.security-alert-card .sa-ips { font-size: 11.5px; opacity: 0.85; margin-top: 4px; }

/* v95: кнопка удаления сообщения в разделах мессенджера (Чаты / Помощь / Безопасность) */
.btn-del-extra-msg,
.btn-del-pm-msg {
  border: 1px solid rgba(255, 107, 129, 0.5);
  background: rgba(255, 60, 90, 0.16);
  color: #ff8d9e;
  border-radius: 7px;
  cursor: pointer;
  font-size: 10.5px;
  line-height: 1;
  padding: 3px 5px;
  flex: 0 0 auto;
}
.btn-del-extra-msg:hover,
.btn-del-pm-msg:hover { background: rgba(255, 60, 90, 0.34); color: #fff; }
.hm-head-right { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.btn-del-pm-msg { margin-left: 6px; opacity: 0.7; vertical-align: middle; }
.wa-bubble:hover .btn-del-pm-msg { opacity: 1; }
/* кнопки в шапке разделов Помощь / Безопасность */
.messenger-extra-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.messenger-extra-actions .btn-gold-action { white-space: nowrap; }
.messenger-body.hidden { display: none; }
/* ===== v58: модалка помощи ===== */
.help-modal-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.help-modal-hint { font-size: 12.5px; opacity: 0.85; margin: 0; }
.help-modal-textarea {
  min-height: 110px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

/* ===== v59: двухпанельные вкладки Помощь/Безопасность ===== */
.messenger-two-pane {
  flex: 1;
  display: flex;
  min-height: 0;
}
.messenger-extra-list {
  width: 220px;
  min-width: 180px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
}
.messenger-extra-list .extra-partner-item {
  border: none;
  text-align: left;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  color: #ffe3ee;
  font-size: 12.5px;
  font-weight: 700;
}
.messenger-extra-list .extra-partner-item.active {
  background: linear-gradient(135deg, #ff5f9e, #d6336c);
  color: #fff;
}
.messenger-extra-list .extra-partner-item .ep-sub {
  display: block;
  font-weight: 500;
  font-size: 11px;
  opacity: 0.8;
}
.messenger-extra-chat {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* ===== v59: баннер ежемесячной награды в рейтинге ===== */
.leaderboard-monthly-notice {
  margin: 10px 14px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 215, 102, 0.18), rgba(255, 95, 158, 0.16));
  border: 1px solid rgba(255, 215, 102, 0.45);
  color: #ffe08a;
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* ===== v60: ПРАВИЛА ИГРЫ И ГАЛОЧКА СОГЛАСИЯ ПРИ РЕГИСТРАЦИИ ===== */
.reg-rules-consent-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.14), rgba(5, 217, 232, 0.10));
  border: 1.5px solid rgba(255, 42, 109, 0.4);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.25s ease;
}

.reg-rules-consent-bar.hidden {
  display: none !important;
}

.reg-rules-consent-bar.rules-checked {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.16), rgba(5, 217, 232, 0.12));
  border-color: rgba(46, 204, 113, 0.65);
  box-shadow: 0 0 16px rgba(46, 204, 113, 0.25);
}

.reg-rules-consent-bar.reg-rules-shake {
  animation: regRulesPulseShake 0.55s ease;
  border-color: #ff2a6d;
  box-shadow: 0 0 22px rgba(255, 42, 109, 0.85);
}

@keyframes regRulesPulseShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.btn-game-rules {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1.5px solid rgba(255, 215, 0, 0.7);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 95, 158, 0.28));
  color: #ffe89e;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.25);
  transition: all 0.2s ease;
}

.btn-game-rules:hover {
  transform: translateY(-1px) scale(1.02);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.35), rgba(255, 42, 109, 0.42));
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.45);
  color: #fff;
}

.btn-game-rules:active {
  transform: translateY(0) scale(0.98);
}

.rules-btn-icon {
  font-size: 15px;
  line-height: 1;
}

.reg-rules-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.reg-rules-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.reg-rules-custom-check {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  background: rgba(15, 8, 28, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.5);
}

.reg-rules-checkbox-label:hover .reg-rules-custom-check {
  border-color: #ffd166;
  box-shadow: 0 0 10px rgba(255, 209, 102, 0.45);
}

.reg-rules-checkbox-input:checked + .reg-rules-custom-check {
  background: linear-gradient(135deg, #2ecc71, #1abc9c);
  border-color: #7bed9f;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.75);
}

.reg-rules-checkbox-input:checked + .reg-rules-custom-check::after {
  content: '✓';
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.reg-rules-consent-text {
  font-size: 12.5px;
  font-weight: 700;
  color: #f3e8ff;
  line-height: 1.25;
}

.reg-rules-checkbox-input:checked ~ .reg-rules-consent-text {
  color: #9ff0c0;
}

/* Неактивное состояние кнопки регистрации до принятия правил */
.btn-enter-game.btn-disabled-rules {
  opacity: 0.48 !important;
  filter: grayscale(0.45) !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

/* Модальное окно «Правила игры» */
.game-rules-dialog {
  max-width: 680px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.game-rules-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-rules-body::-webkit-scrollbar {
  width: 6px;
}

.game-rules-body::-webkit-scrollbar-thumb {
  background: var(--neon-pink);
  border-radius: 6px;
}

.rules-intro-banner {
  background: linear-gradient(135deg, rgba(255, 42, 109, 0.2), rgba(138, 43, 226, 0.22));
  border: 1px solid rgba(255, 42, 109, 0.45);
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 13px;
  line-height: 1.45;
  color: #ffeef5;
}

.rules-section-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 15px;
}

.rules-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.rules-sec-icon {
  font-size: 18px;
  line-height: 1;
}

.rules-section-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #ffd166;
}

.rules-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.8px;
  line-height: 1.45;
  color: #e9dfff;
}

.rules-list ul {
  margin-top: 4px;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rules-list strong {
  color: #fff;
}

.rules-list code {
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 12px;
  color: #ffd166;
}

.game-rules-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(20, 10, 32, 0.98);
  border-top: 1px solid rgba(255, 42, 109, 0.25);
  flex-shrink: 0;
}

.btn-accept-rules-modal {
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 800;
}

@media (max-width: 480px) {
  .reg-rules-consent-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  .reg-rules-checkbox-label {
    justify-content: center;
  }
}

/* Кнопка «🆘 Помощь — написать Администратору» в окне регистрации/входа */
.btn-auth-help {
  width: 100%;
  margin-top: 8px;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 215, 0, 0.45);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.14), rgba(255, 42, 109, 0.14));
  color: #ffe066;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-auth-help:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.26), rgba(255, 42, 109, 0.24));
  border-color: #ffd700;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.25);
}

/* Ползунок звуков игры с нотками (🎵) под ползунком музыки */
.main-sfx-volume-hud {
  margin-top: 5px;
  border-color: rgba(5, 217, 232, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6), 0 0 10px rgba(5, 217, 232, 0.2);
}

.main-sfx-icon {
  font-size: 13px;
  color: #ffd700;
  user-select: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.main-sfx-icon:hover {
  transform: scale(1.12);
}

.main-sfx-icon.sfx-muted {
  opacity: 0.48;
  filter: grayscale(0.8);
}

.main-sfx-icon.sfx-muted::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: #ff2a55;
  transform: rotate(-38deg);
  border-radius: 2px;
  box-shadow: 0 0 4px rgba(255, 42, 85, 0.9);
}

/* Красная рамка для вопроса викторины в чате (отправитель: Викторина) */
.chat-msg-quiz-red {
  margin: 6px 0;
}

.quiz-red-frame-card {
  border: 2px solid #ff1e38 !important;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(50, 10, 22, 0.92), rgba(28, 8, 18, 0.95));
  padding: 10px 12px;
  box-shadow: 0 0 14px rgba(255, 30, 56, 0.45), inset 0 0 8px rgba(255, 30, 56, 0.15);
}

.quiz-red-frame-author {
  color: #ff4d6d;
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: 0 0 8px rgba(255, 42, 85, 0.55);
}

.quiz-red-frame-text {
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.4;
}

.active-quiz-card {
  border: 2px solid #ff1e38 !important;
  box-shadow: 0 4px 18px rgba(255, 30, 56, 0.4) !important;
}



/* ===== v67: у каждого стола свой общий чат ===== */
.chat-empty-note {
  margin: 10px 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 42, 109, 0.35);
  color: #cbb8e6;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}

.chat-title-text {
  white-space: nowrap;
}

/* =====================================================================
   v69/v91: ИГРА ЦЕЛИКОМ ПОМЕЩАЕТСЯ НА ЭКРАНЕ СМАРТФОНА (телефоны и планшеты)
   v91: плавающей кнопки «Чат» больше нет — чат стола всегда виден внизу экрана
   ===================================================================== */
#btnMobileChatToggle { display: none !important; }

@media (max-width: 900px) {
  html, body {
    height: 100%;
    max-width: 100%;
  }

  body {
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
  }

  .app-container {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
  }

  /* Шапка в одну строку, прокручивается пальцем */
  .app-header {
    height: auto;
    min-height: 48px;
    padding: 5px 8px;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .app-header::-webkit-scrollbar { display: none; }
  .header-left, .header-center, .header-right {
    flex: 0 0 auto;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .header-center { order: 0; width: auto; padding-bottom: 0; overflow: visible; }
  .app-header .btn-header { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  .app-header .btn-header .text,
  .logo-subtitle { display: none; }
  .logo-title { font-size: 15px; }
  .ruby-balance-card { padding: 5px 9px; }

  /* Основная область: стол занимает весь экран */
  .main-content {
    flex-direction: column;
    height: auto;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  .table-section {
    flex: 1 1 auto;
    min-height: 0;
    padding: 2px;
    align-items: flex-start;   /* v91: отступ сверху считает applyMobileLayout — стол встаёт под строкой музыки */
    justify-content: center;
    overflow: hidden;
  }

  .arena-wrapper {
    flex: 0 0 auto;
    margin-top: 0;
    transform-origin: center center;
  }

  .table-ambience {
    width: 92%;
    height: 58%;
    filter: blur(28px);
  }

  .gazebo-turntable-widget {
    top: 6px;
    right: 6px;
    transform: scale(var(--phone-ui-scale, 0.8));
    transform-origin: top right;
  }

  /* v91: чат стола закреплён внизу экрана и виден сразу — сообщения и викторина.
     Кнопка «Чат» убрана: выдвигать/сворачивать больше нечего. */
  .chat-sidebar {
    position: static;
    flex: 0 0 auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: 40vh;
    min-height: 210px;
    max-height: 290px;
    transform: none;
    transition: none;
    z-index: auto;   /* v91: flex-элемент с z-index перекрывал окна (вход/подарки) — порядок по документу */
    border-left: none;
    border-top: 2px solid rgba(255, 42, 109, 0.5);
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.6);
  }

  .chat-messages { -webkit-overflow-scrolling: touch; }

  /* Окна (вход, подарки, профиль, админка) по размеру экрана телефона */
  .modal-overlay { padding: 6px; align-items: flex-start; padding-top: max(10px, env(safe-area-inset-top)); }
  .modal-dialog {
    width: 97vw;
    max-width: 97vw;
    max-height: 92dvh;
    border-radius: 18px;
  }
  .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .modal-header, .modal-footer { padding: 10px 12px; }
  .auth-dialog .auth-body { padding: 14px 12px; }

  /* Сетки подарков/каталога/топа — в 2 колонки, чтобы всё влезало на экран */
  .gifts-grid-scroll {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .tables-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .topup-packages-grid,
  .payment-methods-grid,
  .admin-panel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .avatar-presets-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  /* Кнопки и поля не «выпирают» за экран */
  button, input, select, textarea { max-width: 100%; }
  .chat-input, .chat-form input { font-size: 16px; } /* iOS: без авто-зума при фокусе */
}

@media (max-width: 480px) {
  .app-header { min-height: 44px; padding: 4px 6px; }
  .app-header .btn-header { padding: 5px 7px; font-size: 11.5px; }
  .logo-title { font-size: 13.5px; }
  .modal-dialog { width: 98vw; max-width: 98vw; }
}

/* v91: альбомная ориентация телефона — чат остаётся внизу, но пониже */
@media (max-width: 900px) and (orientation: landscape) {
  .chat-sidebar { height: 36vh !important; min-height: 150px !important; max-height: 240px !important; }
}

/* ==========================================================================
   v78: НАПИТКИ — КРУПНЕЕ И ЦЕЛИКОМ (без обрезки), и в витрине, и у аватарки
   ========================================================================== */
/* Витрина: напиток-картинка (еда с kind=drink) — крупно, целиком, без обрезки */
.gift-card-img.drink-card-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 2px;
}
/* Витрина: напиток из категории «Напитки» (эмодзи) — крупнее */
.gift-card-icon.drink-card-icon {
  font-size: 64px;
  line-height: 1.05;
  margin-bottom: 2px;
}
/* У аватарки на месте игрока: напиток-картинка — крупнее и целиком, чуть наружу от аватарки */
.corner-gift-badge.food-badge.drink-badge {
  width: 64px;
  height: 64px;
  margin-left: 0;
  margin-bottom: -14px;
  border: none;
  background: transparent;
  box-shadow: none;
}
.corner-gift-badge.food-badge.drink-badge .corner-gift-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  outline: none;
}
/* У аватарки: напиток из категории «Напитки» (эмодзи) — крупнее и целиком */
.corner-gift-badge.drinks-badge {
  width: 54px;
  height: 54px;
  font-size: 30px;
  margin-left: -6px;
  margin-bottom: -4px;
}

/* ==========================================================================
   v79: НАПИТКИ — «чашка с апельсином» чуть меньше, все напитки чуть правее
   (и в витрине подарков, и у аватарки на месте игрока)
   ========================================================================== */
/* Витрина: все напитки-картинки — чуть правее */
.gift-card-img.drink-card-img {
  transform: translateX(5px) scale(0.92);   /* v79b: напитки чуть меньше */
}
/* Витрина: все напитки-эмодзи (категория «Напитки») — чуть правее */
.gift-card-icon.drink-card-icon {
  transform: translateX(5px) scale(0.92);   /* v79b: напитки чуть меньше */
}
/* Витрина: «Чай с апельсином и ежевикой» (f45) — немного меньше + чуть правее */
.gift-card-img.drink-card-img[src*="f45_chay_apelsin"] {
  transform: translateX(5px) scale(0.86);
}
/* и его же лёгкое увеличение при наведении (вместо общего прыжка) */
.gift-card:hover .gift-card-img.drink-card-img[src*="f45_chay_apelsin"] {
  transform: translateX(5px) scale(0.96) rotate(-6deg);
}
/* У аватарки: напиток-картинка — чуть правее (translate двигает сам бейдж;
   margin-left тут не работает, бейдж позиционирован отдельно) */
.corner-gift-badge.food-badge.drink-badge {
  margin-left: 6px;
  translate: 6px -24%;   /* v79c: низ подарка ровно на линии низа аватарки */
}
/* У аватарки: напиток-эмодзи — чуть правее */
.corner-gift-badge.drinks-badge {
  margin-left: 0;
  translate: 6px -17%;     /* v79c: эмодзи-напиток — низ вровень с аватаркой */
  font-size: 26px;         /* v79c: ещё чуть меньше */
}

/* ==========================================================================
   v79: убор на аватарке в основном меню сверху — не показываем совсем
   (в шапке рендерится классом .header-headwear; сам убор остаётся надет у игрока)
   ========================================================================== */
.header-avatar-container .avatar-worn-headwear,
.header-headwear {
  display: none !important;
}

/* v79b/v79c: напитки у аватарки — чуть меньше (картинки) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img {
  transform: scale(0.85);
}

 /* ниже на 2 */

/* ==========================================================================
   v79f: НАПИТКИ у аватарки — 18 напитков опущены ещё на 1 шаг, виски меньше (0.65).
   Шаг = 4% высоты картинки:
   список «на 1 вниз» → на 2 шага от базовой линии, «на 2 вниз» → на 2–4.
   Шампанское крупнее (0.95), виски меньше (0.75).
   ========================================================================== */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f41_kakao"] { transform: scale(0.95) translateY(16%); } /* крупнее, ниже на 4 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f42_goluboy"] { transform: scale(0.95) translateY(12%); } /* крупнее, ниже на 3 (без изменений) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f43_milkshake"] { transform: scale(0.95) translateY(4%); } /* крупнее, ниже на 1 (без изменений) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f44_karamel"] { transform: scale(0.95) translateY(4%); } /* крупнее, ниже на 1 (без изменений) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f45_chay_apelsin"] { transform: scale(0.85) translateY(16%); } /* ниже на 3 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f46_rozovyy_kokteyl"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f47_mokka"] { transform: scale(0.85) translateY(8%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f48_klub_milkshake"] { transform: scale(0.95) translateY(4%); } /* крупнее, ниже на 1 (без изменений) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f49_klub_limonad"] { transform: scale(0.85) translateY(8%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f50_klub_banan"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f51_milkshake_oreo"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f52_arbuznyy_kuler"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f53_glintveyn"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f54_chernichnyy"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f55_klub_fizz"] { transform: scale(0.95) translateY(4%); } /* крупнее, ниже на 1 (без изменений) */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f56_arbuz_mohito"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f57_kivi_kuler"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f59_klub_sheyk"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f60_ays_kofe"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f61_raduzhnyy"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f62_latte"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f63_kruzhka"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f64_kofe_s_mishkoy"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f65_kofe_vostochnaya"] { transform: scale(0.85) translateY(20%); } /* ниже на 4 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f66_yagodnyy_chay"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f67_chay_uzornyy"] { transform: scale(0.85) translateY(12%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f68_krasnoe_vino"] { transform: scale(0.85) translateY(8%); } /* ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f69_shampanskoe"] { transform: scale(0.95) translateY(8%); } /* крупнее, ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f70_viski_so_ldom"] { transform: scale(0.65) translateY(30%); } /* меньше + опущен (компенсация уменьшения) */ /* меньше, ниже на 2 */
.corner-gift-badge.food-badge.drink-badge .corner-gift-img[src*="f72_chernichnyy"] { transform: scale(0.85) translateY(8%); } /* ниже на 2 */


/* ==========================================================================
   v80: ЕДА — «Картофель фри» (f33), «Сырный букет» (f36), «Букет из шашлычков» (f39):
   на 2 шага крупнее и у аватарки на месте игрока, и в витрине подарков.
   Шаг = +8% (шаги в прошлый раз задавались пользователем, размер в пикселях — точен по факту).
   ========================================================================== */
/* У аватарки: картинка еды крупнее — бейдж чуть больше, картинка показывается целиком */
.corner-gift-badge.food-badge:has(.corner-gift-img[src*="f33_kartofel"]),
.corner-gift-badge.food-badge:has(.corner-gift-img[src*="f36_syryy"]),
.corner-gift-badge.food-badge:has(.corner-gift-img[src*="f39_buket_shashlichkov"]) {
  width: 52px;
  height: 52px;
}
.corner-gift-badge.food-badge .corner-gift-img[src*="f33_kartofel"],
.corner-gift-badge.food-badge .corner-gift-img[src*="f36_syryy"],
.corner-gift-badge.food-badge .corner-gift-img[src*="f39_buket_shashlichkov"] {
  object-fit: contain;
  border-radius: 0;
}
/* Витрина: эти же блюда крупнее */
.gift-card-img[src*="f33_kartofel"],
.gift-card-img[src*="f36_syryy"],
.gift-card-img[src*="f39_buket_shashlichkov"] {
  transform: scale(1.17);   /* 76px → ~89px: «на 2 крупнее» */
}

/* =====================================================================
   v83: ТЕЛЕФОН — СТОЛ КРУПНЕЕ, АВАТАРКИ НЕ НАЕЗЖАЮТ, ПРОФИЛЬ ВИДЕН ЦЕЛИКОМ
   ===================================================================== */
@media (max-width: 900px) and (orientation: portrait) {
  /* v91: компактная телефонная арена — кольцо мест обнимает стол, высота под чат снизу.
     Размеры согласованы с game.js (computePhoneSeatLayout / PHONE_RING_W). */
  .arena-wrapper {
    width: 520px !important;
    height: 455px !important;
  }
  .table-surface,
  .table-surface.table-rustic-wood,
  .table-surface.table-gazebo-oval {
    width: 420px !important;
    height: 250px !important;
  }
  .seat-item {
    width: 78px !important;
    height: 78px !important;   /* v91: высота места = аватарка + ник, чтобы содержимое не «уезжало» вверх */
  }
  .seat-item .player-avatar-circle {
    width: 62px !important;
    height: 62px !important;
  }
  .seat-item .player-nickname,
  .seat-item .nickname {
    font-size: 15px;
    max-width: 120px;
  }
}

/* Профиль игрока: всё содержимое помещается в экран телефона */
@media (max-width: 900px) {
  #profileModal .profile-dialog {
    width: calc(100vw - 14px) !important;
    max-width: 540px !important;
    max-height: calc(100vh - 14px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  #profileModal .modal-header { padding: 10px 14px; }
  #profileModal .modal-title { font-size: 16px; }
  #profileModal .profile-hero {
    padding: 12px 12px !important;
    gap: 12px !important;
    flex-wrap: wrap;
  }
  #profileModal .profile-avatar-frame {
    width: 92px !important;
    height: 92px !important;
  }
  #profileModal .profile-name-row { gap: 6px !important; }
  #profileModal .profile-name-row h2 {
    font-size: 17px !important;
    max-width: 140px !important;
  }
  #profileModal .profile-age-badge,
  #profileModal .profile-role-badge { font-size: 10px !important; padding: 2px 6px !important; }
  #profileModal .profile-rubies-row { font-size: 12.5px !important; }
  #profileModal .profile-stats-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 10px !important;
  }
  #profileModal .stat-card { padding: 7px 3px !important; border-radius: 11px !important; }
  #profileModal .stat-icon { font-size: 17px !important; margin-bottom: 0 !important; }
  #profileModal .stat-val { font-size: 15px !important; }
  #profileModal .stat-lbl { font-size: 9px !important; line-height: 1.2; }
  #profileModal .profile-collection-section { padding: 0 10px 12px !important; }
  #profileModal .btn-gift-self,
  #profileModal .btn-player-gift { padding: 7px 12px !important; font-size: 12.5px !important; }
}

/* =====================================================================
   v84: ТЕЛЕФОН — МУЗЫКА, ПОЛЗУНКИ И «ПОДАРКИ ВСЕМ» ОДНОЙ СТРОКОЙ СВЕРХУ
   (чтобы не закрывали аватарки за столом и всё помещалось на экране)
   ===================================================================== */
@media (max-width: 900px) {
  .gazebo-turntable-widget {
    /* строка прижата к вepxy стола (под шапкой игры) */
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 0 5px !important;
    transform: none !important;
    z-index: 60 !important;
    cursor: default;
  }
  .gazebo-turntable-widget:hover { transform: none !important; }
  .gazebo-turntable-widget > * { margin: 0 !important; flex: 0 0 auto; }

  /* кнопка музыки — компактно (виниловый диск на телефоне не нужен) */
  .gazebo-turntable-widget .turntable-chassis {
    padding: 4px 8px !important;
    gap: 5px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55), 0 0 10px rgba(255, 42, 109, 0.28) !important;
  }
  .gazebo-turntable-widget .turntable-disc-wrap { display: none !important; }
  .gazebo-turntable-widget .turntable-badge-btn {
    font-size: 10px !important;
    padding: 3px 6px !important;
    letter-spacing: 0.3px !important;
  }
  .gazebo-turntable-widget .turntable-queue-count { font-size: 10px !important; }

  /* ползунки громкости — узкие, в одну строку */
  .gazebo-turntable-widget .main-music-volume-hud {
    padding: 5px 6px !important;
    gap: 4px !important;
    border-radius: 11px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  }
  .gazebo-turntable-widget .main-vol-icon { font-size: 12px !important; }
  .gazebo-turntable-widget .main-volume-slider {
    width: var(--phone-slider-w, 44px) !important;
    min-width: 30px !important;
  }

  /* кнопка «🎁 Подарки всем» — компактно, в той же строке */
  .gazebo-turntable-widget #btnGiftAllTable {
    padding: 6px 8px !important;
    font-size: 11px !important;
    border-radius: 11px !important;
    box-shadow: 0 4px 12px rgba(198, 61, 255, 0.35) !important;
  }
}

/* =====================================================================
   v86: ТЕЛЕФОН — КАТАЛОГ ПЕСЕН ЦЕЛИКОМ ВЛЕЗАЕТ В ЭКРАН,
        НАЗВАНИЯ ПЕСЕН ЧИТАЕМЫ (раньше их сжимало до нуля)
   ===================================================================== */
@media (max-width: 900px) {
  /* окно каталога — почти во весь экран, без обрезки */
  #songCatalogModal .song-catalog-dialog {
    width: calc(100vw - 10px) !important;
    max-width: none !important;
    max-height: calc(100vh - 10px) !important;
    border-radius: 16px !important;
  }
  #songCatalogModal .modal-header { padding: 9px 12px !important; }
  #songCatalogModal .modal-title { font-size: 15.5px !important; }
  #songCatalogModal .modal-subtitle { font-size: 10.5px !important; line-height: 1.3; margin-top: 2px !important; }
  #songCatalogModal .modal-title-wrap { gap: 8px; }
  #songCatalogModal .m-icon { font-size: 18px !important; }
  #songCatalogModal .btn-close-modal { width: 30px !important; height: 30px !important; font-size: 19px !important; }

  /* тело каталога: список занимает ВСЁ оставшееся место и прокручивается внутри себя */
  #songCatalogModal .song-catalog-body {
    padding: 8px 10px 10px !important;
    gap: 8px !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }
  .song-cards-list {
    flex: 1 1 auto !important;
    max-height: none !important;
    min-height: 90px;
    gap: 5px !important;
  }

  /* строка каталога: название на всю ширину, в 2 строки — читаемо */
  .song-catalog-row { padding: 8px 9px !important; gap: 8px !important; }
  .song-row-meta { flex: 1 1 auto !important; gap: 7px !important; align-items: flex-start !important; }
  .song-row-idx { width: 15px !important; font-size: 11px !important; padding-top: 1px; }
  .song-row-details { flex: 1 1 auto !important; min-width: 0 !important; gap: 2px !important; }
  .song-row-title {
    white-space: normal !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    font-size: 12.5px !important;
    line-height: 1.25 !important;
  }
  .song-row-artist {
    font-size: 10.5px !important;
    gap: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .song-row-artist > span:first-child { overflow: hidden; text-overflow: ellipsis; }
  .song-row-dur { flex-shrink: 0; }
  .song-row-actions { gap: 5px !important; }
  .btn-add-to-playlist { padding: 8px 9px !important; font-size: 11px !important; border-radius: 10px !important; }
  .btn-delete-track-admin { padding: 8px 7px !important; font-size: 11px !important; border-radius: 10px !important; }

  /* поиск и строка статуса — компактно */
  #songCatalogModal .catalog-search-bar input {
    padding: 8px 10px 8px 30px !important;
    font-size: 12.5px !important;
  }
  #songCatalogModal .catalog-status-row { font-size: 11px !important; padding: 0 2px; gap: 6px; }
  #songCatalogModal .catalog-price-tag { font-size: 11px !important; }

  /* форма «Добавить свой трек» — свёрнута, чтобы каталог был виден целиком */
  #songCatalogModal .player-upload-card { padding: 10px 11px !important; gap: 8px !important; margin-bottom: 0 !important; }
  #songCatalogModal .player-upload-header { cursor: pointer; align-items: center; }
  #songCatalogModal .player-upload-header::after {
    content: '▾';
    margin-left: auto;
    font-size: 15px;
    color: var(--neon-gold);
    transition: transform 0.2s ease;
  }
  #songCatalogModal .player-upload-card:not(.is-collapsed) .player-upload-header::after { transform: rotate(180deg); }
  #songCatalogModal .player-upload-titles h4 { font-size: 12.5px !important; }
  #songCatalogModal .player-upload-card.is-collapsed .player-upload-titles p,
  #songCatalogModal .player-upload-card.is-collapsed .player-mp3-form { display: none !important; }
  #songCatalogModal .player-form-row { grid-template-columns: 1fr !important; }
  #songCatalogModal .player-file-row { gap: 7px !important; }
  #songCatalogModal .btn-gold-action { width: 100%; justify-content: center; }
}

/* v86: последняя строка каталога не должна прятаться за кнопкой чата на телефоне */
@media (max-width: 900px) {
  .song-cards-list { padding-bottom: 58px !important; }
  #songCatalogModal .catalog-status-row { flex-wrap: wrap; }
}

/* ===== v88: кнопки «Очистить» и «Удалить» в личной переписке ===== */
.btn-messenger-chat-action {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.18s ease;
  margin-left: 6px;
}
.btn-messenger-chat-action:hover { background: rgba(5, 217, 232, 0.22); border-color: rgba(5, 217, 232, 0.5); }
.btn-messenger-chat-action.is-danger:hover { background: rgba(255, 42, 109, 0.25); border-color: rgba(255, 42, 109, 0.6); }
.btn-messenger-chat-action:active { transform: scale(0.94); }

/* простое окно подтверждения */
.mn-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999997;
  background: rgba(5, 1, 12, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(4px);
}
.mn-confirm-box {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(145deg, #1d102f, #12091f);
  border: 1.5px solid rgba(255, 42, 109, 0.45);
  border-radius: 18px;
  padding: 18px 18px 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  text-align: center;
}
.mn-confirm-title { font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.mn-confirm-text { font-size: 13px; color: #cbb8e8; line-height: 1.5; margin-bottom: 14px; }
.mn-confirm-actions { display: flex; gap: 10px; }
.mn-confirm-actions button {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: none;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.mn-confirm-cancel { background: rgba(255, 255, 255, 0.1); color: #e8dcff; }
.mn-confirm-ok { background: linear-gradient(135deg, #ff2a6d, #9b51e0); color: #fff; }
.mn-confirm-ok.is-danger { background: linear-gradient(135deg, #ff2a6d, #b3001b); }
@media (max-width: 900px) {
  .btn-messenger-chat-action { width: 30px; height: 30px; font-size: 14px; margin-left: 4px; }
  #messengerChatHeader .btn-sit-text { display: none; }
}

/* =====================================================================
   v89: КРАСНАЯ ТОЧКА О НОВЫХ СООБЩЕНИЯХ — крупная, пульсирующая, со счётчиком.
        На телефоне кнопка «Сообщения» всегда видна (шапка не «увозит» её за край).
   ===================================================================== */
.pm-red-dot {
  position: absolute;
  top: -10px;
  right: -7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ff2020;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 10px rgba(255, 32, 32, 0.95), 0 0 0 rgba(255, 32, 32, 0.7);
  z-index: 20;
  animation: pmDotPulse 1.15s ease-in-out infinite;
  pointer-events: none;
}
.pm-red-dot.hidden { display: none; }

@keyframes pmDotPulse {
  0%   { transform: scale(1);    box-shadow: 0 0 10px rgba(255, 32, 32, 0.95), 0 0 0 0 rgba(255, 32, 32, 0.65); }
  70%  { transform: scale(1.18); box-shadow: 0 0 14px rgba(255, 32, 32, 1),   0 0 0 9px rgba(255, 32, 32, 0); }
  100% { transform: scale(1);    box-shadow: 0 0 10px rgba(255, 32, 32, 0.95), 0 0 0 0 rgba(255, 32, 32, 0); }
}

.pm-unread-badge {
  background: #ff2020;
  color: #fff;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(255, 32, 32, 0.8);
}
.pm-unread-badge.hidden { display: none; }

/* на телефоне кнопка сообщений закреплена у правого края — её видно даже когда шапка прокручивается */
@media (max-width: 900px) {
  .app-header #btnOpenMessenger {
    position: sticky;
    right: 0;
    z-index: 30;
    background: rgba(28, 12, 44, 0.96);
    backdrop-filter: blur(6px);
    border-radius: 10px;
    box-shadow: -8px 0 12px rgba(10, 4, 18, 0.85);
  }
  .app-header #btnOpenMessenger .icon { font-size: 17px; }
  /* красная пульсирующая точка прямо на кнопке сообщений */
  .pm-red-dot { top: -8px; right: -8px; width: 16px; height: 16px; border-width: 2.5px; }
  /* счётчик лежит ровно поверх точки: и точка, и цифра видны (точка пульсирует вокруг цифры) */
  .pm-unread-badge {
    position: absolute;
    top: -2px;
    right: 0;
    left: auto;
    margin: 0;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1;
    border: 2.5px solid #ffffff;
    border-radius: 999px;
    box-sizing: border-box;
    z-index: 25;
  }
}


/* =====================================================================
   v90: ТЕЛЕФОН
   1) игроки за столом компактнее (аватарки меньше), но НЕ наезжают друг на друга;
   2) чат стола снизу выше — видны и сообщения, и викторина;
   3) личные сообщения: слева список чатов, справа переписка — видно и то, и другое;
   4) в витрине подарков видны все категории сразу;
   5) игрок «не в сети» (телефон ушёл в фон) — место сохранено, аватарка приглушена.
   ===================================================================== */

/* --- 5. игрок «не в сети» --- */
.seat-item.seat-offline .player-avatar-wrap {
  filter: grayscale(0.8) brightness(0.62);
}
.seat-item.seat-offline .player-label-wrap::after {
  content: '📴';
  margin-left: 3px;
  font-size: 10px;
  opacity: 0.9;
}

@media (max-width: 900px) and (orientation: portrait) {
  /* --- 1. компактные места за столом (v91) ---
     Аватарка 62px и укороченное место: 2 игрока сверху, 2 снизу, по 4 по краям.
     Уборы, еда и напитки у аватарки считаются от её размера (см. game.js/PHONE_AVATAR_CSS),
     поэтому CSS их больше не «придавливает» — они выглядят как на компьютере. */
  .seat-item {
    width: 78px !important;
    height: 78px !important;   /* v91: высота места = аватарка + ник, чтобы содержимое не «уезжало» вверх */
  }
  .seat-item .player-avatar-wrap,
  .seat-item .player-avatar-circle {
    width: 62px !important;
    height: 62px !important;
  }
  .seat-item .player-nickname,
  .seat-item .nickname,
  .seat-item .player-nickname-single {
    font-size: 15px !important;
    max-width: 120px !important;

    letter-spacing: -0.3px;
    line-height: 1.1;
  }

  .seat-item .player-age-single { font-size: 10px !important; }
  .seat-item .player-label-wrap {
    margin-top: 1px !important;
    padding: 0 !important;
    max-width: 132px !important;   /* v91: 2*PHONE_PAIR_X = 132 → подписи соседей не наезжают */

    line-height: 1.15 !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
  }
  /* Уборы на телефоне: размер и посадку задаёт game.js под мобильную аватарку */
  .seat-item .avatar-worn-headwear {
    top: auto;
    left: auto;
  }
  /* Еда и напитки у аватарки — как на компьютере, но пропорционально мобильной аватарке */
  .seat-item .seat-corner-gifts-cluster {
    transform: scale(var(--seat-gift-k, 0.82));
    transform-origin: bottom right;
    bottom: calc(-14px * var(--seat-gift-k, 0.82));
    right: calc(-22px * var(--seat-gift-k, 0.82));
  }
  .seat-item .seat-gift-badge {
    transform: scale(var(--seat-gift-k, 0.82));
    transform-origin: top right;
    top: calc(-6px * var(--seat-gift-k, 0.82));
    right: calc(-6px * var(--seat-gift-k, 0.82));
  }
  /* плашка «сколько рубинов у игрока» (видит Админ) — мелкая, у аватарки, подписи не задевает */
  .seat-item .seat-admin-rubies-pill {
    position: absolute !important;
    left: 2px;
    bottom: 16px;
    margin-top: 0 !important;
    padding: 0 4px !important;
    font-size: 8.5px !important;
    line-height: 1.5;
    border-radius: 8px !important;
    transform: scale(0.9);
    transform-origin: left center;
  }
  .seat-item .seat-admin-rubies-pill .game-ruby-img-inline { width: 8px !important; height: 8px !important; }
}

@media (max-width: 900px) {
  /* --- 2. чат стола снизу: выше и компактнее, чтобы всё было видно --- */
  .chat-sidebar {
    height: 40vh !important;
    min-height: 210px !important;
    max-height: 290px !important;
  }
  /* v91: с викториной чат чуть выше — вопрос, варианты, сообщения и поле ввода видны все сразу */
  body.quiz-active .chat-sidebar {
    height: 42vh !important;
    min-height: 220px !important;
    max-height: 300px !important;
  }
  .chat-header { padding: 4px 8px; }
  .chat-header-title { font-size: 12px; gap: 5px; }
  .chat-title-icon { font-size: 14px; }
  .chat-quiz-pill { font-size: 10px; padding: 2px 7px; }
  .chat-feed {
    padding: 6px 8px;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 0;
  }
  .chat-msg-avatar { width: 26px; height: 26px; font-size: 13px; }
  .chat-msg-bubble { font-size: 14px; padding: 6px 9px; }   /* v92: сообщения игроков чуть крупнее (было 12.5px) */
  .chat-msg-author { font-size: 11.5px; }
  /* v91: карточка викторины компактнее — внизу остаются видны и сообщения */
  .active-quiz-card { margin: 4px 6px 2px; padding: 5px 7px; border-radius: 11px; }
  .quiz-card-head { margin-bottom: 2px; }
  .quiz-badge { font-size: 10px; }
  .quiz-reward-badge { font-size: 9.5px; padding: 1px 5px; }
  .quiz-question-text { font-size: 11.5px; margin-bottom: 3px; line-height: 1.2; }
  .quiz-options-grid { gap: 4px; margin-bottom: 3px; }
  .btn-quiz-opt { font-size: 10px; padding: 3px 5px; border-radius: 6px; line-height: 1.15; }
  .quiz-progress-line { height: 3px; }

  /* v91: строка «Смайлики и стикеры» ниже — она тоже ест высоту чата */
  .chat-emojis-bar { padding: 1px 8px; }
  /* v92: пока идёт викторина — строка «Смайлики и стикеры» скрыта, чтобы внизу
     помещались и вопрос, и сообщения игроков крупным шрифтом */
  body.quiz-active .chat-emojis-bar { display: none !important; }
  body.quiz-active .chat-header { padding: 3px 8px !important; min-height: 0 !important; }
  body.quiz-active .active-quiz-card { margin: 2px 6px 1px !important; padding: 4px 7px !important; }
  body.quiz-active .quiz-card-head { margin-bottom: 0 !important; }
  body.quiz-active .chat-feed { gap: 4px; padding: 4px 8px; }
  .btn-emoji-toggle { padding: 2px 9px; font-size: 11px; }
  .emoji-toggle-icon { font-size: 14px; }
  .chat-input-form { padding: 4px 8px; }
  .chat-input-form input { padding: 7px 12px; font-size: 14px; }
  .btn-send-chat { width: 36px; height: 36px; }
  .chat-input-form { padding: 6px 8px; gap: 6px; }

  /* --- 3. личные сообщения: список чатов + переписка рядом --- */
  .messenger-dialog {
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 12px !important;
  }
  .messenger-header { height: 46px; padding: 0 12px; }
  .messenger-brand .wa-icon { font-size: 19px; }
  .messenger-brand .messenger-title { font-size: 14px; }
  /* v91: список чатов — горизонтальной лентой сверху, окно переписки — под ним */
  .messenger-body {
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .messenger-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    flex: 0 0 auto;
    border-right: none !important;
    border-bottom: 2px solid rgba(255, 42, 109, 0.35);
  }
  .messenger-sidebar .messenger-chats-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 7px;
    padding: 4px 8px 7px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .messenger-sidebar .messenger-chats-list::-webkit-scrollbar { display: none; }
  .messenger-chat-item {
    flex: 0 0 auto !important;
    width: 150px !important;
    max-width: 150px !important;
    border-radius: 11px;
  }
  .messenger-search-bar { padding: 4px 8px 6px !important; }
  .messenger-search-bar input { font-size: 12px !important; padding: 5px 8px !important; }
  .messenger-chat-panel { flex: 1 1 auto !important; min-height: 0 !important; }
  .messenger-search-bar { padding: 7px 8px; }
  .messenger-search-bar input { font-size: 12.5px; padding: 6px 8px; }
  .messenger-chat-item { padding: 7px 8px; gap: 7px; }
  .messenger-item-avatar { width: 34px; height: 34px; }
  .messenger-item-name { font-size: 12.5px; }
  .messenger-item-preview { font-size: 11px; }
  .messenger-item-time { font-size: 10px; }
  .messenger-chat-header { padding: 7px 8px; }
  .messenger-recipient-avatar { width: 32px; height: 32px; }
  .messenger-recipient-name { font-size: 13px; }
  .messenger-recipient-status { font-size: 10.5px; }
  .messenger-messages-body { padding: 8px; gap: 7px; }
  .wa-msg { max-width: 88%; }
  .wa-bubble { font-size: 12.5px; padding: 6px 9px 5px; }
  .wa-time { font-size: 9.5px; }
  .messenger-input-bar { padding: 6px 8px; gap: 6px; }
  .messenger-input-bar input { font-size: 13px; padding: 7px 9px; }

  /* v95: «Помощь» и «Безопасность» — игроки лентой сверху, сообщения снизу (как в чатах) */
  .messenger-extra-head {
    padding: 5px 8px !important;
    font-size: 11.5px !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
  }
  .messenger-extra-caption {
    font-size: 11.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .messenger-extra-actions { gap: 5px; }
  .messenger-extra-actions .btn-gold-action {
    padding: 4px 7px !important;
    font-size: 10.5px !important;
    border-radius: 8px !important;
  }
  .messenger-two-pane {
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
  .messenger-extra-list {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    max-height: 74px;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 2px solid rgba(255, 42, 109, 0.35);
    gap: 6px !important;
    padding: 5px 8px 6px !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .messenger-extra-list::-webkit-scrollbar { display: none; }
  .messenger-extra-list .extra-partner-item {
    flex: 0 0 auto !important;
    width: 150px !important;
    max-width: 150px !important;
    padding: 6px 9px !important;
    font-size: 11.5px !important;
    border-radius: 10px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .messenger-extra-list .extra-partner-item .ep-sub { font-size: 9.5px !important; }
  .messenger-extra-chat {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    padding: 8px !important;
    gap: 7px !important;
    overflow-y: auto !important;
  }
  .help-msg-card, .security-alert-card { font-size: 12px !important; padding: 8px 9px !important; }
  .help-msg-card .hm-head, .security-alert-card .sa-head { font-size: 11.5px !important; }

  /* --- 4. витрина подарков: все категории видны сразу --- */
  .gifts-categories-nav {
    padding: 6px 8px !important;
    gap: 5px !important;
    row-gap: 5px !important;
  }
  .gifts-categories-nav .btn-cat {
    padding: 6px 9px !important;
    font-size: 11.5px !important;
    border-radius: 13px !important;
  }
  .gifts-categories-nav .cat-count { display: none !important; }
  .gifts-categories-nav .game-ruby-img-inline { width: 13px; height: 13px; }
  .gifts-dialog { max-height: calc(100dvh - 10px) !important; }
}

@media (max-width: 480px) {
  .chat-sidebar { height: 40vh !important; min-height: 206px !important; max-height: 280px !important; }
  body.quiz-active .chat-sidebar { height: 42vh !important; min-height: 216px !important; max-height: 290px !important; }
  .chat-feed { min-height: 0; flex: 1 1 auto; }
}

/* v90: ЛС открыты — плавающая кнопка чата не мешает, окно не «съезжает» */
#messengerModal { overflow-x: hidden !important; }
#messengerModal .messenger-dialog { overflow: hidden !important; }
@media (max-width: 900px) {
  #messengerModal .messenger-tabs { padding: 5px 7px !important; gap: 5px !important; }
  #messengerModal .btn-messenger-tab { padding: 5px 11px !important; font-size: 12px !important; }
  #messengerModal .messenger-input-bar { padding-bottom: max(6px, env(safe-area-inset-bottom)) !important; }
}

/* v90: кнопка «Чат» на телефоне не перекрывает поле ввода, когда чат открыт */
@media (max-width: 900px) {
  .chat-sidebar .chat-input-form input,
  .chat-sidebar .chat-input { padding-right: 8px !important; }
}

/* v97 — security forms and bright persistent monthly award DMs */
.security-dialog{width:min(440px,94vw);max-height:90vh;max-height:90dvh;overflow:auto}
.security-form{display:flex;flex-direction:column;gap:12px;padding:18px}
.security-form p{font-size:13px;line-height:1.5;color:#ded3ed;margin:0}
.security-form label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#fff}
.security-form input,#adminResetCode{width:100%;box-sizing:border-box;padding:11px 13px;border-radius:10px;border:1px solid #735781;background:#20142d;color:#fff;font-size:16px}
.security-form input:focus{outline:2px solid #f6c74a;outline-offset:1px}
.security-form [role=status]{color:#ffd66c;min-height:1.3em}
.security-recovery-link{background:transparent;border:0;color:#ffd66c;text-align:left;font-size:12px;padding:8px 0;cursor:pointer}
#btnProfileChangePassword{font-size:12px;white-space:normal}
#adminResetCode{margin-top:8px;font-family:monospace;color:#ffe8a4;cursor:text}
.wa-monthly-award .wa-bubble{background:linear-gradient(135deg,#4c194b,#791d59 60%,#412257)!important;border:2px solid #ffd268;color:#fff9ea;box-shadow:0 0 22px #ffd26835,0 8px 20px #1c082933;max-width:min(440px,94%);padding:16px!important}
.wa-monthly-award .award-admin{font-size:17px;font-weight:900;color:#ffe394;margin-bottom:6px}
.wa-monthly-award .award-rating{font-size:11px;color:#f8d1f1;margin-bottom:10px}
.wa-monthly-award p{font-size:15px;line-height:1.5;font-weight:700;margin:0 0 12px}
.wa-monthly-award .award-amount{display:inline-block;background:linear-gradient(135deg,#ffeaa1,#f7b638);color:#491d3e;font-weight:900;border-radius:20px;padding:7px 12px;margin:0 0 8px}
.wa-monthly-award .wa-time{display:block;color:#f4cfed!important}
@media(max-width:600px){.security-form{padding:14px}.wa-monthly-award .award-admin{font-size:15px}.wa-monthly-award p{font-size:13px}}

#messengerForm.is-system button{opacity:.35;pointer-events:none}#messengerForm.is-system input{opacity:.65;cursor:default}

/* Editable age modal */
.profile-age-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid rgba(5, 217, 232, 0.45);
  border-radius: 12px;
  background: rgba(8, 11, 25, 0.92);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  outline: none;
}
.profile-age-input:focus {
  border-color: #05d9e8;
  box-shadow: 0 0 0 3px rgba(5, 217, 232, 0.16);
}
.profile-age-status {
  min-height: 18px;
  margin: 0;
  color: #ffb8c8;
  font-size: 13px;
}
