/* 你好星座 - 移动端样式 */

:root {
  --bg-primary: #0D0B1E;
  --bg-secondary: #1A1530;
  --bg-card: #221D3D;
  --bg-elevated: #2A2454;
  --text-primary: #F5F3FF;
  --text-secondary: #B8B0D9;
  --text-muted: #7C7599;
  --accent-gold: #FFD700;
  --accent-purple: #9D5CFF;
  --accent-pink: #FF6B9D;
  --accent-blue: #5B9DFF;
  --fire: #FF6B35;
  --earth: #8B9D4F;
  --air: #7CC8E8;
  --water: #4A90D9;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 20px rgba(157,92,255,0.15);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-height: 60px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

.app-container {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
}

/* Pages */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

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

/* Header */
.app-header {
  padding: 16px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-header .logo {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.app-header .date {
  font-size: 12px;
  color: var(--text-muted);
}

/* Card */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin: 8px 16px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.card-glow::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(157,92,255,0.1), transparent 70%);
  pointer-events: none;
}

/* Today Fortune Card */
.fortune-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border-radius: var(--radius);
  margin: 8px 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}
.fortune-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(255,215,0,0.08), transparent 70%);
  pointer-events: none;
}
.fortune-card .sign-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.06);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
}
.fortune-card .sign-symbol {
  font-size: 20px;
}
.fortune-card .overall-score {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 12px 0 4px;
}
.fortune-card .score-num {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-gold);
}
.fortune-card .score-label {
  font-size: 12px;
  color: var(--text-muted);
}
.fortune-card .stars {
  font-size: 14px;
  letter-spacing: 2px;
}
.fortune-card .fortune-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 8px 0;
}

/* Radar Chart */
.radar-container {
  display: flex;
  justify-content: center;
  margin: 12px 0;
}
.radar-container svg {
  width: 200px;
  height: 200px;
}

/* Score bars */
.score-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin: 12px 0;
}
.score-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.score-bar .label {
  font-size: 12px;
  color: var(--text-muted);
  width: 32px;
  flex-shrink: 0;
}
.score-bar .bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.score-bar .bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}
.score-bar .score-val {
  font-size: 12px;
  font-weight: 600;
  width: 28px;
  text-align: right;
}

/* Lucky items */
.lucky-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 4px;
  flex-wrap: wrap;
}
.lucky-chip {
  background: rgba(255,255,255,0.06);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lucky-chip .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* Quick entries */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 16px;
}
.quick-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}
.quick-item:active { transform: scale(0.95); }
.quick-item .icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}
.quick-item .text {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 8px;
}
.section-title h3 {
  font-size: 16px;
  font-weight: 600;
}
.section-title .more {
  font-size: 12px;
  color: var(--text-muted);
}

/* Sign Grid */
.sign-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 8px 16px;
}
.sign-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.sign-card:active { transform: scale(0.95); }
.sign-card .symbol {
  font-size: 32px;
  margin-bottom: 4px;
  display: block;
}
.sign-card .name {
  font-size: 13px;
  font-weight: 500;
}
.sign-card .date {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}
.sign-card .element-tag {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 12px;
  opacity: 0.6;
}

/* Compatibility */
.comp-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 16px;
}
.comp-sign-pick {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}
.comp-sign-pick.selected {
  border-color: var(--accent-purple);
  box-shadow: 0 0 16px rgba(157,92,255,0.3);
}
.comp-sign-pick .symbol {
  font-size: 28px;
}
.comp-sign-pick .name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.comp-heart {
  font-size: 28px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.comp-result {
  margin: 0 16px;
  text-align: center;
  display: none;
}
.comp-result.show { display: block; animation: fadeIn 0.4s; }
.comp-score-ring {
  width: 140px; height: 140px;
  margin: 12px auto;
  position: relative;
}
.comp-score-ring svg {
  transform: rotate(-90deg);
}
.comp-score-ring .center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.comp-score-ring .score {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-pink);
}
.comp-score-ring .rating {
  font-size: 12px;
  color: var(--text-secondary);
}

.comp-scores {
  display: flex;
  justify-content: space-around;
  margin: 12px 0;
}
.comp-score-item {
  text-align: center;
}
.comp-score-item .val {
  font-size: 20px;
  font-weight: 700;
}
.comp-score-item .lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Sign Detail */
.sign-detail {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: var(--bg-primary);
  z-index: 100;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.sign-detail.show { display: block; animation: slideUp 0.3s; }
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.detail-header {
  padding: 60px 20px 20px;
  text-align: center;
  position: relative;
}
.detail-header .bg-symbol {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 120px;
  opacity: 0.05;
  pointer-events: none;
}
.detail-header .symbol {
  font-size: 56px;
  display: block;
}
.detail-header .name {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0;
}
.detail-header .date-range {
  font-size: 13px;
  color: var(--text-muted);
}
.detail-header .close-btn {
  position: absolute;
  top: 16px; left: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
}

.detail-tabs {
  display: flex;
  margin: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.detail-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.detail-tab.active {
  color: var(--accent-purple);
  border-bottom-color: var(--accent-purple);
}

.detail-content {
  padding: 12px 0;
}
.detail-panel { display: none; }
.detail-panel.active { display: block; }

.info-row {
  display: flex;
  padding: 8px 20px;
  gap: 12px;
}
.info-row .label {
  width: 70px;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.info-row .value {
  font-size: 13px;
  flex: 1;
}

.trait-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 20px;
}
.trait-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  background: rgba(157,92,255,0.15);
  color: var(--accent-purple);
}
.trait-tag.weak {
  background: rgba(255,107,157,0.15);
  color: var(--accent-pink);
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 30px 20px 20px;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
}
.profile-name {
  font-size: 18px;
  font-weight: 600;
}
.profile-sign {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.profile-menu {
  margin: 8px 16px;
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
}
.menu-item:active { background: var(--bg-elevated); }
.menu-item .icon {
  font-size: 20px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}
.menu-item .text {
  flex: 1;
  font-size: 14px;
}
.menu-item .arrow {
  font-size: 12px;
  color: var(--text-muted);
}

/* Article list */
.article-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 0 16px 8px;
  cursor: pointer;
}
.article-card .cover {
  width: 56px; height: 56px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.article-card .info {
  flex: 1;
  min-width: 0;
}
.article-card .title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.article-card .meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  gap: 12px;
}

/* Rankings */
.ranking-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin: 0 16px 8px;
  padding: 14px 16px;
}
.ranking-card .title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ranking-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ranking-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 12px;
  background: rgba(255,255,255,0.04);
}
.ranking-item .rank-num {
  font-weight: 700;
  color: var(--accent-gold);
  font-size: 11px;
}

/* Tarot */
.tarot-spreads {
  padding: 8px 16px;
}
.tarot-spread-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.tarot-spread-card .icon {
  font-size: 36px;
}
.tarot-spread-card .info {
  flex: 1;
}
.tarot-spread-card .name {
  font-size: 15px;
  font-weight: 600;
}
.tarot-spread-card .desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tarot-result {
  display: none;
  padding: 16px;
}
.tarot-result.show { display: block; animation: fadeIn 0.5s; }
.tarot-card-display {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}
.tarot-card-display .card-symbol {
  font-size: 56px;
  margin-bottom: 8px;
  display: block;
}
.tarot-card-display .card-name {
  font-size: 16px;
  font-weight: 600;
}
.tarot-card-display .card-name-en {
  font-size: 12px;
  color: var(--text-muted);
}
.tarot-card-display .card-meaning {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 8px;
  line-height: 1.5;
}
.tarot-card-display .reversed-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 11px;
  background: rgba(255,107,157,0.2);
  color: var(--accent-pink);
  margin-top: 4px;
}
.tarot-card-display .position {
  font-size: 12px;
  color: var(--accent-gold);
  margin-top: 4px;
}

/* Bottom Tab Bar */
.tab-bar {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--tab-height) + var(--safe-bottom));
  background: rgba(13,11,30,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  z-index: 50;
  padding-bottom: var(--safe-bottom);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
.tab-item .tab-icon {
  font-size: 22px;
  transition: transform 0.2s;
}
.tab-item .tab-label {
  font-size: 10px;
  color: var(--text-muted);
}
.tab-item.active .tab-icon { transform: translateY(-2px); }
.tab-item.active .tab-label { color: var(--accent-purple); }

/* Sign picker modal */
.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s; }
.modal-sheet {
  background: var(--bg-secondary);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  animation: slideUp 0.3s;
  max-height: 70%;
  overflow-y: auto;
}
.modal-sheet .modal-title {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
}
.modal-sheet .sign-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* Toast */
.toast {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(34,29,61,0.95);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 0; }

/* Banner */
.banner-scroll {
  display: flex;
  gap: 10px;
  padding: 8px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.banner-scroll::-webkit-scrollbar { display: none; }
.banner-item {
  min-width: calc(100% - 32px);
  height: 100px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.banner-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(157,92,255,0.3), rgba(255,107,157,0.2));
}
.banner-item .banner-text {
  position: relative;
  z-index: 1;
  text-align: center;
}

/* Author Message */
.author-msg-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-card); border-radius: var(--radius);
  margin: 8px 16px; padding: 14px 16px;
  border-left: 3px solid var(--accent-purple);
  position: relative; overflow: hidden;
}
.author-msg-card::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 100px; height: 100px;
  background: radial-gradient(circle, rgba(157,92,255,0.08), transparent 70%);
  pointer-events: none;
}
.author-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.author-content { flex: 1; min-width: 0; }
.author-name { font-size: 13px; font-weight: 600; color: var(--accent-purple); margin-bottom: 2px; }
.author-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* Notification Banner */
.notif-banner {
  display: flex; align-items: center; gap: 8px;
  background: rgba(157,92,255,0.12); border: 1px solid rgba(157,92,255,0.25);
  border-radius: var(--radius-sm); margin: 8px 16px; padding: 10px 14px; font-size: 12px;
}
.notif-banner .notif-icon { font-size: 16px; flex-shrink: 0; }
.notif-banner .notif-title { font-weight: 600; color: var(--accent-purple); flex-shrink: 0; }
.notif-banner .notif-content { color: var(--text-secondary); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-banner .notif-close { color: var(--text-muted); cursor: pointer; flex-shrink: 0; padding: 0 4px; }

/* Image-based UI elements */
.logo-icon {
  width: 24px; height: 24px;
  vertical-align: middle;
  margin-right: 4px;
}
.sign-badge-icon {
  width: 28px; height: 28px;
  vertical-align: middle;
}
.quick-icon {
  width: 40px; height: 40px;
  display: block;
  margin: 0 auto 4px;
}
.tab-icon-img {
  width: 24px; height: 24px;
  transition: transform 0.2s;
}
.menu-icon {
  width: 22px; height: 22px;
  margin-right: 12px;
}
.avatar-img {
  width: 48px; height: 48px;
  border-radius: 50%;
}
.comp-pick-img {
  width: 40px; height: 40px;
}
.sign-card-icon {
  width: 48px; height: 48px;
  margin: 0 auto 4px;
  display: block;
}
.detail-symbol-img {
  width: 80px; height: 80px;
  display: block;
  margin: 0 auto;
}
.detail-bg-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 200px;
  object-fit: cover;
  opacity: 0.3;
  pointer-events: none;
  border-radius: 0 0 24px 24px;
}
.tarot-card-img {
  width: 120px; height: 200px;
  border-radius: 8px;
  border: 2px solid rgba(255,215,0,0.3);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  margin: 0 auto 8px;
  display: block;
}
.tarot-card-img.reversed {
  transform: rotate(180deg);
}
.banner-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}
.ranking-sign-img {
  width: 20px; height: 20px;
  vertical-align: middle;
}
.rank-badge {
  width: 18px; height: 18px;
  vertical-align: middle;
}
.fortune-icon-small {
  width: 16px; height: 16px;
  vertical-align: middle;
  margin-right: 2px;
}
.element-icon {
  width: 16px; height: 16px;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  border: none; color: #fff;
  padding: 10px 32px;
  border-radius: 24px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.btn-secondary {
  background: var(--bg-elevated);
  border: none; color: var(--text-primary);
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
}

/* Compatibility matrix */
.comp-matrix {
  padding: 8px 16px;
  overflow-x: auto;
}
.comp-matrix table {
  border-collapse: collapse;
  font-size: 11px;
  width: 100%;
}
.comp-matrix th, .comp-matrix td {
  padding: 6px 4px;
  text-align: center;
  min-width: 32px;
}
.comp-matrix th {
  color: var(--text-muted);
  font-weight: 500;
}
.comp-matrix td {
  border-radius: 6px;
}
.comp-matrix .score-cell {
  font-weight: 600;
}
.comp-matrix .score-100 { background: rgba(46,204,113,0.2); color: #2ecc71; }
.comp-matrix .score-90 { background: rgba(52,152,219,0.2); color: #3498db; }
.comp-matrix .score-70 { background: rgba(241,196,15,0.2); color: #f1c40f; }
.comp-matrix .score-60 { background: rgba(230,126,34,0.15); color: #e67e22; }
.comp-matrix .score-50 { background: rgba(231,76,60,0.12); color: #e74c3c; }
.comp-matrix .score-40 { background: rgba(231,76,60,0.2); color: #e74c3c; }

/* 八卦轮播图 */
.gossip-carousel { position: relative; margin: 8px 16px; border-radius: 12px; overflow: hidden; height: 120px; }
.carousel-track { display: flex; height: 100%; transition: transform 0.5s ease; }
.carousel-slide { min-width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; position: relative; }
.carousel-slide .slide-text { font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.3); z-index: 1; }
.carousel-dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.3); transition: all 0.3s; }
.carousel-dot.active { width: 18px; border-radius: 3px; background: #fff; }

/* Auth tabs */
.auth-tabs { display: flex; margin-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.auth-tab { flex: 1; text-align: center; padding: 10px; font-size: 14px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; transition: all 0.2s; }
.auth-tab.active { color: var(--accent-purple); border-bottom-color: var(--accent-purple); }

/* 听事入口（八卦页内） */
.tingshi-section { margin: 8px 16px; background: var(--bg-card); border-radius: 12px; padding: 12px; }
.tingshi-header { display: flex; align-items: center; gap: 10px; cursor: pointer; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.tingshi-icon { font-size: 28px; }
.tingshi-info { flex: 1; }
.tingshi-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.tingshi-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.tingshi-arrow { font-size: 18px; color: var(--text-muted); }
.tingshi-playlist { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.tingshi-playlist::-webkit-scrollbar { display: none; }
.ts-mini-item { min-width: 120px; background: var(--bg-elevated); border-radius: 8px; padding: 8px 10px; cursor: pointer; flex-shrink: 0; }
.ts-mini-item .ts-mini-icon { font-size: 16px; }
.ts-mini-item .ts-mini-title { font-size: 11px; color: var(--text-secondary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 听事页面 */
.tingshi-banner { margin: 8px 16px; background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated)); border-radius: 12px; padding: 20px; display: flex; align-items: center; gap: 14px; }
.ts-banner-icon { font-size: 40px; filter: drop-shadow(0 0 8px rgba(157,92,255,0.3)); }
.ts-banner-title { font-size: 16px; font-weight: 600; }
.ts-banner-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* 听事条目 */
.ts-item { margin: 8px 16px; background: var(--bg-card); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.ts-item:active { background: var(--bg-elevated); }
.ts-item .ts-cover { width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.ts-item .ts-body { flex: 1; min-width: 0; }
.ts-item .ts-name { font-size: 14px; font-weight: 500; }
.ts-item .ts-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 10px; }
.ts-item .ts-play-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-purple); display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex-shrink: 0; }
.ts-item .ts-play-btn.playing { background: var(--accent-pink); }

/* 5个Tab适配 */
.tab-bar .tab-item .tab-icon-img { width: 20px; height: 20px; }
.tab-bar .tab-item .tab-label { font-size: 9px; }

/* Category tabs (for life feed) */
.category-tabs { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab { padding: 4px 14px; border-radius: 16px; font-size: 12px; white-space: nowrap; cursor: pointer; background: var(--bg-card); color: var(--text-muted); transition: all 0.2s; }
.cat-tab.active { background: var(--accent-purple); color: #fff; }

/* Waterfall / Masonry layout */
.waterfall { column-count: 2; column-gap: 8px; padding: 8px 16px; }
.waterfall-item { break-inside: avoid; margin-bottom: 10px; background: var(--bg-card); border-radius: 12px; overflow: hidden; cursor: pointer; transition: transform 0.15s; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.waterfall-item:active { transform: scale(0.97); }
.wf-cover { position: relative; overflow: hidden; }
.waterfall-item .wf-img { width: 100%; height: auto; display: block; }
.waterfall-item .wf-no-img { display: flex; align-items: center; justify-content: center; font-size: 42px; background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card)); }
.wf-sign-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; border-radius: 8px; color: #fff; font-weight: 500; opacity: 0.9; backdrop-filter: blur(4px); }
.waterfall-item .wf-body { padding: 10px 12px; }
.waterfall-item .wf-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.waterfall-item .wf-content { font-size: 11px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.waterfall-item .wf-footer { display: flex; align-items: center; justify-content: space-between; }
.waterfall-item .wf-user { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-muted); overflow: hidden; }
.waterfall-item .wf-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.waterfall-item .wf-likes { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }

/* Drift Bottle page */
.bottle-ocean { padding: 0 0 16px; }
.bottle-stats { display: flex; justify-content: center; gap: 40px; padding: 16px 0; }
.bottle-stat-item { text-align: center; }
.bottle-stat-item .stat-num { display: block; font-size: 28px; font-weight: 800; color: var(--accent-blue); }
.bottle-stat-item .stat-label { font-size: 11px; color: var(--text-muted); }
.bottle-scene { position: relative; height: 240px; margin: 0 16px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #0D0B1E 0%, #1A1530 40%, #0a1628 100%); }
.ocean-waves { position: absolute; bottom: 0; width: 100%; height: 80px; background: radial-gradient(ellipse at center bottom, rgba(74,144,217,0.2), transparent 70%); }
.bottle-float { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; cursor: pointer; animation: bottleBob 3s ease-in-out infinite; }
@keyframes bottleBob { 0%,100% { transform: translate(-50%, -50%) rotate(-5deg); } 50% { transform: translate(-50%, -55%) rotate(5deg); } }
.bottle-icon-large { font-size: 64px; filter: drop-shadow(0 0 12px rgba(255,215,0,0.3)); }
.bottle-hint { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* Bottle result card */
.bottle-card { background: var(--bg-card); border-radius: var(--radius); padding: 20px; margin-top: 12px; position: relative; overflow: hidden; }
.bottle-card::before { content: ''; position: absolute; top: -40px; right: -20px; width: 120px; height: 120px; background: radial-gradient(circle, rgba(91,157,255,0.08), transparent 70%); pointer-events: none; }
.bottle-card .bc-mood { font-size: 36px; text-align: center; margin-bottom: 8px; }
.bottle-card .bc-content { font-size: 14px; color: var(--text-primary); line-height: 1.7; text-align: center; margin: 12px 0; }
.bottle-card .bc-sender { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.bottle-card .bc-rating-area { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 12px; }
.bottle-card .bc-rating-label { font-size: 12px; color: var(--text-muted); text-align: center; margin-bottom: 8px; }
.bottle-card .bc-stars { display: flex; justify-content: center; gap: 4px; }
.bottle-card .bc-star { font-size: 24px; cursor: pointer; opacity: 0.3; transition: opacity 0.2s; }
.bottle-card .bc-star:hover, .bottle-card .bc-star.active { opacity: 1; }

/* My bottles list */
.my-bottle-item { background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 8px; }
.my-bottle-item .mb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.my-bottle-item .mb-mood { font-size: 20px; }
.my-bottle-item .mb-status { font-size: 11px; padding: 2px 8px; border-radius: 8px; }
.my-bottle-item .mb-status.drifting { background: rgba(91,157,255,0.15); color: var(--accent-blue); }
.my-bottle-item .mb-status.picked { background: rgba(255,215,0,0.15); color: var(--accent-gold); }
.my-bottle-item .mb-content { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.my-bottle-item .mb-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 10px; color: var(--text-muted); }

/* 帖子详情弹层 (小红书式) */
.post-detail-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85); z-index: 300;
  display: none; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s;
}
.post-detail-overlay.show { display: flex; }
.post-detail-card {
  background: var(--bg-primary); border-radius: 16px 16px 0 0;
  width: 100%; max-width: 480px; height: 90vh;
  display: flex; flex-direction: column; position: relative;
  animation: slideUp 0.3s ease;
}
.pd-close {
  position: absolute; top: 12px; right: 16px; z-index: 10;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,0.4); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
}
.pd-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 20px; }
.pd-image-area { width: 100%; }
.pd-cover-img { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.pd-cover-empty { display: none; }
.pd-author-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 20px 8px;
}
.pd-author-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.pd-author-name { font-size: 14px; font-weight: 600; }
.pd-author-sign { font-size: 11px; color: var(--text-muted); }
.pd-title { font-size: 18px; font-weight: 700; padding: 4px 20px 8px; line-height: 1.4; }
.pd-content { font-size: 15px; color: var(--text-secondary); padding: 0 20px 12px; line-height: 1.8; white-space: pre-wrap; }
.pd-meta { font-size: 12px; color: var(--text-muted); padding: 0 20px 20px; }
.pd-bottom-bar {
  display: flex; gap: 0; padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-primary);
}
.pd-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; transition: color 0.2s;
}
.pd-action:active { color: var(--accent-pink); }

/* Waterfall card improvements */
.wf-content { font-size: 11px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Tab bar 6 items */
.tab-bar .tab-item .tab-icon-img { width: 20px; height: 20px; }
.tab-bar .tab-item .tab-label { font-size: 9px; }
