:root {
  --brand: #16a34a;
  --brand-ink: #065f46;
  --bg: #0f172a;
  --card: #111827;
  --muted: #94a3b8;
  --danger: #ef4444;
  --price: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #3b82f6;
}

/* iPhone 15 外观模拟 */
.iphone-frame {
  width: 390px;
  height: 844px;
  background: #000;
  border-radius: 50px;
  padding: 8px;
  position: relative;
  box-shadow: 0 0 30px rgba(0,0,0,0.3);
}

.iphone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 42px;
  overflow: hidden;
  position: relative;
}

/* Dynamic Island */
.dynamic-island {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 37px;
  background: #000;
  border-radius: 20px;
  z-index: 10;
}

/* 底部 Home 指示条 */
.home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 134px;
  height: 5px;
  background: #fff;
  border-radius: 3px;
  z-index: 10;
}

/* 安全区域 */
.safe-area {
  padding-top: 60px;
  padding-bottom: 40px;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--card);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 8px 0 20px 0;
  z-index: 50;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.bottom-nav-item.active {
  color: var(--brand);
}

.bottom-nav-item i {
  font-size: 20px;
  margin-bottom: 4px;
}

.bottom-nav-item span {
  font-size: 12px;
}

/* 卡片样式 */
.card {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.card-header {
  padding: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.card-body {
  padding: 16px;
}

.card-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  background: var(--brand-ink);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
}

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

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 18px;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.badge-primary {
  background: var(--brand);
  color: white;
}

.badge-danger {
  background: var(--danger);
  color: white;
}

.badge-warning {
  background: var(--warning);
  color: white;
}

.badge-success {
  background: var(--success);
  color: white;
}

/* 价格样式 */
.price {
  color: var(--price);
  font-weight: 700;
}

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

/* 商品卡片 */
.product-card {
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  transition: transform 0.2s;
}

.product-card:hover {
  transform: translateY(-2px);
}

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

.product-info {
  padding: 12px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

/* 团长卡片 */
.leader-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.leader-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.leader-info {
  flex: 1;
}

.leader-name {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.leader-stats {
  font-size: 12px;
  color: var(--muted);
}

/* 搜索栏 */
.search-bar {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 24px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
  outline: none;
}

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

/* 标签页 */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tab {
  flex: 1;
  padding: 16px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

/* 弹层 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: flex-end;
}

.modal-content {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

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

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

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

/* 响应式 */
@media (max-width: 390px) {
  .iphone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    padding: 0;
  }
  
  .iphone-screen {
    border-radius: 0;
  }
  
  .dynamic-island {
    display: none;
  }
  
  .home-indicator {
    display: none;
  }
}
