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

html, body {
  width: 100%;
  background-color: #fafafa;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 20px 20px;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
}

@media (min-width: 1200px) {
  .app, .page-footer, .bottom-action-bar {
    max-width: 60%;
  }
}

@media (max-width: 768px) {
  .app, .page-footer, .bottom-action-bar {
    max-width: 100% !important;
  }
  .app {
    box-shadow: none;
  }
  main {
    padding: 16px;
    width: 100%;
  }
  .custom-alert-content {
    width: 90%;
    padding: 20px;
  }
  img {
    max-width: 100%;
    height: auto;
  }
}

.main {
  padding: 16px;
}

.bg-banner {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-radius: 12px;
  position: relative;
  background: #f5f5f7;
}

.bg-banner-video {
  width: 101%;
  height: 101%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  transform: scale(1.01);
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.profile {
  display: flex;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 3;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}

.avatar-wrapper::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(#ff6b6b, #ffd93d, #6bcbff, #ff6b6b) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.avatar-wrapper.playing::before {
  opacity: 1;
  animation: spin 2s linear infinite;
}

.avatar-wrapper.playing .avatar {
  animation: avatarSpin 8s linear infinite;
}

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

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

.music-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #6bcbff, #4a90d9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.avatar-wrapper.playing .music-indicator {
  animation: musicPulse 1.2s ease-in-out infinite;
}

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

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: -4px 6px 12px rgba(0, 0, 0, 0.5);
}

.profile-center {
  flex: 1;
  padding: 0 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.nickname {
  font-size: 24px;
  font-weight: 600;
  font-family: 'Arial', 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ff6348 0%, #ff4757 50%, #ff6348 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.3;
}

@keyframes nameShine {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.like-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  margin-left: auto;
}

.like-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  padding: 6px;
  line-height: 1;
  transition: all 0.2s ease;
  position: relative;
  z-index: 2;
  border-radius: 50%;
}

.like-icon {
  width: 24px;
  height: 24px;
  fill: #333;
  transition: all 0.3s ease;
}

.like-btn:hover .like-icon {
  fill: #ff3333;
}

.like-count {
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.plus-one {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  color: #ff3333;
  font-size: 18px;
  font-weight: bold;
  pointer-events: none;
  animation: plusOneFloat 1s ease-out forwards;
  z-index: 100;
}

@keyframes plusOneFloat {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-30px); }
}

.bubble {
  position: absolute;
  pointer-events: none;
  z-index: 99;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9), rgba(107, 203, 255, 0.3) 50%, rgba(74, 144, 217, 0.3) 80%);
  border: 1px solid rgba(107, 203, 255, 0.5);
  animation: bubbleFloat 2.5s ease-out forwards;
}

.bubble::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 15%;
  width: 30%;
  height: 20%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.9), transparent);
  border-radius: 50%;
}

.bubble::after {
  content: '';
  position: absolute;
  bottom: 15%;
  right: 12%;
  width: 10%;
  height: 10%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.5), transparent);
  border-radius: 50%;
}

@keyframes bubbleFloat {
  0% {
    opacity: 0.7;
    transform: translateY(0) translateX(0) scale(0.5);
  }
  20% {
    opacity: 1;
    transform: translateY(-15px) translateX(5px) scale(1);
  }
  80% {
    opacity: 0.8;
    transform: translateY(-200px) translateX(-8px) scale(0.9);
  }
  100% {
    opacity: 0;
    transform: translateY(-250px) translateX(5px) scale(0.4);
  }
}

.star {
  position: absolute;
  top: 50%;
  left: 50%;
  pointer-events: none;
  z-index: 99;
  animation: starFloat 1.8s ease-out forwards;
}

@keyframes starFloat {
  0% { opacity: 1; transform: translateY(0) translateX(0) rotate(0deg) scale(1); }
  25% { opacity: 1; transform: translateY(-30px) translateX(20px) rotate(90deg) scale(1.2); }
  50% { opacity: 0.8; transform: translateY(-60px) translateX(-10px) rotate(180deg) scale(1); }
  75% { opacity: 0.5; transform: translateY(-90px) translateX(15px) rotate(270deg) scale(0.8); }
  100% { opacity: 0; transform: translateY(-120px) translateX(-5px) rotate(360deg) scale(0.3); }
}

.battery-low {
  animation: batteryBlink 1s ease-in-out infinite;
}

@keyframes batteryBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.id-badges {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.user-id {
  font-size: 14px;
  color: #393939;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.5;
}

.mobile-break {
  display: none;
}

@media (max-width: 768px) {
  .mobile-break {
    display: inline;
  }
  .user-id {
    font-size: 13px;
  }
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-main {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 50%, #ff4757 100%);
  background-size: 200% auto;
  color: white;
  font-weight: 600;
  font-size: 12px;
  box-shadow: 0 2px 12px rgba(255, 71, 87, 0.5);
  position: relative;
  overflow: hidden;
  animation: badgeGlow 2s ease-in-out infinite alternate;
}

@keyframes badgeGlow {
  0% { box-shadow: 0 2px 12px rgba(255, 71, 87, 0.5); }
  100% { box-shadow: 0 2px 20px rgba(255, 71, 87, 0.8); }
}

.badge-main::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: badgeShine 2.5s ease-in-out infinite;
}

@keyframes badgeShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.badge-section {
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 8px 10px;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.vip-pill {
  padding: 4px 14px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ff6348 0%, #ff4757 50%, #ff6348 100%);
  background-size: 200% auto;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(255, 71, 87, 0.5);
  position: relative;
  overflow: hidden;
  animation: vipPillGlow 2s ease-in-out infinite alternate;
}

@keyframes vipPillGlow {
  0% { box-shadow: 0 2px 12px rgba(255, 71, 87, 0.5); }
  100% { box-shadow: 0 2px 20px rgba(255, 71, 87, 0.8); }
}

.vip-pill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: vipPillShine 2s ease-in-out infinite;
}

@keyframes vipPillShine {
  0% { left: -100%; }
  100% { left: 200%; }
}

.icon-pill {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.privilege-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  flex-wrap: wrap;
}

.privilege-icons-image {
  height: 32px;
  width: auto;
  object-fit: contain;
  max-width: 100%;
}

.list-row {
  padding: 10px 0;
  border-top: 1px solid #f5f5f5;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
}

.list-row-left {
  color: #333;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

.list-row-left svg {
  color: #ff4757;
  flex-shrink: 0;
  display: block;
}

.list-row-icon-left {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-row-right {
  color: #888;
  display: flex;
  align-items: center;
  gap: 4px;
}

.list-row-right span:first-child {
  color: #ff4757;
  font-weight: 400;
}

.list-row-arrow {
  font-size: 15px;
  color: #ff4757;
  font-weight: 300;
  margin-left: 4px;
}

.dot-red {
  color: #ff4d4f;
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

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

.list-row.qq-header {
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.05), rgba(255, 152, 38, 0.05));
  border-radius: 8px;
  padding: 12px 0;
  border-top: none;
  border-bottom: none;
}

.list-row.qq-header .list-row-right span:first-child {
  color: #ff7a45;
  font-weight: 600;
}

.space-gallery {
  padding: 10px 0;
  margin: 0;
}

.space-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding-left: 0;
}

.space-item {
  width: 90px;
  height: 90px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.2);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.space-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 71, 87, 0.4);
  border-color: #ff4757;
}

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

.page-footer {
  position: relative;
  width: 100%;
  margin: 0 auto;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  margin-top: 20px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  gap: 12px;
}

.footer-info {
  flex: 1;
}

.footer-text {
  font-size: 12px;
  color: #999;
}

.footer-links {
  display: flex;
  align-items: center;
}

.footer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #666;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
}

.footer-link:hover {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b81 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.custom-alert.show {
  display: flex;
}

.custom-alert-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 90%;
  width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: alertSlideIn 0.3s ease-out;
}

.custom-alert-message {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

.custom-alert-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(135deg, #FF7A45 0%, #FF4D4F 100%);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(255, 77, 79, 0.25);
}

@keyframes alertSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.bottom-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 100;
  max-width: 430px;
  margin: 0 auto;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 120px;
}

.action-btn svg {
  flex-shrink: 0;
}

.action-btn-outline {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
}

.action-btn-outline:hover {
  background: #ebebeb;
  color: #333;
}

.action-btn-primary {
  background: linear-gradient(135deg, #4a90d9 0%, #357abd 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(74, 144, 217, 0.3);
  text-decoration: none;
}

.action-btn-primary:hover {
  background: linear-gradient(135deg, #357abd 0%, #2a6aad 100%);
  box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
}

.page-footer {
  padding-bottom: 80px;
}
