/* H5版本共享样式 */
/* 设计系统：深色主题 (Dark Theme) */
/* rpx转px: 1rpx = 0.5px */

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

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #ffffff;
  background: #0a0a0f;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 通用容器 */
.container {
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a0a0f;
  padding-bottom: 70px;
  margin: 40px 10px 0 10px !important;
}

/* 通用页头 */
.page-header {
  padding: 56px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0a0a0f;
}

.page-header-title {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  max-width: calc(100% - 120px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* 通用返回按钮 */
.back-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  line-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 18px;
  color: #ffffff;
  cursor: pointer;
  border: none;
  text-decoration: none;
  box-sizing: border-box;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.back-btn:active {
  background: rgba(255, 255, 255, 0.15);
}

/* 通用底部导航栏 */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #1a1a2e;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 200;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 24px;
  color: #666;
  font-size: 11px;
  cursor: pointer;
}

.tab-item:hover {
  color: #888;
}

.tab-item.active {
  color: #ff6b6b;
}

.tab-item.active .tab-icon {
  opacity: 1;
}

.tab-icon {
  font-size: 22px;
  margin-bottom: 2px;
  opacity: 0.6;
}

.tab-label {
  font-size: 11px;
}

/* 通用卡片样式 */
.card {
  background: #1a1a2e;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

/* 通用渐变按钮 */
.btn-gradient {
  background: linear-gradient(135deg, #ff6b6b, #ff8e53);
  color: #ffffff;
  border: none;
  border-radius: 26px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

.btn-gradient:active {
  transform: scale(0.98);
}

/* 通用输入框 */
input[type="text"],
input[type="number"],
input[type="tel"] {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 0 12px;
  font-size: 15px;
  color: #ffffff;
  outline: none;
}

input::placeholder {
  color: #666;
}

input:focus {
  border-color: #ff6b6b;
}

/* 通用复选框 */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff6b6b;
}

/* 通用链接 */
.link {
  color: #ff6b6b;
  text-decoration: none;
  cursor: pointer;
}

.link:hover {
  text-decoration: underline;
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-tab-bar {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

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

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

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

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