/* ========================
   全局重置 & 变量
   ======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary: #0084ff;
  --primary-light: #e8f4ff;
  --primary-dark: #0066cc;
  --bg-main: #f0f2f5;
  --bg-message-received: #ffffff;
  --bg-message-sent: #0084ff;
  --text-primary: #1a1a1a;
  --text-secondary: #888;
  --text-white: #ffffff;
  --header-bg: #ffffff;
  --border-color: #e5e5e5;
  --online-green: #4caf50;
  --danger: #ff4d4f;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --header-height: 64px;
  --input-height: 56px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  -webkit-font-smoothing: antialiased;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  position: relative;
  overflow: hidden;
  background: transparent;
  z-index: 1;
}

/* ========================
   头部
   ======================== */
#header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-top) + 8px) 12px 8px;
  background: var(--header-bg);
  box-shadow: var(--shadow-sm);
  z-index: 100;
  flex-shrink: 0;
}

.logo-wrapper {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.header-center {
  flex: 1;
  min-width: 0;
}

.chat-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slogan-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.pin-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.slogan-text {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-shrink: 0;
  padding: 4px 10px;
  background: var(--primary-light);
  border-radius: 20px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--online-green);
  box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

#online-count {
  font-weight: 600;
  color: var(--primary);
}

/* ========================
   消息列表
   ======================== */
.messages-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  scroll-behavior: smooth;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 80px;
}

/* 单条消息 */
.message-wrapper {
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.message-wrapper.swipe-left {
  transform: translateX(-60px);
}

/* 左滑回复图标 */
.swipe-reply-icon {
  position: absolute;
  left: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

/* 回复按钮（hover显示） */
.reply-action-btn {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  z-index: 5;
  transition: opacity 0.2s;
  border: none;
}

.message-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.message-row.sent {
  flex-direction: row-reverse;
}

/* 头像 */
.msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  text-transform: uppercase;
  user-select: none;
}

/* 消息内容区 */
.msg-content-wrap {
  max-width: 72%;
  min-width: 0;
}

/* 用户名 */
.msg-username {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 2px;
  padding: 0 4px;
}

.message-row.sent .msg-username {
  text-align: right;
}

/* 消息气泡 */
.msg-bubble {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  word-break: break-word;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
}

.message-row.received .msg-bubble {
  background: var(--bg-message-received);
  color: var(--text-primary);
  border-top-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

.message-row.sent .msg-bubble {
  background: var(--bg-message-sent);
  color: var(--text-white);
  border-top-right-radius: 4px;
}

/* 图片消息 */
.msg-bubble.image-msg {
  padding: 4px;
  overflow: hidden;
}

.msg-bubble.image-msg img {
  max-width: 240px;
  max-height: 240px;
  border-radius: 8px;
  display: block;
  cursor: pointer;
}

/* 时间戳 */
.msg-time {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  padding: 0 4px;
}

.message-row.sent .msg-time {
  text-align: right;
}

/* 回复引用 */
.msg-reply-quote {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 8px;
  margin-bottom: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 6px;
  border-left: 3px solid var(--primary);
  overflow: hidden;
}

.message-row.sent .msg-reply-quote {
  background: rgba(255,255,255,0.2);
  border-left-color: rgba(255,255,255,0.6);
}

.msg-reply-quote .reply-user {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.message-row.sent .msg-reply-quote .reply-user {
  color: rgba(255,255,255,0.9);
}

.msg-reply-quote .reply-text {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-row.sent .msg-reply-quote .reply-text {
  color: rgba(255,255,255,0.7);
}

/* @ 回复图标 */
.at-reply-badge {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,132,255,0.4);
  border: 2px solid white;
  z-index: 10;
  animation: pulseAt 2s ease-in-out infinite;
}

.at-reply-badge .at-count {
  font-size: 10px;
  line-height: 1;
}

.message-row.sent .at-reply-badge {
  left: -6px;
  right: auto;
}

@keyframes pulseAt {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ========================
   回复横幅
   ======================== */
.reply-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: var(--primary-light);
  border-top: 1px solid var(--border-color);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.reply-banner-content {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  min-width: 0;
}

.reply-banner-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#reply-target-name {
  color: var(--primary);
}

.cancel-reply-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================
   底部输入区域
   ======================== */
.input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px calc(var(--safe-bottom) + 6px);
  background: var(--header-bg);
  box-shadow: 0 -1px 3px rgba(0,0,0,0.06);
  z-index: 50;
  flex-shrink: 0;
}

.image-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 50%;
  transition: background 0.2s;
}

.image-btn:active {
  background: var(--primary-light);
}

.input-wrapper {
  flex: 1;
  min-width: 0;
}

#message-input {
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 20px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg-main);
  color: var(--text-primary);
}

#message-input:focus {
  border-color: var(--primary);
  background: white;
}

.send-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.send-btn:active {
  transform: scale(0.92);
  background: var(--primary-dark);
}

/* ========================
   右下角用户信息
   ======================== */
.profile-badge {
  position: fixed;
  bottom: calc(var(--input-height) + var(--safe-bottom) + 8px);
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  z-index: 40;
  animation: fadeIn 0.3s ease;
}

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

.profile-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  flex-shrink: 0;
}

.profile-name {
  font-size: 12px;
  color: white;
  font-weight: 500;
  white-space: nowrap;
}

/* ========================
   回复查看弹窗
   ======================== */
.reply-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.reply-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  animation: fadeIn 0.2s ease;
}

.reply-modal-content {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 70vh;
  background: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUpModal 0.25s ease;
  padding-bottom: var(--safe-bottom);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.reply-modal-title {
  font-size: 16px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}

.reply-modal-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ========================
   图片预览
   ======================== */
.image-preview {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.image-preview-content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.image-preview img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.image-preview-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-cancel, .btn-send-img {
  padding: 10px 24px;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn-cancel {
  background: rgba(255,255,255,0.2);
  color: white;
}

.btn-send-img {
  background: var(--primary);
  color: white;
}

/* ========================
   Toast 提示
   ======================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 300;
  max-width: 80%;
  text-align: center;
  animation: toastShow 0.3s ease;
}

@keyframes toastShow {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ========================
   连接状态
   ======================== */
.conn-status {
  position: fixed;
  top: calc(var(--header-height) + var(--safe-top) + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 12px;
  border-radius: 20px;
  z-index: 150;
  animation: fadeIn 0.3s ease;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffa500;
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ========================
   系统消息
   ======================== */
.system-message {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 16px;
  background: rgba(0,0,0,0.04);
  border-radius: 12px;
  margin: 4px auto;
  max-width: 80%;
}

/* ========================
   滚动条
   ======================== */
.messages-container::-webkit-scrollbar {
  width: 4px;
}

.messages-container::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 2px;
}

.messages-container::-webkit-scrollbar-track {
  background: transparent;
}

/* ========================
   响应式
   ======================== */
@media (min-width: 600px) {
  .msg-content-wrap {
    max-width: 60%;
  }
}

@media (min-width: 900px) {
  #app {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
  }
}

/* ========================
   群主标识
   ======================== */
.owner-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #ff8c00, #ff6b00);
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 4px;
}

/* ========================
   撤回消息样式
   ======================== */
.msg-bubble.recalled-msg {
  font-style: italic;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.04) !important;
  box-shadow: none !important;
  font-size: 13px;
  border: 1px dashed var(--border-color);
}

.message-row.sent .msg-bubble.recalled-msg {
  background: rgba(0,132,255,0.05) !important;
}

/* ========================
   改名/改头像弹窗
   ======================== */
.profile-edit-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.avatar-edit-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  overflow: hidden;
  border: 3px solid var(--primary-light);
  background: var(--primary);
}

.avatar-upload-btn {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 16px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.avatar-upload-btn:active {
  background: var(--primary);
  color: white;
}

.avatar-tip {
  font-size: 11px;
  color: var(--text-secondary);
}

.name-edit-section {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.name-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

#profile-edit-name {
  width: 100%;
  height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

#profile-edit-name:focus {
  border-color: var(--primary);
}

.save-profile-btn {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.save-profile-btn:active {
  background: var(--primary-dark);
}

.save-profile-btn:disabled {
  opacity: 0.6;
}

/* ========================
   群主操作弹窗
   ======================== */
.owner-action-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.owner-action-target {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4px;
}

.owner-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.owner-action-btn:active {
  transform: scale(0.98);
}

.recall-btn {
  background: #fff3e0;
  color: #e65100;
}

.recall-btn:active {
  background: #ffe0b2;
}

.ban-btn {
  background: #ffebee;
  color: #c62828;
}

.ban-btn:active {
  background: #ffcdd2;
}

/* ========================
   被封禁遮罩
   ======================== */
.banned-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banned-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: white;
}

.banned-content h2 {
  font-size: 22px;
  font-weight: 700;
}

.banned-content p {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* ========================
   可点击的用户信息
   ======================== */
.profile-badge {
  cursor: pointer;
  transition: opacity 0.2s;
}

.profile-badge:active {
  opacity: 0.7;
}

/* ========================
   头像图片样式
   ======================== */
.msg-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* ========================
   管理员登录按钮
   ======================== */
.admin-login-btn {
  position: fixed;
  bottom: 80px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: all 0.2s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.admin-login-btn:active {
  transform: scale(0.9);
}

/* 管理员登录弹窗内部 */
.admin-login-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.admin-login-icon {
  margin-bottom: 4px;
  opacity: 0.6;
}

/* ========================
   背景图更改按钮
   ======================== */
.bg-change-btn {
  position: fixed;
  bottom: 80px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: all 0.2s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.bg-change-btn:active { transform: scale(0.9); }

.bg-menu {
  position: fixed;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 200;
  min-width: 160px;
}

.bg-menu-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  text-align: left;
}

.bg-menu-item:active { background: #f5f5f5; }
.bg-menu-item:not(:last-child) { border-bottom: 1px solid #f0f0f0; }

/* 背景图蒙层 */
.chat-bg-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* 默认背景图 */
#chat-bg-overlay {
  background-image: url('default-bg.jpg');
  opacity: 0.5;
}

/* 消息容器透明，让背景透出 */
.messages-container {
  background: transparent !important;
}

/* ========================
   管理员清除聊天公告条
   ======================== */
.clear-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #fff3e0, #ffe0b2);
  border-bottom: 1px solid rgba(255,152,0,0.3);
  color: #e65100;
  font-size: 13px;
  font-weight: 500;
  animation: clearNoticeSlide 0.4s ease;
}

.clear-notice-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.clear-notice-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* ========================
   群主一键清除全部聊天按钮
   ======================== */
.clear-all-btn {
  position: fixed;
  bottom: 130px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 87, 34, 0.9);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(255,87,34,0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  transition: all 0.2s;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.clear-all-btn:active { transform: scale(0.9); }
