/* =========================================================
   SAUDI VOICE - Premium Redesign v3
   Dark Navy + Gold Luxury Theme
   All class names and IDs preserved for JS compatibility
========================================================= */

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { touch-action: manipulation; }

/* ===============================
   ACCESSIBILITY
=============================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg-primary);
  padding: 8px 16px;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  transition: top 0.3s ease;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { top: 0; outline: 3px solid var(--gold-light); outline-offset: 2px; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}

/* ===============================
   DESIGN TOKENS
=============================== */
:root {
  /* Gold Accent */
  --gold: #c9a43c;
  --gold-dark: #a88830;
  --gold-light: #dfc36a;

  /* Aliases for JS compat */
  --primary: var(--gold);
  --primary-dark: var(--gold-dark);
  --primary-light: var(--gold-light);

  --accent: #e74c3c;
  --accent-secondary: #f0c040;

  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;

  /* Background - Deep Navy */
  --bg-primary: #080c14;
  --bg-secondary: #0f1520;
  --bg-tertiary: #16202e;
  --bg-chat: #080c14;
  --bg-input: #0f1520;
  --bg-hover: #1b2738;

  /* Text */
  --text-primary: #ecede8;
  --text-secondary: #9ba3b0;
  --text-muted: #5c6370;
  --text-link: var(--gold-light);

  /* Other */
  --border-color: #1e2a3a;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --online-color: #2ecc71;
  --idle-color: #f39c12;
  --dnd-color: #e74c3c;
  --offline-color: #5c6370;

  /* Gradient */
  --gradient-primary: linear-gradient(135deg, #c9a43c 0%, #a88830 100%);
  --gradient-accent: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
  --gradient-gold-glow: linear-gradient(135deg, rgba(201,164,60,0.15) 0%, transparent 60%);

  /* Dimensions */
  --speaker-bar-height: 62px;
  --bottom-nav-height: 56px;
  --input-height: 60px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* Radius */
  --radius: 14px;
  --radius-sm: 8px;
}

html, body { height: 100%; overflow: hidden; }
html.login-active, html.login-active body {
  overflow: auto; -webkit-overflow-scrolling: touch;
}

main, #main-content { height: 100%; position: relative; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.55;
  direction: rtl;
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

/* Screens */
.screen {
  display: none; height: 100%; width: 100%;
  position: absolute; top: 0; left: 0;
  flex-direction: column; z-index: 1;
}
.screen.active { display: flex; }

/* ===============================
   LOGIN SCREEN
=============================== */
#login-screen {
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(201,164,60,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(201,164,60,0.06) 0%, transparent 50%);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.logo { margin-bottom: 40px; color: var(--text-primary); }

.logo-img {
  width: 88px; height: 88px;
  margin-bottom: 18px;
  filter: drop-shadow(0 6px 20px rgba(201,164,60,0.35));
}

.logo h1 {
  font-size: 30px; font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #dfc36a 0%, #c9a43c 50%, #a88830 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo p {
  font-size: 14px;
  color: var(--text-secondary);
  letter-spacing: 0.2px;
}

.login-options {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
}

.login-option {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.login-option:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.login-option.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg-primary);
  box-shadow: 0 6px 24px rgba(201,164,60,0.35);
  transform: translateY(-2px);
}

.login-option.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: var(--bg-tertiary);
  border-color: var(--border-color);
}
.login-option.disabled:hover { transform: none; box-shadow: none; }

.login-option i { font-size: 24px; }
.login-option span { font-size: 12px; font-weight: 600; }

.login-form {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.input-group { margin-bottom: 14px; }

.input-group input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: right;
}

.input-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,164,60,0.12);
}

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

.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s;
  box-shadow: 0 4px 16px rgba(201,164,60,0.25);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(201,164,60,0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  width: 100%;
  padding: 12px 24px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.2s;
}

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

.online-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px;
}

.online-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.online-dot {
  color: var(--online-color);
  font-size: 10px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.online-users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.online-user-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

/* ===============================
   ROOMS SCREEN
=============================== */
#rooms-screen { background: var(--bg-primary); }

.rooms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.rooms-header h2 {
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 700;
}

.btn-accent {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: filter 0.2s;
}
.btn-accent:hover { filter: brightness(1.1); }

.rooms-grid {
  flex: 1; min-height: 0;
  padding: 18px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: min-content;
  gap: 16px;
  align-content: start;
  padding-bottom: 20px;
}

.room-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: auto !important;
  min-height: auto !important;
  max-height: none !important;
}

.room-card:hover {
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(201,164,60,0.12);
}

.room-card-image {
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #16202e 0%, #1b2738 50%, rgba(201,164,60,0.15) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.room-card:hover .room-card-image { filter: brightness(1.15); }

.room-card-image .room-icon {
  font-size: 38px;
  color: rgba(201,164,60,0.7);
}

.room-capacity {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.65);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,164,60,0.15);
}

.room-card-body {
  padding: 16px 18px;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.room-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-card-title::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--gold);
  border-radius: 2px;
}

.room-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  padding-right: 11px;
}

/* ===============================
   CHAT SCREEN
=============================== */
#chat-screen { background: var(--bg-chat); }

/* Speaker Bar */
.speaker-bar {
  background: var(--bg-secondary);
  height: var(--speaker-bar-height);
  min-height: var(--speaker-bar-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.speaker-bar-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}
.speaker-bar-scroll::-webkit-scrollbar { display: none; }

.speaker-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  cursor: pointer;
  transition: transform 0.2s;
}
.speaker-item:hover { transform: scale(1.08); }

.speaker-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.speaker-avatar img { width: 100%; height: 100%; object-fit: cover; }
.speaker-avatar .avatar-placeholder { font-size: 16px; color: var(--gold); }

.speaker-item.speaking .speaker-avatar {
  border-color: var(--success);
  box-shadow: 0 0 16px rgba(46,204,113,0.4);
  animation: speaking-glow 1.5s infinite;
}

@keyframes speaking-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(46,204,113,0.3); }
  50% { box-shadow: 0 0 22px rgba(46,204,113,0.6); }
}

.speaker-mic {
  position: absolute;
  bottom: -2px; right: -2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: white;
  border: 2px solid var(--bg-secondary);
}

.speaker-item.unmuted .speaker-mic { background: var(--success); }

.speaker-name {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 4px;
  max-width: 50px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Chat Area */
.chat-main {
  flex: 1; min-height: 0;
  display: flex;
  overflow: hidden;
}

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

.messages-container {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: local;
  transition: background-image 0.3s ease;
}

.messages-container.has-room-bg .message {
  background: rgba(8,12,20,0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.messages-container.has-room-bg .message:nth-child(even) { background: rgba(8,12,20,0.92); }
.messages-container.has-room-bg .message:hover { background: rgba(8,12,20,0.95); border-color: rgba(255,255,255,0.1); }
.messages-container.has-room-bg .message .message-text,
.messages-container.has-room-bg .message .username,
.messages-container.has-room-bg .message .message-time { text-shadow: none; }

/* Message Styles */
.message {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: fadeIn 0.2s ease;
  padding: 14px 18px;
  border-radius: 12px;
  margin: 4px 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.04);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.message:nth-child(even) { background: rgba(255,255,255,0.045); }
.message:hover { background: rgba(255,255,255,0.065); border-color: rgba(255,255,255,0.08); }

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

.message-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 15px;
  color: var(--text-secondary);
}
.message-avatar img { width: 100%; height: 100%; object-fit: cover; }

.message-content { flex: 1; min-width: 0; }

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.message-username {
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  color: var(--gold-light);
}
.message-username:hover { text-decoration: underline; }

.message-badge {
  background: var(--accent);
  color: white;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.message-badge.member { background: rgba(46,204,113,0.8); }
.message-badge.bronze { background: rgba(205,127,50,0.85); }
.message-badge.silver { background: rgba(150,150,150,0.85); }
.message-badge.gold { background: rgba(201,164,60,0.9); color: #080c14; }
.message-badge.platinum { background: rgba(200,200,200,0.85); color: #333; }
.message-badge.diamond { background: rgba(0,188,212,0.8); }
.message-badge.vip { background: rgba(231,76,60,0.9); }
.message-badge.moderator { background: rgba(142,68,173,0.8); }
.message-badge.admin { background: rgba(243,156,18,0.9); color: #080c14; }
.message-badge.owner { background: rgba(142,68,173,0.9); }
.message-badge.bot { background: rgba(201,164,60,0.5); color: #080c14; }

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

.message-text {
  font-size: 14.5px;
  word-break: break-word;
  line-height: 1.75;
  color: #ffffff;
  letter-spacing: 0.01em;
}

/* System Messages */
.system-message {
  text-align: center;
  padding: 6px 14px;
  color: var(--text-muted);
  font-size: 12px;
  background: rgba(201,164,60,0.04);
  border-radius: 20px;
  margin: 4px auto;
  max-width: fit-content;
  border: 1px solid rgba(201,164,60,0.08);
}

.system-message.join {
  color: var(--success);
  background: rgba(46,204,113,0.06);
  border-color: rgba(46,204,113,0.12);
}

.system-message.leave {
  color: var(--danger);
  background: rgba(231,76,60,0.06);
  border-color: rgba(231,76,60,0.12);
}

/* User Sidebar */
.user-sidebar {
  width: 220px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-close-btn {
  display: none;
  width: 32px; height: 32px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.sidebar-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 299;
}

.sidebar-header h3 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.8px;
}

.user-count-badge {
  background: var(--gold);
  color: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-search { padding: 10px 12px; }

.sidebar-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-primary);
  outline: none;
}
.sidebar-search input:focus { border-color: var(--gold); }
.sidebar-search input::placeholder { color: var(--text-muted); }

.users-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
  margin-bottom: 2px;
}
.user-item:hover { background: var(--bg-hover); }
.user-item.speaking { background: rgba(46,204,113,0.08); }

.user-item-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-secondary);
}
.user-item-avatar img { width: 100%; height: 100%; object-fit: cover; }

.user-item-mic {
  position: absolute;
  bottom: -2px; left: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  color: white;
  border: 2px solid var(--bg-secondary);
}
.user-item.unmuted .user-item-mic { background: var(--success); }

.user-item-info { flex: 1; overflow: hidden; }

.user-item-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}
.user-item:hover .user-item-name { color: var(--text-primary); }

.user-item-role { font-size: 11px; color: var(--text-muted); }
.user-item-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 1px;
  line-height: 1;
}
.user-item-stars .star {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.3;
  transition: all 0.2s;
}
.user-item-stars .star.filled {
  color: var(--gold);
  opacity: 1;
  text-shadow: 0 0 4px rgba(201, 164, 60, 0.4);
}
.user-item-stars.no-stars {
  display: none;
}
.user-item-mood { margin-top: 2px; }
.user-item-mood img { max-height: 16px; border-radius: 3px; }
/* Role-specific star colors */
.user-item-stars.role-guest .star.filled { color: #7a7a7a; text-shadow: none; }
.user-item-stars.role-bot .star.filled { color: #6b8a9e; text-shadow: 0 0 4px rgba(107,138,158,0.4); }
.user-item-stars.role-member .star.filled { color: #4caf50; text-shadow: 0 0 4px rgba(76,175,80,0.4); }
.user-item-stars.role-bronze .star.filled { color: #cd7f32; text-shadow: 0 0 4px rgba(205,127,50,0.4); }
.user-item-stars.role-silver .star.filled { color: #c0c0c0; text-shadow: 0 0 4px rgba(192,192,192,0.5); }
.user-item-stars.role-gold .star.filled { color: var(--gold); text-shadow: 0 0 5px rgba(201,164,60,0.5); }
.user-item-stars.role-platinum .star.filled { color: #e5e4e2; text-shadow: 0 0 6px rgba(229,228,226,0.5); }
.user-item-stars.role-diamond .star.filled { color: #b9f2ff; text-shadow: 0 0 6px rgba(185,242,255,0.6); }
.user-item-stars.role-vip .star.filled { color: #9c27b0; text-shadow: 0 0 5px rgba(156,39,176,0.5); }
.user-item-stars.role-moderator .star.filled { color: #ff9800; text-shadow: 0 0 5px rgba(255,152,0,0.5); }
.user-item-stars.role-admin .star.filled { color: #f44336; text-shadow: 0 0 5px rgba(244,67,54,0.5); }
.user-item-stars.role-owner .star.filled { color: #ffd700; text-shadow: 0 0 8px rgba(255,215,0,0.6); }

/* Chat Input Area */
.chat-input-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  flex-shrink: 0;
}

.input-btn {
  width: 40px; height: 40px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.input-btn:hover { background: var(--bg-hover); color: var(--gold-light); }

#message-input {
  flex: 1;
  padding: 11px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  text-align: right;
  transition: border-color 0.2s;
}
#message-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,164,60,0.08);
}
#message-input::placeholder { color: var(--text-muted); }

.send-btn {
  background: var(--gradient-primary);
  color: var(--bg-primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.send-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  height: var(--bottom-nav-height);
  min-height: var(--bottom-nav-height);
  flex-shrink: 0;
  padding-bottom: var(--safe-area-bottom);
  position: relative;
  z-index: 10;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  position: relative;
  transition: color 0.15s;
}
.nav-btn:hover, .nav-btn.active { color: var(--gold-light); }
.nav-btn i { font-size: 18px; }

.nav-btn .badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  margin-left: 10px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 8px;
  min-width: 16px;
}

/* Voice Control Toolbar */
.voice-control {
  position: fixed;
  bottom: calc(var(--bottom-nav-height) + var(--input-height) + 20px + var(--safe-area-bottom));
  left: 20px;
  z-index: 100;
}

.mic-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
  transition: all 0.3s ease;
}

.mic-toolbar.mic-toolbar--expanded {
  background: rgba(0,0,0,0.5);
  border-radius: 30px;
  padding: 4px;
  backdrop-filter: blur(12px);
}

.mic-btn-main {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
  position: relative;
}

.mic-btn-main .mic-btn-label {
  font-size: 9px; font-weight: 600;
  white-space: nowrap; line-height: 1;
}
.mic-btn-main:hover { transform: scale(1.06); }
.mic-btn-main:active { transform: scale(0.95); }

.mic-btn-main.request-mic {
  background: var(--warning);
  box-shadow: 0 4px 20px rgba(243,156,18,0.4);
  animation: pulse-warning 2s infinite;
}

.mic-btn-main.in-queue {
  background: var(--info);
  box-shadow: 0 4px 20px rgba(52,152,219,0.4);
  animation: pulse-info 1.5s infinite;
}

.mic-btn-main.has-mic {
  background: var(--success);
  box-shadow: 0 4px 20px rgba(46,204,113,0.4);
  animation: none;
}

.mic-btn-main.has-mic.muted {
  background: var(--danger);
  box-shadow: 0 4px 20px rgba(231,76,60,0.4);
}

.mic-btn-release {
  width: 44px; height: 44px;
  border-radius: 22px;
  border: none;
  background: var(--danger);
  color: white;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s;
  box-shadow: 0 2px 12px rgba(231,76,60,0.3);
}

.mic-btn-release .mic-btn-label {
  font-size: 8px; font-weight: 600;
  white-space: nowrap; line-height: 1;
}
.mic-btn-release:hover { transform: scale(1.08); background: #c0392b; }
.mic-btn-release:active { transform: scale(0.93); }

/* ===============================
   MODALS
=============================== */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal.active { display: flex; }

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  animation: modalIn 0.25s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.96) translateY(-8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.close-btn {
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.close-btn:hover { background: var(--danger); color: white; }

/* Emoji Picker */
.emoji-picker {
  max-height: 350px;
  overflow: hidden;
  padding: 0;
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
}

.emoji-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.emoji-close-btn {
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  flex-shrink: 0;
}
.emoji-close-btn:hover { color: var(--accent-red); }

.emoji-tab {
  flex: 1; padding: 10px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.emoji-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.emoji-tab:hover { background: var(--bg-hover); }

.emoji-tab-content {
  display: none;
  overflow-y: auto;
  padding: 10px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.emoji-tab-content.active { display: block; }

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

.emoji-item {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.emoji-item:hover { background: var(--bg-hover); }

.custom-emoji-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; }

/* GIF Grid */
.gif-item {
  border-radius: 8px; overflow: hidden; cursor: pointer;
  position: relative;
  transition: transform 0.15s;
  background: rgba(255,255,255,0.05);
  min-height: 80px;
}
.gif-item:hover { transform: scale(1.03); z-index: 2; box-shadow: 0 2px 10px rgba(201,164,60,0.3); }
.gif-item img {
  width: 100%; height: auto; display: block;
  border-radius: 8px;
}
/* GIF in chat messages */
.chat-gif {
  max-width: 250px; max-height: 250px;
  border-radius: 12px; display: block;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.chat-gif:hover { transform: scale(1.03); }
.gif-cat-btn:hover, .gif-cat-btn.active {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent) !important;
}

.custom-emoji-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  padding: 4px;
  aspect-ratio: 1;
}
.custom-emoji-item:hover { background: var(--bg-hover); transform: scale(1.15); }
.custom-emoji-item img { max-width: 40px; max-height: 40px; object-fit: contain; }

.custom-emoji-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Settings Panel */
.settings-panel { max-height: 90vh; }

.settings-body {
  padding: 16px 20px;
  overflow-y: auto;
  max-height: calc(85vh - 60px);
}

.setting-section { margin-bottom: 16px; }

.setting-section label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.setting-section input[type="text"],
.setting-section select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
}
.setting-section input[type="text"]:focus,
.setting-section select:focus { border-color: var(--gold); }

.setting-section input[type="color"] {
  width: 100%;
  height: 40px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 4px;
}

.toggle-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.toggle-section label {
  margin-bottom: 0;
  text-transform: none;
  font-weight: 500;
  color: var(--text-secondary);
}

.toggle-section input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--gold);
  cursor: pointer;
}

.btn-danger {
  width: 100%;
  padding: 12px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  transition: filter 0.15s;
}
.btn-danger:hover { filter: brightness(1.1); }

/* Private Chat */
.private-chat {
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.private-conversations { flex: 1; overflow-y: auto; }

.private-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-sm);
  margin: 2px 4px;
}
.private-conv-item:hover { background: var(--bg-hover); }

.private-conv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
}
.private-conv-avatar img { width: 100%; height: 100%; object-fit: cover; }

.private-conv-info { flex: 1; overflow: hidden; }

.private-conv-name {
  font-weight: 600; font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.private-conv-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.private-chat-area { flex: 1; display: flex; flex-direction: column; }

.private-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.private-messages { flex: 1; overflow-y: auto; padding: 12px; }

.private-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-color);
}

.private-input input {
  flex: 1;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
}
.private-input input:focus { border-color: var(--gold); }

.private-input button {
  width: 40px; height: 40px;
  border: none;
  background: var(--gold);
  color: var(--bg-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: filter 0.15s;
}
.private-input button:hover { filter: brightness(1.15); }

/* User Profile Modal */
.user-profile {
  text-align: center;
  padding: 28px;
  position: relative;
}

.profile-header { margin-bottom: 20px; }

.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  margin: 0 auto 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--bg-primary);
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(201,164,60,0.25);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

#profile-username { color: var(--text-primary); margin-bottom: 5px; }

.profile-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
}
.profile-stars .star {
  font-size: 16px;
  color: var(--text-muted);
  opacity: 0.3;
}
.profile-stars .star.filled {
  color: var(--gold);
  opacity: 1;
  text-shadow: 0 0 6px rgba(201, 164, 60, 0.5);
}
/* Profile stars inherit role colors from .user-item-stars.role-* rules */

.profile-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-style: italic;
  max-width: 250px;
  text-align: center;
  word-break: break-word;
}
.profile-status:empty { display: none; }

.profile-mood { margin-top: 6px; }
.mood-gif-display { max-height: 28px; border-radius: 4px; }

/* Mood picker in settings */
.mood-preview-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 32px;
}
.mood-preview-container img { max-height: 28px; border-radius: 4px; }
.mood-preview-container .remove-mood {
  background: rgba(244,67,54,0.2);
  color: #f44336;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
}
.mood-grid-wrapper {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: var(--bg-tertiary);
}
.mood-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 4px;
}
.mood-grid-item {
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mood-grid-item:hover { background: rgba(255,255,255,0.05); }
.mood-grid-item.active { border-color: var(--gold); background: rgba(201,164,60,0.12); }
.mood-grid-item img { max-height: 24px; max-width: 100%; }

.profile-actions { display: flex; flex-direction: column; gap: 8px; }

.profile-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.profile-action:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

.close-profile {
  position: absolute;
  top: 16px; left: 16px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.close-profile:hover { background: var(--danger); color: white; }

/* Permission Modal */
.permission-content { text-align: center; padding: 32px; }

.permission-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  font-size: 36px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(201,164,60,0.25);
}

.permission-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.permission-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Toast */
#toast-container {
  position: fixed;
  top: 20px; left: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  border: 1px solid var(--border-color);
}

.toast.success { border-right: 3px solid var(--success); }
.toast.success i { color: var(--success); }
.toast.error { border-right: 3px solid var(--danger); }
.toast.error i { color: var(--danger); }
.toast.info { border-right: 3px solid var(--info); }
.toast.info i { color: var(--info); }

@keyframes slideIn {
  from { transform: translateX(-100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===============================
   MOBILE RESPONSIVE
=============================== */
@media (max-width: 768px) {
  .user-sidebar {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 75%;
    max-width: 280px;
    z-index: 300;
    box-shadow: -4px 0 20px rgba(0,0,0,0.5);
  }
  .user-sidebar.active { display: flex; }
  .sidebar-header { padding: 14px 14px; }
  .sidebar-header h3 { font-size: 13px; }
  .sidebar-close-btn { display: flex !important; }
  .user-item { padding: 8px 10px; gap: 10px; }
  .user-item-avatar { width: 36px; height: 36px; }
  .user-item-name { font-size: 14px; }
  .user-item-role { font-size: 12px; }
  .user-item-stars .star { font-size: 11px; }
  .sidebar-overlay.active { display: block; }
  .chat-main { flex-direction: column; }
  .rooms-grid { grid-template-columns: 1fr; grid-auto-rows: min-content; }
  .room-card { align-self: start; }
  .room-card:hover { transform: none; }
  .login-options { flex-direction: column; }
  .voice-control {
    bottom: calc(var(--bottom-nav-height) + var(--input-height) + 15px + var(--safe-area-bottom));
    left: 15px;
  }
  .mic-btn-main { width: 52px; height: 52px; font-size: 18px; }
  .mic-btn-release { width: 40px; height: 40px; font-size: 12px; }
  .emoji-grid { grid-template-columns: repeat(6, 1fr); }
  .emoji-picker { max-height: 60vh; }
}

@media (max-width: 480px) {
  .speaker-bar { height: 55px; }
  .speaker-avatar { width: 36px; height: 36px; }
  .message-avatar { width: 34px; height: 34px; }
  .modal-content { max-height: 90vh; border-radius: 10px; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* iOS Safe Area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); }
}

body { overscroll-behavior: none; }
::selection { background: var(--gold); color: var(--bg-primary); }

/* ===============================
   LOGIN/REGISTER
=============================== */
.login-form h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-weight: 700;
}

.input-group { position: relative; margin-bottom: 14px; }

.input-group i {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 15px;
}

.input-group input { padding-right: 45px; }

.btn-back {
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-back:hover {
  background: var(--bg-hover);
  border-color: var(--gold);
  color: var(--text-primary);
}

.form-footer {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.form-footer a {
  color: var(--gold-light);
  text-decoration: none;
  font-weight: 600;
  margin-right: 5px;
}
.form-footer a:hover { text-decoration: underline; }

/* ===============================
   USER INFO BAR
=============================== */
.user-info-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar-small {
  width: 34px; height: 34px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
}
.user-avatar-small img { width: 100%; height: 100%; object-fit: cover; }

#header-username {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
}

.user-role-badge {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  border: 1px solid var(--border-color);
}

.user-role-badge.bot { background: rgba(201,164,60,0.12); color: var(--gold-light); border-color: rgba(201,164,60,0.25); }
.user-role-badge.member { background: rgba(46,204,113,0.12); color: var(--success); border-color: rgba(46,204,113,0.25); }
.user-role-badge.bronze { background: rgba(205,127,50,0.12); color: #CD7F32; border-color: rgba(205,127,50,0.25); }
.user-role-badge.silver { background: rgba(192,192,192,0.12); color: #C0C0C0; border-color: rgba(192,192,192,0.25); }
.user-role-badge.gold { background: rgba(201,164,60,0.12); color: var(--gold-light); border-color: rgba(201,164,60,0.25); }
.user-role-badge.platinum { background: rgba(229,228,226,0.12); color: #E5E4E2; border-color: rgba(229,228,226,0.25); }
.user-role-badge.diamond { background: rgba(185,242,255,0.12); color: #B9F2FF; border-color: rgba(185,242,255,0.25); }
.user-role-badge.vip { background: rgba(231,76,60,0.12); color: #e74c3c; border-color: rgba(231,76,60,0.25); }
.user-role-badge.moderator { background: rgba(142,68,173,0.12); color: #CE93D8; border-color: rgba(142,68,173,0.25); }
.user-role-badge.admin { background: rgba(243,156,18,0.12); color: var(--warning); border-color: rgba(243,156,18,0.25); }
.user-role-badge.owner { background: rgba(142,68,173,0.12); color: #CE93D8; border-color: rgba(142,68,173,0.25); }

/* ===============================
   ROOM HEADER
=============================== */
.room-header {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  flex-shrink: 0;
}

.room-header .btn-icon {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.room-header .btn-icon:hover {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

.room-info { flex: 1; text-align: center; }
#room-name { display: block; color: var(--text-primary); font-weight: 700; font-size: 15px; }
#room-user-count { display: block; color: var(--text-muted); font-size: 12px; }

.room-image-small {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  overflow: hidden;
}
.room-image-small img { width: 100%; height: 100%; object-fit: cover; }

/* Room Card Image */
.room-card-image .room-card-bg { width: 100%; height: 100%; object-fit: cover; }
.room-card-image .room-icon { color: rgba(201,164,60,0.7); }
.room-card-image .room-icon i { font-size: 32px; }

/* ===============================
   MY PROFILE MODAL
=============================== */
.my-profile-panel { max-width: 400px; }
.my-profile-body { padding: 20px; }
.avatar-section { text-align: center; margin-bottom: 25px; }

.my-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 15px;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 6px 24px rgba(201,164,60,0.2);
}
.my-avatar img { width: 100%; height: 100%; object-fit: cover; }

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s;
}
.btn-upload:hover { filter: brightness(1.1); }

.profile-info {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 15px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 13px; }
.info-row span:last-child { font-weight: 600; color: var(--text-primary); }

.role-badge {
  background: var(--gold);
  color: var(--bg-primary);
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.profile-actions { text-align: center; }

/* Password Modal */
#password-modal .modal-body { padding: 20px; }
#password-modal .input-group { margin-bottom: 15px; }

.profile-role { color: var(--text-muted); font-size: 13px; margin-bottom: 5px; }

/* Unread Badge */
.unread-badge {
  background: var(--danger);
  color: white;
  border-radius: 50%;
  min-width: 18px; height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

/* Avatar Fallback */
.speaker-avatar span,
.user-item-avatar span,
.message-avatar span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; height: 100%;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  font-weight: 700;
}

/* ===============================
   RESPONSIVE FIXES
=============================== */
@media (max-width: 480px) {
  .login-options { flex-direction: column; }
  .login-option { flex-direction: row; justify-content: center; }
  .user-info-bar { display: none; }
  .rooms-header { flex-direction: column; gap: 10px; padding: 12px 15px; }
  .room-header { padding: 8px 12px; }
}

/* ===============================
   MICROPHONE MANAGEMENT
=============================== */
.mic-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 15px;
  background: rgba(201,164,60,0.04);
  border-bottom: 1px solid var(--border-color);
}

.mic-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}
.mic-status-info i { color: var(--gold); }

.mic-status-indicator { font-size: 12px; padding: 3px 10px; border-radius: 12px; }
.mic-status-indicator .available {
  background: rgba(46,204,113,0.12);
  color: var(--success);
  padding: 3px 10px;
  border-radius: 12px;
}
.mic-status-indicator .full {
  background: rgba(243,156,18,0.12);
  color: var(--warning);
  padding: 3px 10px;
  border-radius: 12px;
}

#mic-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  padding: 5px 10px;
  background: rgba(0,0,0,0.25);
  border-radius: 20px;
  margin-right: 10px;
}

.mic-count { color: var(--gold); font-weight: 500; }
.queue-count { color: var(--warning); font-weight: 500; }

@keyframes pulse-warning {
  0%, 100% { box-shadow: 0 4px 20px rgba(243,156,18,0.4), 0 0 0 0 rgba(243,156,18,0.3); }
  50% { box-shadow: 0 4px 20px rgba(243,156,18,0.4), 0 0 0 10px rgba(243,156,18,0); }
}

@keyframes pulse-info {
  0%, 100% { box-shadow: 0 4px 20px rgba(52,152,219,0.4), 0 0 0 0 rgba(52,152,219,0.3); }
  50% { box-shadow: 0 4px 20px rgba(52,152,219,0.4), 0 0 0 10px rgba(52,152,219,0); }
}

/* Mic queue */
#mic-queue {
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 5px;
}

.queue-position {
  width: 24px; height: 24px;
  background: var(--warning);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.queue-username { flex: 1; font-weight: 500; color: var(--text-primary); }

.give-mic-btn {
  width: 30px; height: 30px;
  border: none;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.give-mic-btn:hover { filter: brightness(1.15); transform: scale(1.1); }

.empty-queue {
  text-align: center;
  color: var(--text-muted);
  padding: 15px;
  font-size: 13px;
}

.user-item.has-mic { border-right: 3px solid var(--gold); }
.user-item.in-queue { border-right: 3px solid var(--warning); }

.user-item .mic-indicator {
  position: absolute;
  top: 5px; left: 5px;
  font-size: 12px;
}

.user-admin-controls { display: none; gap: 5px; margin-top: 5px; }
.user-item:hover .user-admin-controls { display: flex; }

.admin-mic-btn {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.admin-mic-btn.give { background: var(--gold); color: var(--bg-primary); }
.admin-mic-btn.remove { background: var(--danger); color: white; }

.system-message.mic-event {
  background: rgba(201,164,60,0.06);
  border-left: 3px solid var(--gold);
}

.mic-queue-section {
  margin-top: 15px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}
.mic-queue-section.hidden { display: none; }

.queue-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--warning);
  color: white;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 600;
}

.queue-header i { animation: wave 1s ease-in-out infinite; }

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

.queue-header h4 { flex: 1; font-size: 13px; margin: 0; }

.queue-count-badge {
  background: rgba(255,255,255,0.25);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.mic-queue-list {
  max-height: 150px;
  overflow-y: auto;
  background: var(--bg-primary);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--border-color);
  border-top: none;
}

.mic-queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--gold);
  color: var(--bg-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-weight: 700;
}
.mic-queue-header span { font-size: 13px; }

.speaker-item.has-mic::after {
  content: '\1F3A4';
  position: absolute;
  bottom: -5px; right: -5px;
  font-size: 14px;
}

/* ===============================
   MOBILE HAMBURGER MENU
=============================== */
.hamburger-menu {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.hamburger-menu:hover { background: var(--bg-hover); }
.hamburger-menu:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.65);
  z-index: 999;
  backdrop-filter: blur(4px);
}
.mobile-menu-overlay.active { display: block; }

.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 1000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
  border-left: 1px solid var(--border-color);
}
.mobile-menu.active { right: 0; }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}
.mobile-menu-header h3 { font-size: 17px; font-weight: 700; }

.mobile-menu-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s;
}
.mobile-menu-close:hover { background: var(--bg-hover); color: var(--text-primary); }

.mobile-menu-nav { flex: 1; padding: 16px; overflow-y: auto; }

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  border: none;
  width: 100%;
  font-size: 14px;
  transition: all 0.2s;
}
.mobile-menu-item:hover { background: var(--bg-hover); }
.mobile-menu-item.active { background: var(--gold); color: var(--bg-primary); }
.mobile-menu-item i { font-size: 18px; width: 24px; text-align: center; }

@media (max-width: 768px) {
  .hamburger-menu {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .rooms-header { flex-wrap: wrap; }
  .rooms-header h2 { order: 2; width: 100%; text-align: center; margin-top: 10px; }
  .user-info-bar { order: 1; }
  .hamburger-menu { order: 3; position: absolute; left: 15px; top: 12px; }
  .rooms-header { position: relative; }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .chat-main { flex-direction: column; }
  .user-sidebar {
    width: 100%; max-height: 200px;
    border-right: none;
    border-top: 1px solid var(--border-color);
  }
}
@media (max-width: 1024px) {
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .login-container { max-width: 400px; padding: 20px; }
}

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

/* ===============================
   VOICE EFFECTS
=============================== */
.voice-effects-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid var(--gold);
}

.effects-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.effects-header h4 {
  margin: 0;
  color: var(--gold-light);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.effects-header h4 i { color: var(--warning); }

.member-badge {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-primary);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.effects-master-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: rgba(201,164,60,0.06);
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
}
.effects-master-toggle label:first-child {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
}

/* Toggle Switch */
.switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.switch.small { width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }

.switch .slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--bg-tertiary);
  transition: 0.3s;
  border: 1px solid var(--border-color);
}

.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background-color: white;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.switch.small .slider:before { height: 14px; width: 14px; }

.switch input:checked + .slider {
  background: var(--gradient-primary);
  border-color: var(--gold);
}
.switch input:checked + .slider:before { transform: translateX(24px); }
.switch.small input:checked + .slider:before { transform: translateX(18px); }
.switch .slider.round { border-radius: 26px; }
.switch .slider.round:before { border-radius: 50%; }

/* Effects Container */
.effects-container {
  display: grid;
  gap: 12px;
  opacity: 0.5;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.effects-container.active { opacity: 1; pointer-events: auto; }

.effect-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}
.effect-card:hover { border-color: var(--gold); }
.effect-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,164,60,0.12);
}

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

.effect-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  flex-shrink: 0;
}
.effect-icon.echo-icon { background: linear-gradient(135deg, #c9a43c, #dfc36a); }
.effect-icon.reverb-icon { background: linear-gradient(135deg, #8e44ad, #c39bd3); }
.effect-icon.bass-icon { background: linear-gradient(135deg, #e74c3c, #f1948a); }
.effect-icon.treble-icon { background: linear-gradient(135deg, #3498db, #85c1e9); }
.effect-icon.autotune-icon { background: linear-gradient(135deg, #1db954, #4ade80); }

.effect-select {
  flex: 1;
  padding: 6px 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}
.effect-select:focus { border-color: var(--gold); }

.effect-info { flex: 1; display: flex; flex-direction: column; }
.effect-name { font-weight: 600; color: var(--text-primary); font-size: 14px; }
.effect-desc { font-size: 11px; color: var(--text-muted); }

.effect-controls {
  padding: 12px;
  background: var(--bg-secondary);
  display: none;
}
.effect-card.active .effect-controls { display: block; }

.slider-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.slider-control:last-child { margin-bottom: 0; }

.slider-control label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 50px;
  margin-bottom: 0 !important;
}

.slider-control input[type="range"] {
  flex: 1; height: 6px;
  border-radius: 3px;
  background: var(--bg-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.slider-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-control input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.slider-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-light);
  min-width: 45px;
  text-align: left;
}

.effects-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(243,156,18,0.06);
  border: 1px solid rgba(243,156,18,0.12);
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
}
.effects-tip i { color: var(--warning); font-size: 16px; }

/* Voice Changer Presets */
.voice-changer-section { margin-top: 8px; }
.voice-changer-presets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.voice-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  background: var(--bg-tertiary);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}
.voice-preset-btn i { font-size: 18px; }
.voice-preset-btn:hover {
  border-color: var(--gold);
  color: var(--text-primary);
}
.voice-preset-btn.active {
  border-color: var(--gold);
  background: rgba(201,164,60,0.12);
  color: var(--gold);
}
.voice-preset-btn.active i { color: var(--gold); }

.effects-indicator {
  display: none;
  position: absolute;
  top: -5px; left: -5px;
  width: 20px; height: 20px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border-radius: 50%;
  font-size: 10px;
  color: var(--bg-primary);
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(201,164,60,0.4);
  animation: effectsPulse 2s infinite;
  z-index: 2;
  pointer-events: none;
}
.effects-indicator.active { display: flex; }

@keyframes effectsPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 2px 8px rgba(201,164,60,0.4); }
  50% { transform: scale(1.1); box-shadow: 0 2px 12px rgba(201,164,60,0.7); }
}

.voice-preview-section { margin-top: 16px; text-align: center; }

.btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--gradient-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(201,164,60,0.25);
}
.btn-preview:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(201,164,60,0.4); }
.btn-preview:active { transform: translateY(0); }

.btn-preview.listening {
  background: linear-gradient(135deg, var(--danger), #c0392b);
  box-shadow: 0 4px 12px rgba(231,76,60,0.3);
  animation: previewPulse 1s infinite;
}
.btn-preview.listening:hover { box-shadow: 0 6px 16px rgba(231,76,60,0.4); }

@keyframes previewPulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(231,76,60,0.3); }
  50% { box-shadow: 0 4px 20px rgba(231,76,60,0.5); }
}

.preview-hint { font-size: 11px; color: var(--text-muted); margin-top: 8px; margin-bottom: 0; }

/* ===============================
   MENTION SYSTEM
=============================== */
.mention-dropdown {
  position: absolute;
  bottom: 100%;
  left: 10px; right: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
}

.mention-item {
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 14px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  direction: rtl;
}
.mention-item:hover { background: rgba(201,164,60,0.12); }

.mention {
  color: #60a5fa;
  font-weight: 600;
  background: rgba(96,165,250,0.15);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
}
.mention-me {
  color: #fbbf24;
  background: rgba(251,191,36,0.18);
  font-weight: 700;
}

/* ===============================
   REPLY SYSTEM
=============================== */
.reply-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(201,164,60,0.06);
  border-right: 3px solid var(--gold);
  margin: 0 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}
.reply-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cancel-reply {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
}

.reply-preview-inline {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  margin-bottom: 4px;
  border-right: 2px solid var(--gold);
  opacity: 0.8;
}

.msg-reply-btn {
  position: absolute;
  top: 4px; left: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 12px;
  padding: 4px;
}
.message:hover .msg-reply-btn { opacity: 1; }

/* ===============================
   STATUS INDICATORS
=============================== */
.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  position: absolute;
  bottom: 2px; right: 2px;
  border: 2px solid var(--bg-secondary);
}
.status-online { background: var(--success); }
.status-away { background: var(--warning); }
.status-dnd { background: var(--danger); }
.user-item-avatar { position: relative; }

/* Verified Badge */
.verified-badge {
  color: var(--info);
  font-size: 12px;
  margin-right: 4px;
  vertical-align: middle;
}

/* Room Invite Button */
.invite-btn {
  background: rgba(201,164,60,0.1);
  border: 1px solid rgba(201,164,60,0.25);
  color: var(--gold-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.invite-btn:hover { background: rgba(201,164,60,0.2); }

/* Status Selector */
.status-selector { display: flex; gap: 8px; padding: 8px 0; }

.status-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  transition: all 0.2s;
}
.status-option:hover { background: var(--bg-hover); }
.status-option.active { border-color: var(--gold); background: rgba(201,164,60,0.1); }

/* ===============================
   SEO CONTENT
=============================== */
.seo-content {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  color: var(--text-secondary);
  padding: 40px 20px;
  text-align: right;
  direction: rtl;
  position: relative;
  z-index: 0;
}

.seo-container { max-width: 900px; margin: 0 auto; }

.seo-content h2 {
  color: var(--gold-light);
  font-size: 1.5em;
  margin: 30px 0 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(201,164,60,0.15);
}
.seo-content h2:first-child { margin-top: 0; }

.seo-content p {
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 1em;
  color: var(--text-secondary);
}
.seo-content strong { color: var(--text-primary); }

.seo-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 25px 0;
}

.seo-feature {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  transition: all 0.25s;
}
.seo-feature:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: 0 8px 28px rgba(201,164,60,0.1);
}
.seo-feature i { font-size: 2em; color: var(--gold); margin-bottom: 12px; display: block; }
.seo-feature h3 { color: var(--text-primary); font-size: 1.1em; margin-bottom: 8px; }
.seo-feature p { font-size: 0.9em; margin-bottom: 0; }

.seo-list { list-style: none; padding: 0; margin: 15px 0; }
.seo-list li {
  padding: 8px 0;
  padding-right: 25px;
  position: relative;
  border-bottom: 1px solid var(--border-color);
}
.seo-list li:before {
  content: '\2713';
  color: var(--gold);
  font-weight: bold;
  position: absolute;
  right: 0;
}

/* Featured blog-article links — brand gold, not default browser blue */
.seo-articles a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.2s;
}
.seo-articles a:hover {
  color: var(--gold);
  text-decoration: underline;
}

.seo-faq { margin: 20px 0; }
.seo-faq details {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.seo-faq summary {
  padding: 15px 20px;
  cursor: pointer;
  font-weight: bold;
  color: var(--text-primary);
  font-size: 1.05em;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.seo-faq summary::-webkit-details-marker { display: none; }
.seo-faq summary::before {
  content: '+';
  color: var(--gold);
  font-size: 1.4em;
  font-weight: bold;
  min-width: 20px;
}
.seo-faq details[open] summary::before { content: '\2212'; }
.seo-faq details p { padding: 0 20px 15px; margin: 0; }

/* Footer */
.seo-footer {
  background: var(--bg-primary);
  color: var(--text-muted);
  padding: 30px 20px;
  text-align: right;
  direction: rtl;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 25px;
  margin-bottom: 20px;
}
.footer-col h4 { color: var(--text-primary); margin-bottom: 10px; font-size: 1em; }
.footer-col p { font-size: 0.9em; line-height: 1.6; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { padding: 4px 0; font-size: 0.9em; }
.footer-col ul li a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--gold-light); }

.footer-bottom {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85em;
}

/* Dark Mode (default) */
.dark-mode {
  --bg-primary: #080c14;
  --bg-secondary: #0f1520;
  --bg-tertiary: #16202e;
  --bg-chat: #080c14;
  --bg-input: #0f1520;
  --bg-hover: #1b2738;
  --text-primary: #ecede8;
  --text-secondary: #9ba3b0;
  --text-muted: #5c6370;
  --text-link: var(--gold-light);
  --border-color: #1e2a3a;
  --shadow: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --offline-color: #5c6370;
}

/* Light Mode */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f2f0eb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eae7e0;
    --bg-chat: #f2f0eb;
    --bg-input: #ffffff;
    --bg-hover: #e0ddd6;
    --text-primary: #1a1510;
    --text-secondary: #5c5549;
    --text-muted: #8b8478;
    --text-link: var(--gold-dark);
    --border-color: #d6d1c7;
    --shadow: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.1);
    --offline-color: #8b8478;
  }
}

/* XO Game Styles */
.xo-cell {
  background: var(--bg-hover);
  border: 2px solid var(--border-light);
  border-radius: 10px;
  font-size: 36px;
  font-weight: bold;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.xo-cell:hover:not(:disabled) {
  background: rgba(201, 164, 60, 0.1);
  border-color: var(--accent);
}
.xo-cell:disabled { cursor: default; opacity: 0.9; }
.xo-cell.x { color: #4ecdc4; text-shadow: 0 0 10px rgba(78, 205, 196, 0.3); }
.xo-cell.o { color: #ff6b6b; text-shadow: 0 0 10px rgba(255, 107, 107, 0.3); }
.xo-cell.win {
  background: rgba(201, 164, 60, 0.15);
  border-color: var(--accent);
  animation: xo-win-pulse 0.6s ease;
}
@keyframes xo-win-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.game-card:hover {
  border-color: var(--accent) !important;
  background: rgba(201, 164, 60, 0.05) !important;
}
.game-invite-msg {
  background: rgba(201, 164, 60, 0.08);
  border: 1px solid rgba(201, 164, 60, 0.2);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  text-align: center;
}
.game-invite-msg .game-invite-btns {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}
.game-invite-msg .game-invite-btns button {
  padding: 5px 16px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.game-invite-msg .join-game-btn {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}
.game-invite-msg .watch-game-btn {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-light) !important;
}

/* Connect Four Game Styles */
.c4-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #0d2137;
}
.c4-cell:hover:not(:disabled) {
  background: rgba(255,255,255,0.15);
}
.c4-cell:disabled { cursor: default; }
.c4-cell.r { background: #ff6b6b; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3), 0 0 8px rgba(255,107,107,0.3); }
.c4-cell.y { background: #f9ca24; box-shadow: inset 0 -3px 6px rgba(0,0,0,0.3), 0 0 8px rgba(249,202,36,0.3); }
.c4-cell.win { animation: c4-win-pulse 0.6s ease; box-shadow: 0 0 15px rgba(201,164,60,0.6); }
@keyframes c4-win-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Dots and Boxes Game Styles */
.dots-dot {
  width: 12px; height: 12px;
  background: #a0a0a0;
  border-radius: 50%;
  margin: auto;
}
.dots-hline {
  height: 6px;
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  margin: auto;
  width: 90%;
  transition: background 0.15s;
}
.dots-hline:hover:not(.drawn):not([disabled]) { background: rgba(255,255,255,0.2); }
.dots-hline.drawn-a { background: #6c5ce7; cursor: default; }
.dots-hline.drawn-b { background: #00b894; cursor: default; }
.dots-hline.last-move { animation: dots-line-flash 0.5s ease; }
.dots-vline {
  width: 6px;
  background: transparent;
  border-radius: 3px;
  cursor: pointer;
  margin: auto;
  height: 90%;
  transition: background 0.15s;
}
.dots-vline:hover:not(.drawn):not([disabled]) { background: rgba(255,255,255,0.2); }
.dots-vline.drawn-a { background: #6c5ce7; cursor: default; }
.dots-vline.drawn-b { background: #00b894; cursor: default; }
.dots-vline.last-move { animation: dots-line-flash 0.5s ease; }
.dots-box {
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: bold;
  border-radius: 3px;
  transition: background 0.3s;
}
.dots-box.owned-a { background: rgba(108,92,231,0.25); color: #6c5ce7; }
.dots-box.owned-b { background: rgba(0,184,148,0.25); color: #00b894; }
.dots-empty { /* empty corner cells in the grid */ }
@keyframes dots-line-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== Game Effects ===== */

/* Confetti container */
.game-confetti {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 9999; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -20px;
  width: 10px; height: 10px; border-radius: 2px;
  animation: confetti-fall 3s ease-out forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg) scale(0.3); opacity: 0; }
}

/* XO cell placement */
.xo-cell.just-placed {
  animation: cell-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes cell-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* C4 disc drop */
.c4-cell.just-dropped {
  animation: disc-drop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes disc-drop {
  0% { transform: translateY(-200px) scale(0.8); opacity: 0.5; }
  70% { transform: translateY(5px) scale(1.05); }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Dots box capture */
.dots-box.just-captured {
  animation: box-capture 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes box-capture {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* Score pop */
.score-pop {
  animation: score-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes score-bounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Turn pulse - glow when it's your turn */
.your-turn-glow {
  animation: turn-glow 1.5s ease-in-out infinite;
}
@keyframes turn-glow {
  0%, 100% { text-shadow: 0 0 5px rgba(201, 164, 60, 0.3); }
  50% { text-shadow: 0 0 20px rgba(201, 164, 60, 0.8), 0 0 40px rgba(201, 164, 60, 0.3); }
}

/* Loss shake */
.game-shake {
  animation: shake 0.5s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Win glow border */
.game-win-border {
  animation: win-border 1s ease;
}
@keyframes win-border {
  0% { box-shadow: 0 0 0 0 rgba(201, 164, 60, 0.6); }
  50% { box-shadow: 0 0 30px 10px rgba(201, 164, 60, 0.3); }
  100% { box-shadow: none; }
}

/* Line draw animation for dots */
.dots-hline.just-drawn { animation: line-grow-h 0.25s ease-out; }
.dots-vline.just-drawn { animation: line-grow-v 0.25s ease-out; }
@keyframes line-grow-h {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}
@keyframes line-grow-v {
  0% { transform: scaleY(0); }
  100% { transform: scaleY(1); }
}

/* Draw and Guess Game Styles */
.draw-color-btn.active { border-color: var(--accent) !important; transform: scale(1.15); }
.draw-size-btn.active { border-color: var(--accent) !important; }
#draw-canvas { cursor: crosshair; }
#draw-guesses .guess-correct { color: #00b894; font-weight: 600; }
#draw-guesses .guess-wrong { color: var(--text-muted); }
#draw-guesses .guess-item { padding: 2px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
#draw-scoreboard .score-row { display: flex; justify-content: space-between; padding: 3px 8px; border-radius: 4px; margin: 2px 0; }
#draw-scoreboard .score-row.is-drawer { background: rgba(201,164,60,0.1); }
#draw-scoreboard .score-row.guessed { color: #00b894; }
.word-option-btn { padding: 10px 18px; border-radius: 10px; background: var(--bg-hover); border: 2px solid var(--border-light); color: var(--text-primary); font-size: 16px; font-family: inherit; cursor: pointer; transition: all 0.2s; }
.word-option-btn:hover { border-color: var(--accent); background: rgba(201,164,60,0.1); }

/* Ludo Game Styles */
.ludo-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
  position: relative;
  border: 0.5px solid rgba(0,0,0,0.08);
}
.ludo-cell-white { background: #f8f9fa; }
.ludo-cell-red { background: linear-gradient(135deg, #ff7675, #d63031); }
.ludo-cell-blue { background: linear-gradient(135deg, #74b9ff, #0984e3); }
.ludo-cell-green { background: linear-gradient(135deg, #55efc4, #00b894); }
.ludo-cell-yellow { background: linear-gradient(135deg, #ffeaa7, #fdcb6e); }
.ludo-cell-center { background: linear-gradient(135deg, #dfe6e9, #b2bec3); }
.ludo-cell-home-r { background: linear-gradient(135deg, #fab1a0, #e17055); }
.ludo-cell-home-b { background: linear-gradient(135deg, #a0c4ff, #6c9ce3); }
.ludo-cell-home-g { background: linear-gradient(135deg, #a0ffcf, #55c99e); }
.ludo-cell-home-y { background: linear-gradient(135deg, #ffe8a0, #e0c56e); }
.ludo-cell-safe { background: #f8f9fa; }
.ludo-cell-safe::after {
  content: '★'; position: absolute; font-size: 9px; color: rgba(201,164,60,0.6);
  text-shadow: 0 0 4px rgba(201,164,60,0.3);
}
.ludo-cell-start-r { background: #ffcccc !important; border: 2px solid #e74c3c !important; }
.ludo-cell-start-b { background: #cce5ff !important; border: 2px solid #0984e3 !important; }
.ludo-cell-start-g { background: #ccffe5 !important; border: 2px solid #00b894 !important; }
.ludo-cell-start-y { background: #fff5cc !important; border: 2px solid #f39c12 !important; }
.ludo-cell-start-r::before, .ludo-cell-start-b::before,
.ludo-cell-start-g::before, .ludo-cell-start-y::before {
  content: '▶'; position: absolute; font-size: 7px; opacity: 0.5; z-index: 1;
}
.ludo-token {
  width: 70%; height: 70%; border-radius: 50%;
  border: 2px solid rgba(0,0,0,0.3);
  position: absolute; z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.ludo-token-r { background: radial-gradient(circle at 35% 35%, #ff8a8a, #e74c3c); }
.ludo-token-b { background: radial-gradient(circle at 35% 35%, #87ceeb, #2980b9); }
.ludo-token-g { background: radial-gradient(circle at 35% 35%, #7dcea0, #27ae60); }
.ludo-token-y { background: radial-gradient(circle at 35% 35%, #f7dc6f, #f39c12); }
.ludo-token.movable {
  cursor: pointer;
  animation: ludo-token-pulse 1s ease-in-out infinite;
  border-color: var(--accent);
}
@keyframes ludo-token-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.3); }
  50% { transform: translate(-50%, -50%) scale(1.2); box-shadow: 0 0 12px rgba(201,164,60,0.6); }
}
.ludo-token.just-moved {
  animation: ludo-token-move 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes ludo-token-move {
  0% { transform: translate(-50%, -50%) scale(0.5); }
  60% { transform: translate(-50%, -50%) scale(1.3); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
.ludo-token.captured {
  animation: ludo-capture 0.5s ease;
}
@keyframes ludo-capture {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
  100% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
}
/* Dice effects */
#ludo-dice.rolling {
  animation: dice-roll 0.6s ease;
  pointer-events: none;
}
@keyframes dice-roll {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(0.8); }
  50% { transform: rotate(180deg) scale(1.1); }
  75% { transform: rotate(270deg) scale(0.9); }
  100% { transform: rotate(360deg) scale(1); }
}
#ludo-dice.dice-six {
  animation: dice-six-glow 0.5s ease;
  box-shadow: 0 0 20px rgba(201,164,60,0.6), 0 4px 15px rgba(0,0,0,0.3);
}
@keyframes dice-six-glow {
  0% { box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
  50% { box-shadow: 0 0 30px rgba(201,164,60,0.8), 0 0 60px rgba(201,164,60,0.3); }
  100% { box-shadow: 0 0 20px rgba(201,164,60,0.6), 0 4px 15px rgba(0,0,0,0.3); }
}
.ludo-player-strip {
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 8px; font-size: 11px;
  border: 1px solid transparent;
}
.ludo-player-strip.active {
  border-color: var(--accent);
  background: rgba(201,164,60,0.1);
}
.ludo-player-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.ludo-base-token {
  width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  border: 1.5px solid rgba(0,0,0,0.2); margin: 0 1px;
}

/* ============================== */
/* UNO Game — Professional Design */
/* ============================== */

/* Game table background */
#uno-game-view {
  background: radial-gradient(ellipse at center, #1a3a1a 0%, #0a1a0a 60%, #060e06 100%);
  border-radius: 16px;
  min-height: 400px;
  position: relative;
  border: 2px solid rgba(0,80,0,0.3);
}

/* === CARDS === */
.uno-card {
  width: 60px; height: 90px; border-radius: 10px;
  position: relative; cursor: pointer; user-select: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s, margin-top 0.2s;
  flex-shrink: 0; overflow: hidden;
  border: 3px solid #fff;
  background: #fff;
}
.uno-card .card-front {
  display: flex; flex-direction: column; justify-content: center;
  align-items: center; height: 100%; width: 100%;
  border-radius: 7px; padding: 4px; box-sizing: border-box;
  position: relative; overflow: hidden;
}
/* Oval center (UNO signature look) */
.uno-card .card-oval {
  position: absolute; top: 12%; left: 5%; width: 90%; height: 76%;
  background: rgba(255,255,255,0.2); border-radius: 50%;
  transform: rotate(-25deg);
  border: 2px solid rgba(255,255,255,0.15);
}
/* Corner values */
.uno-card .card-corner {
  font-size: 13px; font-weight: 900; position: absolute; z-index: 2;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.4), -1px -1px 0 rgba(0,0,0,0.1);
  font-family: 'Arial Black', 'Impact', sans-serif;
  line-height: 1;
}
.uno-card .card-corner.top-left { top: 4px; left: 5px; }
.uno-card .card-corner.bottom-right { bottom: 4px; right: 5px; transform: rotate(180deg); }
/* Center value */
.uno-card .card-value {
  font-size: 32px; font-weight: 900; text-align: center;
  position: relative; z-index: 2;
  text-shadow: 2px 2px 0 rgba(0,0,0,0.35), -1px -1px 0 rgba(0,0,0,0.15);
  font-family: 'Arial Black', 'Impact', sans-serif;
  margin: auto;
  line-height: 1;
}

/* Official UNO Colors */
.card-red { background: linear-gradient(165deg, #ff2020 0%, #cc0000 50%, #aa0000 100%); color: white; }
.card-blue { background: linear-gradient(165deg, #2080ff 0%, #0055cc 50%, #003da8 100%); color: white; }
.card-green { background: linear-gradient(165deg, #20cc20 0%, #008800 50%, #006600 100%); color: white; }
.card-yellow { background: linear-gradient(165deg, #ffee00 0%, #ffcc00 50%, #ddaa00 100%); color: #333; }
.card-black {
  background: linear-gradient(165deg, #444 0%, #1a1a1a 50%, #000 100%); color: white;
}
/* Wild card: 4-color circle */
.card-black .card-value { font-size: 22px; }
.card-black .card-oval {
  background: conic-gradient(#ff2020 0deg 90deg, #2080ff 90deg 180deg, #20cc20 180deg 270deg, #ffee00 270deg 360deg);
  opacity: 0.25; border: none;
}

/* Wild color indicator */
.uno-card .wild-color-ring {
  position: absolute; bottom: 3px; right: 3px; width: 16px; height: 16px;
  border-radius: 50%; border: 2px solid #fff; z-index: 3;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Hover & states */
.uno-card:hover:not(.disabled) {
  transform: translateY(-14px) scale(1.08);
  box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  z-index: 10;
}
.uno-card.disabled { cursor: default; opacity: 0.35; filter: grayscale(0.3); }
.uno-card.playable {
  box-shadow: 0 0 0 3px #c9a43c, 0 4px 15px rgba(201,164,60,0.4);
  animation: uno-glow 1.5s ease-in-out infinite;
  margin-top: -4px;
}
@keyframes uno-glow {
  0%, 100% { box-shadow: 0 0 0 3px #c9a43c, 0 4px 15px rgba(201,164,60,0.3); }
  50% { box-shadow: 0 0 0 3px #c9a43c, 0 0 25px rgba(201,164,60,0.6); }
}
.uno-card.played { animation: uno-card-play 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes uno-card-play {
  0% { transform: scale(0.3) rotate(-20deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

/* === CARD BACK (Deck) === */
.uno-card-back {
  width: 60px; height: 90px; border-radius: 10px;
  background: linear-gradient(145deg, #222, #000);
  border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  overflow: hidden;
}
.uno-card-back::before {
  content: ''; position: absolute; inset: 6px;
  border-radius: 6px; border: 2px solid rgba(255,255,255,0.1);
  background: radial-gradient(ellipse, rgba(200,0,0,0.15), transparent);
}
.uno-card-back::after {
  content: "UNO"; color: #e74c3c; font-size: 18px; font-weight: 900;
  font-style: italic; letter-spacing: -1px;
  text-shadow: 0 0 10px rgba(231,76,60,0.5), 2px 2px 0 rgba(0,0,0,0.5);
  transform: rotate(-25deg);
  font-family: 'Arial Black', 'Impact', sans-serif;
}
.uno-card-back:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.6); }

/* === DISCARD PILE (larger cards) === */
#uno-discard { min-width: 76px; min-height: 110px; }
#uno-discard .uno-card { width: 76px; height: 110px; }
#uno-discard .uno-card .card-value { font-size: 40px; }
#uno-discard .uno-card .card-corner { font-size: 15px; }
#uno-discard .uno-card .card-oval { border-width: 3px; }

/* === PLAYER CHIPS === */
.uno-player-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,0.3);
  transition: all 0.3s;
}
.uno-player-chip.active {
  border-color: #c9a43c;
  background: rgba(201,164,60,0.15);
  box-shadow: 0 0 12px rgba(201,164,60,0.3);
}
.uno-player-chip .chip-cards {
  background: rgba(255,255,255,0.15); padding: 2px 7px;
  border-radius: 10px; font-size: 11px; font-weight: 700;
}

/* === UNO BUTTON === */
#uno-call-btn {
  font-family: 'Arial Black', 'Impact', sans-serif;
  letter-spacing: 2px; text-transform: uppercase;
  font-size: 20px; padding: 10px 30px;
  border-radius: 50px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border: 3px solid #fff;
  box-shadow: 0 4px 15px rgba(231,76,60,0.5);
}
@keyframes uno-btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 15px rgba(231,76,60,0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 30px rgba(231,76,60,0.7); }
}

/* === COLOR PICKER === */
.uno-color-choice {
  transition: all 0.2s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.uno-color-choice:hover {
  transform: scale(1.25) !important;
  border-color: white !important;
  box-shadow: 0 0 20px rgba(255,255,255,0.3);
}

/* === HAND AREA === */
#uno-hand {
  gap: 2px;
  perspective: 800px;
}
#uno-hand .uno-card {
  transition: transform 0.2s, margin-top 0.2s, box-shadow 0.2s;
  margin-left: -8px;
}
#uno-hand .uno-card:first-child { margin-left: 0; }

/* === ANIMATIONS === */
.uno-card-flying {
  position: fixed !important; z-index: 9999; pointer-events: none;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.uno-card-drawing { animation: uno-draw-in 0.35s ease-out; }
@keyframes uno-draw-in {
  0% { transform: translateX(-60px) scale(0.4) rotate(-20deg); opacity: 0; }
  100% { transform: translateX(0) scale(1) rotate(0); opacity: 1; }
}
.uno-call-flash { animation: uno-flash 0.6s ease; }
@keyframes uno-flash {
  0%, 100% { background: linear-gradient(135deg, #e74c3c, #c0392b); }
  50% { background: #fff; color: #e74c3c; transform: scale(1.3); }
}
/* Action overlay (Skip, Reverse, +2, +4) */
.uno-action-overlay {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 56px; font-weight: 900; z-index: 9999; pointer-events: none;
  text-shadow: 0 0 30px rgba(255,255,255,0.5), 0 4px 8px rgba(0,0,0,0.5);
  animation: uno-action-pop 1.2s ease-out forwards;
  font-family: 'Arial Black', 'Impact', sans-serif;
  color: #fff;
}
@keyframes uno-action-pop {
  0% { transform: translate(-50%,-50%) scale(0) rotate(-20deg); opacity: 1; }
  40% { transform: translate(-50%,-50%) scale(1.4) rotate(5deg); opacity: 1; }
  100% { transform: translate(-50%,-50%) scale(0.8) rotate(0); opacity: 0; }
}

/* === DIRECTION INDICATOR === */
#uno-direction {
  font-size: 13px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  display: inline-block;
}

/* === RESPONSIVE === */
@media (max-width: 400px) {
  .uno-card { width: 50px; height: 75px; border-width: 2px; }
  .uno-card .card-value { font-size: 26px; }
  .uno-card .card-corner { font-size: 10px; }
  .uno-card-back { width: 50px; height: 75px; border-width: 2px; }
  .uno-card-back::after { font-size: 14px; }
  #uno-discard .uno-card { width: 64px; height: 95px; }
  #uno-discard .uno-card .card-value { font-size: 34px; }
  #uno-hand .uno-card { margin-left: -12px; }
}

/* Points toast animation */
@keyframes points-float {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-40px); }
}
