/* ====== 抖音风格直播间 ====== */

:root {
  /* 抖音配色 */
  --primary: #FE2C55;
  --primary-dark: #DE1C45;
  --secondary: #25F4EE;
  --secondary-dark: #1EC5D5;
  
  /* 背景色 */
  --bg-dark: #0a0a0f;
  --bg-darker: #050508;
  --bg-card: rgba(20, 20, 30, 0.75);
  --bg-card-hover: rgba(30, 30, 45, 0.85);
  
  /* 文字 */
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.35);
  
  /* 边框 */
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.12);
  
  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;
  
  /* 发光 */
  --glow-primary: 0 0 30px rgba(254, 44, 85, 0.4);
  --glow-secondary: 0 0 30px rgba(37, 244, 238, 0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-darker);
  color: var(--text);
  overflow: hidden;
}

/* ====== 聊天输入 ====== */
.chat-input-area {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

/* ====== 悬浮聊天输入框 ====== */
.float-chat-input {
  position: fixed;
  bottom: 40px;
  z-index: 998;
  width: 320px;
  border-radius: var(--radius-lg);
  background: rgba(20, 20, 30, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  transition: right 0.3s ease, opacity 0.3s ease;
}

.float-chat-input.with-sidebar {
  right: 560px;
}

.float-chat-input.no-sidebar {
  right: 130px;
}

.chat-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.chat-input:focus {
  border-color: var(--secondary);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(37,244,238,0.1);
}

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

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--glow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
}

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

/* ====== 底部礼物栏 ====== */
.bottom-bar {
  padding: 10px 12px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.gift-send-area {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-gift-display {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}

.selected-gift-info {
  display: flex;
  flex-direction: column;
}

.selected-gift-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.selected-gift-price {
  font-size: 11px;
  color: #F8B500;
}

.count-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.count-btn:hover {
  background: rgba(255,255,255,0.15);
}

.count-display {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  min-width: 32px;
  text-align: center;
}

.gift-send-btn {
  padding: 12px 20px;
  border-radius: var(--radius-md);
  border: none;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.gift-send-btn:hover:not(:disabled) {
  transform: scale(1.02);
}

.gift-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====== 管理面板 ====== */
.admin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.admin-panel {
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.admin-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.admin-close-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.admin-close-btn:hover {
  background: rgba(255,255,255,0.1);
}

.admin-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.admin-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.admin-add-btn {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--primary);
  border: none;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-add-btn:hover {
  background: var(--primary-dark);
}

.admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-input {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.form-input:focus {
  border-color: var(--secondary);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  text-align: left;
  font-size: 13px;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.admin-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.action-btn:hover {
  background: rgba(255,255,255,0.1);
}

.action-btn.delete {
  border-color: rgba(254,44,85,0.3);
  color: var(--primary);
}

.action-btn.toggle {
  border-color: rgba(37,244,238,0.3);
  color: var(--secondary);
}

/* ====== 商品列表 ====== */
.product-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.product-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-card.off-sale {
  opacity: 0.6;
}

.product-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  overflow: hidden;
  flex-shrink: 0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.product-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.product-original-price {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-tag {
  display: inline-block;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(248,181,0,0.2), rgba(254,44,85,0.2));
  color: #F8B500;
  font-weight: 600;
}

.product-buy-btn {
  margin-top: auto;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  color: white;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.product-buy-btn:hover {
  transform: scale(1.05);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
}

/* ====== 连接状态 ====== */
.connection-status {
  position: absolute;
  top: 16px;
  right: 400px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-secondary);
  z-index: 30;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.disconnected {
  background: #ff6b6b;
  animation: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 4px #4ade80; }
  50% { box-shadow: 0 0 12px #4ade80; }
}

/* ====== 滚动条 ====== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.25);
}

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

body {
  font-family: var(--font-family);
  background: var(--bg-darker);
  color: var(--text);
  overflow: hidden;
}

/* ====== 主容器 ====== */
.live-room {
  display: flex;
  width: 100%;
  min-width: 100vw;
  height: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
  position: relative;
  overflow: hidden;
}

/* 背景光效 */
.live-room::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(254, 44, 85, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(37, 244, 238, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ====== 主视频区域 ====== */
.live-main {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 1;
}

.video-container {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 视频背景装饰 */
.video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.video-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.video-gradient-orb.orb-1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: 10%;
  left: 20%;
  animation-delay: 0s;
}

.video-gradient-orb.orb-2 {
  width: 250px;
  height: 250px;
  background: var(--secondary);
  top: 50%;
  right: 15%;
  animation-delay: -3s;
}

.video-gradient-orb.orb-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(var(--primary), var(--secondary));
  bottom: 10%;
  left: 40%;
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 10px) scale(0.95); }
}

/* 视频播放器后备 */
.video-player-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1a1a2e 0%, #0d0d15 100%);
  z-index: 2;
}

.video-player-fallback .live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 10px var(--primary); }
  50% { box-shadow: 0 0 25px var(--primary), 0 0 40px var(--primary); }
}

.video-player-fallback .viewer-count {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ====== 顶部栏 ====== */
.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 20;
}

.streamer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streamer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--glow-primary);
  border: 2px solid rgba(255,255,255,0.2);
}

.streamer-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.streamer-follow-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--glow-primary);
  margin-top: 4px;
}

.streamer-follow-btn:hover {
  transform: scale(1.05);
}

.top-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  transform: scale(1.1);
}

/* ====== 弹幕层 ====== */
.danmaku-layer {
  position: absolute;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 100px;
  pointer-events: none;
  overflow: hidden;
  z-index: 15;
}

.danmaku-item {
  position: absolute;
  right: -300px;
  white-space: nowrap;
  font-size: 16px;
}

.danmaku-item.gift-danmaku {
  animation: danmaku-drop 3s ease-out forwards;
}

@keyframes danmaku-drop {
  0% { transform: translateY(-20px); opacity: 0; }
  20% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(20px); opacity: 0; }
}

/* ====== 历史弹幕 ====== */
.danmaku-history {
  position: absolute;
  bottom: 120px;
  left: 20px;
  width: 320px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.danmaku-history-item {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.4;
  padding: 3px 0;
  word-break: break-word;
}

.danmaku-history-item.gift-item {
  color: #F8B500;
}

.danmaku-history-item.ai-item {
  background: rgba(37, 244, 238, 0.05);
  border-radius: 6px;
  padding: 4px 8px;
  margin: 2px 0;
}

.danmaku-username {
  color: var(--secondary);
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.danmaku-content {
  color: var(--text);
  flex: 1;
  min-width: 0;
}

/* ====== 右侧面板 ====== */
.right-panel {
  width: 380px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 25;
  position: relative;
}

/* Tab 栏 */
.tab-bar {
  display: flex;
  padding: 10px 12px 0;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.tab-item {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

.tab-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--primary);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform 0.2s;
}

.tab-item.active {
  color: var(--text);
  background: var(--bg-card-hover);
}

.tab-item.active::after {
  transform: scaleX(1);
}

.tab-item:hover:not(.active) {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

/* Tab 内容 */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ====== 礼物网格 ====== */
.gift-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.gift-card {
  background: linear-gradient(145deg, rgba(30,30,45,0.6), rgba(20,20,30,0.8));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.gift-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.2s;
}

.gift-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gift-card.selected {
  border-color: var(--primary);
  box-shadow: var(--glow-primary);
}

.gift-card.selected::before {
  opacity: 0.15;
}

.gift-icon {
  font-size: 24px;
  margin-bottom: 3px;
}

.gift-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.gift-price {
  font-size: 10px;
  color: #F8B500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

/* ====== 礼物动画层 ====== */
.gift-animation-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.gift-effect {
  position: absolute;
  animation: gift-show 3s ease-out forwards;
}

@keyframes gift-show {
  0% { transform: translateX(-50%) scale(0.5); opacity: 0; }
  20% { transform: translateX(-50%) scale(1.1); opacity: 0.7; }
  30% { transform: translateX(-50%) scale(1); opacity: 0.7; }
  80% { transform: translateX(-50%) scale(1); opacity: 0.7; }
  100% { transform: translateX(-50%) scale(0.8); opacity: 0; }
}

.gift-effect.type-rail {
  animation: gift-rail 4s linear forwards;
  opacity: 0.7;
}

@keyframes gift-rail {
  0% { transform: translateX(-50%); opacity: 1; }
  100% { transform: translateX(-200%); opacity: 1; }
}

/* ====== 粒子特效 ====== */
@keyframes particle-burst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ====== 礼物通知条 ====== */
.gift-notice {
  position: absolute;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-lg);
  animation: notice-show 4s ease-out forwards;
  z-index: 45;
}

@keyframes notice-show {
  0% { transform: translateY(20px); opacity: 0; }
  20% { transform: translateY(0); opacity: 1; }
  80% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-10px); opacity: 0; }
}

@keyframes notice-rail {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-300px); opacity: 1; }
}
/* ========== AI Agent Panel Styles ========== */
.ai-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

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

.ai-panel {
  width: 420px;
  max-width: 95vw;
  max-height: 85vh;
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 16px;
  border: 1px solid rgba(37, 244, 238, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 244, 238, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

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

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(37, 244, 238, 0.05);
  border-bottom: 1px solid rgba(37, 244, 238, 0.1);
}

.ai-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 244, 238, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(37, 244, 238, 0); }
}

.ai-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ai-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.ai-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.ai-status-dot {
  width: 8px;
  height: 8px;
  background: #25f4ee;
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

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

.ai-close-btn {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.ai-close-btn:hover {
  background: rgba(254, 44, 85, 0.5);
}

.ai-tabs {
  display: flex;
  padding: 8px 12px;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.ai-tab {
  flex: 1;
  padding: 10px;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 13px;
}

.ai-tab:hover {
  background: rgba(37, 244, 238, 0.1);
}

.ai-tab.active {
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.2), rgba(254, 44, 85, 0.2));
  color: #25f4ee;
}

.ai-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

/* AI Chat */
.ai-chat-container {
  display: flex;
  flex-direction: column;
  height: 450px;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
  margin-bottom: 12px;
}

.ai-welcome {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.7);
}

.ai-welcome-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.ai-welcome-title {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.ai-welcome-desc {
  font-size: 13px;
  margin-bottom: 20px;
}

.ai-welcome-hints {
  text-align: left;
  background: rgba(37, 244, 238, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.hint-item {
  font-size: 13px;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.6);
}

.ai-message {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  animation: msgSlide 0.3s ease;
}

@keyframes msgSlide {
  from { transform: translateX(-10px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  background: rgba(37, 244, 238, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.ai-message.assistant .ai-message-avatar {
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
}

.ai-message.system .ai-message-avatar {
  background: rgba(254, 44, 85, 0.3);
}

.ai-message.user .ai-message-avatar {
  background: rgba(255, 255, 255, 0.1);
}

.ai-message-content {
  max-width: 75%;
}

.ai-message.user .ai-message-content {
  align-items: flex-end;
}

.ai-message-text {
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.2);
  padding: 10px 14px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.ai-message.user .ai-message-text {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 4px;
}

.ai-message.system .ai-message-text {
  background: rgba(254, 44, 85, 0.1);
  border-color: rgba(254, 44, 85, 0.2);
}

.ai-message-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

.ai-typing {
  display: flex;
  gap: 4px;
  padding: 10px 14px;
}

.ai-typing span {
  width: 8px;
  height: 8px;
  background: #25f4ee;
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.ai-quick-commands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ai-quick-btn {
  padding: 6px 12px;
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.2);
  border-radius: 16px;
  color: #25f4ee;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-quick-btn:hover {
  background: rgba(37, 244, 238, 0.2);
}

.ai-input-container {
  display: flex;
  gap: 8px;
}

.ai-input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(37, 244, 238, 0.2);
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.ai-input:focus {
  border-color: #25f4ee;
}

.ai-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.ai-send-btn {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-send-btn:hover {
  transform: scale(1.05);
}

/* AI Control */
.ai-control-container {
  padding: 8px;
}

.ai-control-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ai-control-section h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 8px;
}

.ai-control-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.ai-voice-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.2), rgba(37, 244, 238, 0.1));
  border: 2px solid #25f4ee;
  border-radius: 12px;
  color: #25f4ee;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-voice-btn.listening {
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  color: #fff;
  animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 244, 238, 0.4); }
  50% { box-shadow: 0 0 0 15px rgba(37, 244, 238, 0); }
}

.voice-icon {
  margin-right: 8px;
}

.voice-transcript {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 13px;
}

.transcript-label {
  color: rgba(255, 255, 255, 0.5);
}

.ai-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-control-btn {
  padding: 12px;
  background: rgba(254, 44, 85, 0.1);
  border: 1px solid rgba(254, 44, 85, 0.3);
  border-radius: 10px;
  color: #fe2c55;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-control-btn:hover {
  background: rgba(254, 44, 85, 0.2);
}

.ai-auto-reply-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-reply-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s;
}

.ai-reply-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.ai-reply-item.disabled {
  opacity: 0.4;
}

.ai-reply-item-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ai-reply-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.ai-reply-toggle {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.ai-reply-toggle.on {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.ai-reply-toggle.off {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

.ai-reply-delete {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.ai-reply-delete:hover {
  background: rgba(254, 44, 85, 0.2);
  border-color: rgba(254, 44, 85, 0.4);
  color: #fe2c55;
}

.ai-reply-add {
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.ai-reply-add-row {
  margin-bottom: 8px;
}

.ai-reply-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.ai-reply-input:focus {
  border-color: rgba(37, 244, 238, 0.4);
}

.ai-reply-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.ai-reply-add-btn {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  background: rgba(37, 244, 238, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.2);
  color: #25f4ee;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-reply-add-btn:hover:not(:disabled) {
  background: rgba(37, 244, 238, 0.2);
  border-color: rgba(37, 244, 238, 0.4);
}

.ai-reply-add-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ai-reply-keywords {
  color: #25f4ee;
  padding: 2px 8px;
  background: rgba(37, 244, 238, 0.1);
  border-radius: 4px;
}

.ai-reply-arrow {
  color: rgba(255, 255, 255, 0.3);
}

.ai-reply-response {
  color: rgba(255, 255, 255, 0.7);
}

/* AI Simulate */
.ai-simulate-container {
  padding: 8px;
}

.ai-simulate-section {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.ai-simulate-section h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 8px;
}

.ai-simulate-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 12px;
}

.ai-simulate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-simulate-btn {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-simulate-btn:hover {
  background: rgba(37, 244, 238, 0.1);
  border-color: rgba(37, 244, 238, 0.3);
}

.ai-demo-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #25f4ee, #fe2c55);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-demo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 44, 85, 0.3);
}

/* AI Button in TopBar */
.icon-btn.ai-btn {
  animation: aiGlow 2s ease-in-out infinite;
}

@keyframes aiGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(254, 44, 85, 0.3); }
  50% { box-shadow: 0 0 15px rgba(254, 44, 85, 0.6); }
}

.icon-btn.ai-btn.listening {
  animation: voiceGlow 0.5s ease-in-out infinite;
}

@keyframes voiceGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(37, 244, 238, 0.5); }
  50% { box-shadow: 0 0 25px rgba(37, 244, 238, 0.8); }
}

/* ========== 星级礼物特效系统 ========== */

/* 通用粒子爆炸动画 - 增强版 */
@keyframes particle-burst {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
    filter: blur(0px);
  }
  15% {
    transform: translate(0, 0) scale(1.8);
    opacity: 1;
    filter: blur(0px);
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0.3);
    opacity: 0;
    filter: blur(2px);
  }
}

/* 进阶粒子动画 - 带拖尾效果 */
@keyframes particle-burst-great {
  0% {
    transform: translate(0, 0) scale(0) rotate(0deg);
    opacity: 0;
    filter: blur(0px) brightness(1);
  }
  10% {
    transform: translate(0, 0) scale(2.2) rotate(180deg);
    opacity: 1;
    filter: blur(0px) brightness(1.5);
  }
  50% {
    transform: translate(calc(var(--tx) * 1.2), calc(var(--ty) * 0.8)) scale(1.2) rotate(360deg);
    opacity: 0.9;
    filter: blur(1px) brightness(1.2);
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0) rotate(720deg);
    opacity: 0;
    filter: blur(3px) brightness(0.5);
  }
}

/* 史诗粒子动画 - 带光晕和拖尾 */
@keyframes particle-burst-epic {
  0% {
    transform: translate(0, 0) scale(0) rotate(0deg);
    opacity: 0;
    filter: blur(0px) brightness(1);
  }
  8% {
    transform: translate(0, 0) scale(3) rotate(180deg);
    opacity: 1;
    filter: blur(0px) brightness(2);
  }
  25% {
    transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3)) scale(2) rotate(360deg);
    opacity: 1;
    filter: blur(0px) brightness(1.8);
  }
  60% {
    transform: translate(calc(var(--tx) * 1.1), calc(var(--ty) * 0.8)) scale(1) rotate(540deg);
    opacity: 0.8;
    filter: blur(1px) brightness(1.3);
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0) rotate(1080deg);
    opacity: 0;
    filter: blur(4px) brightness(0.3);
  }
}

/* 粒子拖尾效果 */
.particle-trail {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  animation: trail-fade 0.8s ease-out forwards;
}

@keyframes trail-fade {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* ========== 星级礼物标签样式 ========== */
.gift-label.stars-1 { font-size: 14px; }
.gift-label.stars-2 { font-size: 15px; }
.gift-label.stars-3 { font-size: 16px; }
.gift-label.stars-4 { font-size: 17px; }
.gift-label.stars-5 { font-size: 18px; }

.stars-badge-inline {
  margin-left: 8px;
  font-size: 12px;
}

/* ========== 礼物图标星级动画 - 增强版 ========== */
.gift-icon.stars-1 {
  animation: gift-appear 0.4s ease-out;
}
.gift-icon.stars-2 {
  animation: gift-bounce 0.6s ease-out;
}
.gift-icon.stars-3 {
  animation: gift-bounce-glow 0.8s ease-out;
}
.gift-icon.stars-4 {
  animation: gift-bounce-rotate 1s ease-out;
}
.gift-icon.stars-5 {
  animation: gift-legendary 1.2s ease-out infinite alternate;
}

@keyframes gift-appear {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes gift-bounce {
  0% { transform: scale(0); filter: blur(5px); }
  50% { transform: scale(1.3); filter: blur(0px); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

@keyframes gift-bounce-glow {
  0% { transform: scale(0); filter: blur(10px) brightness(0.5); }
  40% { transform: scale(1.4); filter: blur(0px) brightness(1.5); }
  60% { transform: scale(0.9); filter: blur(0px) brightness(1); }
  100% { transform: scale(1); filter: blur(0px) brightness(1); }
}

@keyframes gift-bounce-rotate {
  0% { transform: scale(0) rotate(-180deg); filter: blur(10px); }
  50% { transform: scale(1.5) rotate(20deg); filter: blur(0px); }
  70% { transform: scale(0.9) rotate(-10deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes gift-legendary {
  0% { transform: scale(0.9) rotate(-5deg); filter: drop-shadow(0 0 20px currentColor); }
  100% { transform: scale(1.15) rotate(5deg); filter: drop-shadow(0 0 40px currentColor) drop-shadow(0 0 80px currentColor); }
}

/* ========== 礼物光晕 - 增强版 ========== */
.gift-glow.glow-1 { animation: glow-pulse-soft 2s ease-in-out infinite; }
.gift-glow.glow-2 { animation: glow-pulse 1.5s ease-in-out infinite; }
.gift-glow.glow-3 { animation: glow-pulse-strong 1.2s ease-in-out infinite; }
.gift-glow.glow-4 { animation: glow-pulse-epic 0.8s ease-in-out infinite; }
.gift-glow.glow-5 { animation: glow-pulse-legendary 0.5s ease-in-out infinite; }

@keyframes glow-pulse-soft {
  0%, 100% { opacity: 0.3; transform: scale(1); filter: blur(8px); }
  50% { opacity: 0.6; transform: scale(1.05); filter: blur(12px); }
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); filter: blur(10px); }
  50% { opacity: 0.9; transform: scale(1.15); filter: blur(15px); }
}

@keyframes glow-pulse-strong {
  0%, 100% { opacity: 0.6; transform: scale(1); filter: blur(12px); }
  50% { opacity: 1; transform: scale(1.25); filter: blur(20px); }
}

@keyframes glow-pulse-epic {
  0%, 100% { opacity: 0.7; transform: scale(1); filter: blur(15px); }
  50% { opacity: 1; transform: scale(1.35); filter: blur(25px); }
}

@keyframes glow-pulse-legendary {
  0%, 100% { opacity: 0.8; transform: scale(1); filter: blur(20px) brightness(1); }
  50% { opacity: 1; transform: scale(1.5); filter: blur(30px) brightness(1.5); }
}

/* ========== 5星全屏特效 - 高级版 ========== */
.fullscreen-gift-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
  animation: fullscreen-flash 0.5s ease-out, fullscreen-fadeout 0.8s ease-out 4.2s forwards;
}

.fullscreen-gift-effect.no-auto-fade {
  animation: fullscreen-flash 0.5s ease-out;
}

.fullscreen-gift-effect.no-auto-fade.video-mode {
  animation: none;
  opacity: 1;
}

.fullscreen-gift-effect.fade-out-triggered {
  animation: fullscreen-fadeout 0.8s ease-out forwards;
}

/* 背景遮罩 - 隐藏其他元素 */
.fullscreen-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 0;
}

/* 礼物视频样式 */
.gift-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

@keyframes fullscreen-flash {
  0% { background: rgba(255, 255, 255, 0.9); }
  30% { background: rgba(255, 255, 255, 0.3); }
  100% { background: transparent; }
}

@keyframes fullscreen-fadeout {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* 多层背景光效 */
.fullscreen-bg {
  position: absolute;
  inset: 0;
  animation: fullscreen-bg-pulse 2s ease-in-out infinite;
}

.fullscreen-bg::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse at center, var(--glow-color, #da70d6) 0%, transparent 70%);
  opacity: 0.4;
  animation: bg-rotate 8s linear infinite;
}

.fullscreen-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255,215,0,0.1) 0%, transparent 50%);
  animation: bg-shimmer 3s ease-in-out infinite;
}

@keyframes fullscreen-bg-pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.15); }
}

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

@keyframes bg-shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* 中央图标区域 */
.fullscreen-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: fullscreen-icon-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fullscreen-icon-entrance {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-180deg); filter: blur(10px); }
  50% { transform: translate(-50%, -50%) scale(1.8) rotate(10deg); filter: blur(0px); }
  70% { transform: translate(-50%, -50%) scale(0.9) rotate(-5deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
}

.fullscreen-icon {
  font-size: 180px;
  animation: fullscreen-icon-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 40px var(--glow-color, #da70d6)) 
          drop-shadow(0 0 80px var(--glow-color, #da70d6))
          drop-shadow(0 0 120px rgba(255,215,0,0.5));
}

@keyframes fullscreen-icon-bounce {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.15) rotate(3deg); }
  75% { transform: scale(0.95) rotate(-3deg); }
}

/* 多层光晕效果 */
.fullscreen-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-color, #da70d6) 0%, transparent 70%);
  animation: fullscreen-glow-pulse 1.5s ease-in-out infinite;
  filter: blur(20px);
}

.fullscreen-glow::before {
  content: '';
  position: absolute;
  inset: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, transparent 60%);
  animation: glow-rotate 4s linear infinite reverse;
}

@keyframes fullscreen-glow-pulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.4); }
}

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

/* 左右飞入特效 - 增强版 */
.fullscreen-rail-left {
  position: absolute;
  top: 50%;
  left: -200px;
  transform: translateY(-50%);
  animation: rail-fly-in-left 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.fullscreen-rail-right {
  position: absolute;
  top: 50%;
  right: -200px;
  transform: translateY(-50%);
  animation: rail-fly-in-right 4s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
  animation-delay: 2s;
}

@keyframes rail-fly-in-left {
  0% { left: -200px; opacity: 0; transform: translateY(-50%) scale(0.5) rotate(-20deg); }
  15% { left: 15%; opacity: 1; transform: translateY(-50%) scale(1.2) rotate(10deg); }
  85% { left: 75%; opacity: 1; transform: translateY(-50%) scale(1) rotate(0deg); }
  100% { left: 120%; opacity: 0; transform: translateY(-50%) scale(0.8) rotate(20deg); }
}

@keyframes rail-fly-in-right {
  0% { right: -200px; opacity: 0; transform: translateY(-50%) scale(0.5) rotate(20deg); }
  15% { right: 15%; opacity: 1; transform: translateY(-50%) scale(1.2) rotate(-10deg); }
  85% { right: 75%; opacity: 1; transform: translateY(-50%) scale(1) rotate(0deg); }
  100% { right: 120%; opacity: 0; transform: translateY(-50%) scale(0.8) rotate(-20deg); }
}

.rail-icon {
  font-size: 100px;
  filter: drop-shadow(0 0 30px var(--glow-color, #da70d6)) 
          drop-shadow(0 0 60px rgba(218,112,214,0.5));
  animation: rail-icon-pulse 0.5s ease-in-out infinite alternate;
}

@keyframes rail-icon-pulse {
  0% { filter: drop-shadow(0 0 30px var(--glow-color, #da70d6)) drop-shadow(0 0 60px rgba(218,112,214,0.5)); }
  100% { filter: drop-shadow(0 0 50px var(--glow-color, #da70d6)) drop-shadow(0 0 100px rgba(218,112,214,0.8)); }
}

/* 全屏粒子 - 增强版 */
.fullscreen-particles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fullscreen-particle {
  position: absolute;
  font-size: 28px;
  animation: particle-explode 2.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  filter: drop-shadow(0 0 10px currentColor);
}

@keyframes particle-explode {
  0% {
    transform: translate(-50%, -50%) rotate(0deg) scale(0);
    opacity: 0;
    filter: blur(0px) brightness(1);
  }
  15% {
    transform: translate(-50%, -50%) rotate(180deg) scale(2.5);
    opacity: 1;
    filter: blur(0px) brightness(2);
  }
  40% {
    transform: translate(
      calc(-50% + cos(var(--angle)) * 200px),
      calc(-50% + sin(var(--angle)) * 150px)
    ) rotate(360deg) scale(1.5);
    opacity: 0.9;
    filter: blur(0px) brightness(1.5);
  }
  100% {
    transform: translate(
      calc(-50% + cos(var(--angle)) * 450px),
      calc(-50% + sin(var(--angle)) * 350px)
    ) rotate(720deg) scale(0);
    opacity: 0;
    filter: blur(2px) brightness(0.5);
  }
}

/* 粒子光晕效果 */
.fullscreen-particle::after {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, currentColor 0%, transparent 70%);
  opacity: 0.5;
  filter: blur(8px);
}

/* 上下滑动的星星 - 增强版 */
.fullscreen-stars-top,
.fullscreen-stars-bottom {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 80px;
}

.fullscreen-stars-top {
  top: 8%;
  animation: stars-slide-down 3s ease-in-out infinite;
}

.fullscreen-stars-bottom {
  bottom: 8%;
  animation: stars-slide-up 3s ease-in-out infinite;
}

@keyframes stars-slide-down {
  0%, 100% { transform: translateY(-30px) rotate(-5deg); opacity: 0.4; }
  50% { transform: translateY(30px) rotate(5deg); opacity: 1; }
}

@keyframes stars-slide-up {
  0%, 100% { transform: translateY(30px) rotate(5deg); opacity: 0.4; }
  50% { transform: translateY(-30px) rotate(-5deg); opacity: 1; }
}

.star-slide,
.star-slide-down {
  font-size: 48px;
  animation: star-twinkle 1.2s ease-in-out infinite;
  animation-delay: var(--delay, 0ms);
  filter: drop-shadow(0 0 15px #ffd700) drop-shadow(0 0 30px rgba(255,215,0,0.5));
}

@keyframes star-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); filter: brightness(1) drop-shadow(0 0 15px #ffd700); }
  50% { transform: scale(1.4) rotate(10deg); filter: brightness(2) drop-shadow(0 0 30px #ffd700) drop-shadow(0 0 60px rgba(255,215,0,0.8)); }
}

/* 顶部横幅 - 增强版 */
.fullscreen-banner {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translateX(-50%);
  animation: banner-entrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10;
}

@keyframes banner-entrance {
  0% { transform: translateX(-50%) translateY(-150px) scale(0.8); opacity: 0; filter: blur(10px); }
  60% { transform: translateX(-50%) translateY(10px) scale(1.05); opacity: 1; filter: blur(0px); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(218,112,214,0.2));
  border: 2px solid;
  border-image: linear-gradient(90deg, #da70d6, #ffd700, #da70d6) 1;
  border-radius: 50px;
  padding: 18px 40px;
  font-size: 26px;
  color: white;
  text-shadow: 0 2px 15px rgba(0,0,0,0.9);
  box-shadow: 0 0 60px rgba(218,112,214,0.3),
              0 0 100px rgba(218,112,214,0.15),
              inset 0 0 30px rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.banner-content::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: banner-shine 3s ease-in-out infinite;
}

@keyframes banner-shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.banner-user {
  color: #25f4ee;
  font-weight: bold;
  text-shadow: 0 0 20px rgba(37, 244, 238, 0.5);
}

.banner-gift {
  color: #ffd700;
  font-weight: bold;
  text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.banner-count {
  color: #fe2c55;
  font-size: 36px;
  font-weight: bold;
  animation: count-pulse 0.6s ease-in-out infinite alternate;
  text-shadow: 0 0 20px rgba(254, 44, 85, 0.5);
}

@keyframes count-pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.25); }
}

/* 五星徽章 */
.fullscreen-stars-badge {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  animation: badge-entrance 0.8s ease-out;
}

@keyframes badge-entrance {
  0% { transform: translateX(-50%) scale(0); }
  60% { transform: translateX(-50%) scale(1.3); }
  100% { transform: translateX(-50%) scale(1); }
}

.star-badge {
  font-size: 36px;
  animation: star-spin 2s linear infinite;
  animation-delay: calc(var(--i) * 0.2s);
  filter: drop-shadow(0 0 10px #ffd700);
}

@keyframes star-spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.2); }
  100% { transform: rotate(360deg) scale(1); }
}

/* ========== 4星特效 ========== */
.gift-effect.stars-4 {
  animation: gift-entrance-4 0.6s ease-out;
}

@keyframes gift-entrance-4 {
  0% { transform: translateX(-50%) scale(0) rotate(-20deg); }
  60% { transform: translateX(-50%) scale(1.3) rotate(10deg); }
  80% { transform: translateX(-50%) scale(0.9) rotate(-5deg); }
  100% { transform: translateX(-50%) scale(1) rotate(0deg); }
}

/* ========== 3星特效 ========== */
.gift-effect.type-fly.stars-3 {
  animation: fly-across 3s ease-in-out forwards;
}

@keyframes fly-across {
  0% { left: -20%; transform: rotate(0deg); }
  30% { left: 30%; transform: rotate(15deg) scale(1.2); }
  70% { left: 60%; transform: rotate(-10deg) scale(1.1); }
  100% { left: 110%; transform: rotate(0deg) scale(1); }
}

/* ========== 礼物动画容器 ========== */
.gift-animation-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.gift-animation-wrapper.stars-4,
.gift-animation-wrapper.stars-5 {
  z-index: 100;
}

/* ========== 额外光效增强 ========== */

/* 闪光效果 */
.flash-effect {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,0.8) 0%, transparent 50%);
  pointer-events: none;
  z-index: 9998;
  animation: flash-fade 0.3s ease-out forwards;
}

@keyframes flash-fade {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* 能量波纹 */
.energy-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--glow-color, #da70d6);
  animation: ring-expand 2s ease-out forwards;
  pointer-events: none;
}

@keyframes ring-expand {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* 飘浮光点 */
.floating-light {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--glow-color, #ffd700);
  box-shadow: 0 0 10px var(--glow-color, #ffd700), 0 0 20px var(--glow-color, #ffd700);
  animation: float-up 3s ease-out forwards;
  pointer-events: none;
}

@keyframes float-up {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  100% { transform: translateY(-200px) scale(0); opacity: 0; }
}

/* 屏幕震动效果 */
.screen-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5px, -5px); }
  20% { transform: translate(5px, 5px); }
  30% { transform: translate(-5px, 5px); }
  40% { transform: translate(5px, -5px); }
  50% { transform: translate(-3px, 3px); }
  60% { transform: translate(3px, -3px); }
  70% { transform: translate(-2px, 2px); }
  80% { transform: translate(2px, -2px); }
  90% { transform: translate(-1px, 1px); }
}
.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

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

.login-panel {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 32px;
  width: 380px;
  max-width: 90vw;
  position: relative;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(37, 244, 238, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(37, 244, 238, 0.2);
  animation: slideUp 0.3s ease;
}

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

.login-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.login-close:hover {
  background: rgba(254, 44, 85, 0.3);
  color: white;
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  font-size: 48px;
  margin-bottom: 12px;
  animation: pulse 2s ease-in-out infinite;
}

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

.login-header h2 {
  color: white;
  font-size: 24px;
  margin: 0 0 8px 0;
  font-weight: 700;
}

.login-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin: 0;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
}

.login-field input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  font-size: 15px;
  transition: all 0.2s;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.login-field input:focus {
  outline: none;
  border-color: #25f4ee;
  background: rgba(37, 244, 238, 0.08);
  box-shadow: 0 0 20px rgba(37, 244, 238, 0.2);
}

.login-error {
  background: rgba(254, 44, 85, 0.15);
  border: 1px solid rgba(254, 44, 85, 0.3);
  border-radius: 10px;
  padding: 12px;
  color: #fe2c55;
  font-size: 13px;
  text-align: center;
}

.login-btn {
  background: linear-gradient(135deg, #fe2c55 0%, #ff6b8a 100%);
  border: none;
  border-radius: 12px;
  padding: 16px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.login-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 44, 85, 0.4);
}

.login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
}

.login-footer p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin: 0;
}

.login-switch-btn {
  background: none;
  border: none;
  color: #25f4ee;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
}

.login-switch-btn:hover {
  color: #fe2c55;
}

.login-demo-accounts {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.demo-title {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  margin-bottom: 10px;
}

.demo-accounts {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.demo-account-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.demo-account-btn:hover {
  background: rgba(37, 244, 238, 0.15);
  border-color: #25f4ee;
  color: #25f4ee;
}

/* User Badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s;
}

.user-badge:hover {
  background: rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 255, 255, 0.2);
}

.user-badge.login-prompt {
  background: rgba(37, 244, 238, 0.15);
  border-color: rgba(37, 244, 238, 0.3);
}

.user-badge.login-prompt:hover {
  background: rgba(37, 244, 238, 0.25);
  border-color: #25f4ee;
}

.user-avatar {
  font-size: 20px;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name {
  color: white;
  font-size: 13px;
  font-weight: 600;
}

.user-coins {
  color: #ffd700;
  font-size: 11px;
}

.user-logout {
  background: rgba(254, 44, 85, 0.2);
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  color: #fe2c55;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-logout:hover {
  background: rgba(254, 44, 85, 0.4);
  color: white;
}
.mute-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

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

.mute-modal {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 20px;
  padding: 40px;
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 40px rgba(255, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border: 2px solid rgba(255, 0, 0, 0.3);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mute-icon {
  font-size: 80px;
  margin-bottom: 20px;
  animation: shake 0.5s ease-in-out 0.4s;
}

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

.mute-title {
  color: #ff4444;
  font-size: 32px;
  font-weight: bold;
  margin: 0 0 15px 0;
  text-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

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

.mute-message {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 15px;
  background: rgba(255, 0, 0, 0.1);
  border-radius: 10px;
  border-left: 4px solid #ff4444;
}

.mute-duration {
  margin-bottom: 25px;
}

.mute-timer {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.mute-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4444, #ff8888);
  border-radius: 4px;
  transition: width 0.05s linear;
  box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

.mute-duration-text {
  color: #ff8888;
  font-size: 14px;
  font-weight: 500;
}

.mute-close-btn {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
  color: white;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.mute-close-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 68, 68, 0.4);
  background: linear-gradient(135deg, #ff6666 0%, #ff4444 100%);
}

.mute-close-btn:active {
  transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .mute-modal {
    padding: 30px 20px;
    margin: 20px;
  }
  
  .mute-icon {
    font-size: 60px;
  }
  
  .mute-title {
    font-size: 24px;
  }
  
  .mute-message {
    font-size: 14px;
  }
}.product-float-wrapper {
  position: fixed;
  bottom: 180px;
  z-index: 90;
  animation: float-appear 0.5s ease-out;
  transition: right 0.3s ease;
}

.product-float-wrapper.with-sidebar {
  right: 420px;
}

.product-float-wrapper.no-sidebar {
  right: 20px;
}

@keyframes float-appear {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.product-float-card {
  width: 100px;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.9), rgba(30, 30, 45, 0.95));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(254, 44, 85, 0.1);
  animation: float-breathe 3s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

@keyframes float-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(254, 44, 85, 0.1);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(254, 44, 85, 0.2);
  }
}

.product-float-card:hover {
  transform: scale(1.05) translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 40px rgba(254, 44, 85, 0.3);
  border-color: rgba(254, 44, 85, 0.3);
}

.product-float-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% {
    left: -100%;
  }
  50% {
    left: 100%;
  }
}

.product-float-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
}

.product-float-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-float-card:hover .product-float-image img {
  transform: scale(1.1);
}

.product-float-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  animation: badge-pulse 2s ease-in-out infinite;
}

.product-float-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: linear-gradient(135deg, #ff9500, #ff5e00);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.product-float-empty {
  cursor: default;
  animation: none;
}

.product-float-empty:hover {
  transform: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(254, 44, 85, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.product-float-empty-icon {
  font-size: 28px;
  text-align: center;
  padding: 8px 0 4px;
}

.product-float-empty-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding-bottom: 4px;
}

.product-float-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: rgba(255, 255, 255, 0.05);
}

.product-modal-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: rgba(255, 255, 255, 0.05);
}

@keyframes badge-pulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(254, 44, 85, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(254, 44, 85, 0.8);
  }
}

.product-float-info {
  margin-top: 8px;
  text-align: center;
}

.product-float-name {
  font-size: 11px;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.product-float-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.price-current {
  font-size: 14px;
  font-weight: 700;
  color: #fe2c55;
}

.price-original {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
}

.product-float-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
}

.product-float-dots .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.product-float-dots .dot.active {
  width: 12px;
  border-radius: 2px;
  background: #fe2c55;
}

.product-float-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 10;
}

.product-float-card:hover .product-float-close {
  opacity: 1;
}

.product-float-close:hover {
  background: rgba(254, 44, 85, 0.8);
  color: white;
}

/* 恢复按钮 */
.product-float-restore {
  position: fixed;
  bottom: 180px;
  z-index: 90;
  transition: right 0.3s ease;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
}

.product-float-restore.with-sidebar {
  right: 420px;
}

.product-float-restore.no-sidebar {
  right: 20px;
}
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.4);
  transition: all 0.3s ease;
  z-index: 100;
  animation: restore-appear 0.3s ease-out;
}

@keyframes restore-appear {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.product-float-restore:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(254, 44, 85, 0.6);
}

/* ========== 商品详情弹窗 ========== */
.product-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-fade-in 0.3s ease;
  padding: 20px;
}

.product-modal-overlay.closing {
  animation: overlay-fade-out 0.3s ease forwards;
}

@keyframes overlay-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes overlay-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.product-modal {
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  background: linear-gradient(180deg, #0d0d1a 0%, #1a0a2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  animation: modal-scale-in 0.3s ease;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(37, 244, 238, 0.05);
  overflow: hidden;
}

.product-modal.closing {
  animation: modal-scale-out 0.3s ease forwards;
}

@keyframes modal-scale-in {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes modal-scale-out {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.8);
    opacity: 0;
  }
}

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

.product-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.product-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-close:hover {
  background: rgba(254, 44, 85, 0.2);
  border-color: rgba(254, 44, 85, 0.4);
  color: #fe2c55;
}

.product-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.product-modal-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  margin-bottom: 20px;
}

.product-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal-image-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
  animation: badge-glow 2s ease-in-out infinite;
}

@keyframes badge-glow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.4);
  }
  50% {
    box-shadow: 0 4px 25px rgba(254, 44, 85, 0.7);
  }
}

.product-modal-name {
  font-size: 22px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.product-modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.product-tag-item {
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(37, 244, 238, 0.15), rgba(37, 244, 238, 0.05));
  border: 1px solid rgba(37, 244, 238, 0.2);
  border-radius: 20px;
  font-size: 12px;
  color: #25f4ee;
  font-weight: 600;
}

.product-modal-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.product-modal-price {
  font-size: 32px;
  font-weight: 800;
  color: #fe2c55;
  text-shadow: 0 0 20px rgba(254, 44, 85, 0.3);
}

.product-modal-original {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.4);
  text-decoration: line-through;
}

.product-modal-discount {
  padding: 4px 10px;
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.product-modal-sales {
  font-size: 13px;
  color: #f8b500;
  font-weight: 600;
  margin-bottom: 20px;
}

.product-modal-desc {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.product-modal-desc h3 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.product-modal-desc p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.product-modal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: rgba(37, 244, 238, 0.1);
  border-color: rgba(37, 244, 238, 0.3);
  color: #25f4ee;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.nav-dots {
  display: flex;
  gap: 6px;
}

.nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-dot.active {
  background: #fe2c55;
  box-shadow: 0 0 10px rgba(254, 44, 85, 0.5);
  transform: scale(1.2);
}

.nav-dot:hover:not(.active) {
  background: rgba(255, 255, 255, 0.4);
}

.product-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.product-buy-now {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(254, 44, 85, 0.4);
}

.product-buy-now:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(254, 44, 85, 0.6);
}

.product-buy-now:active {
  transform: translateY(0);
}
.quick-panel-button-wrapper {
  position: fixed;
  bottom: 40px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: right 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.quick-panel-button-wrapper.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.quick-panel-button-wrapper.with-sidebar {
  right: 420px;
}

.quick-panel-button-wrapper.no-sidebar {
  right: 20px;
}

.quick-panel-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 40px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.quick-panel-btn:hover {
  transform: translateX(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.quick-panel-btn:active {
  transform: translateX(-4px) scale(0.98);
}

.gift-btn {
  background: linear-gradient(135deg, #fe2c55, #ff6b8a);
}

.gift-btn:hover {
  box-shadow: 0 12px 40px rgba(254, 44, 85, 0.4);
}

.product-btn {
  background: linear-gradient(135deg, #25f4ee, #20c9c5);
}

.product-btn:hover {
  box-shadow: 0 12px 40px rgba(37, 244, 238, 0.4);
}

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

.btn-label {
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.5px;
}
