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

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  background-color: #f5f5f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 移动端适配 */
@media screen and (max-width: 750px) {
  html {
    font-size: 13.33vw; /* 1rem = 100px */
  }
}

/* 清除默认样式 */
ul, ol, li {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  outline: none;
  cursor: pointer;
  background: transparent;
}

input {
  border: none;
  outline: none;
}

/* 通用页面容器 */
.page-view {
  min-height: 100vh;
  background-color: #f5f5f5;
}

/* 导航栏 */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.navbar-title {
  font-size: 17px;
  font-weight: 500;
  color: #333;
}

.navbar-back {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #333;
  cursor: pointer;
}

/* 主内容区域 */
.main-content {
  padding-top: 44px;
}

/* 加载中提示 */
.loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 9999;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(253, 57, 31, 0.3);
  border-top-color: #fd391f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 15px;
  opacity: 0.3;
}

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

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 15px;
  transition: all 0.3s;
}

.btn-primary {
  background: #fd391f;
  color: #fff;
}

.btn-primary:active {
  opacity: 0.8;
}

/* 卡片样式 */
.card {
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 工具类 */
.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-center {
  text-align: center;
}

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

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* rpx 转换 (1rpx = 0.5px 在 375px 设计稿下) */
/* 使用 rem 单位实现响应式 */
