/* ==================== 首页样式 ==================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #FFF5EE;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ==================== 顶部背景 ==================== */
.header-bg {
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-img {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  object-fit: cover;
}

.header-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(80, 0, 0, 0.55) 0%, rgba(120, 0, 0, 0.6) 50%, rgba(139, 0, 0, 0.72) 100%);
}

.header-deco-left,
.header-deco-right {
  position: absolute;
  top: 20px;
  font-size: 32px;
  color: rgba(255, 215, 0, 0.3);
  z-index: 1;
}

.header-deco-left { left: 28px; }
.header-deco-right { right: 28px; }

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.title-icon {
  font-size: 42px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.title-main {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700;
  letter-spacing: 4px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.title-divider {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.5), transparent);
  margin: 8px 0 6px;
}

.title-sub {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 2px;
}

/* ==================== 输入区域 ==================== */
.input-section {
  padding: 0 24px;
  margin-top: -30px;
  position: relative;
  z-index: 3;
}

.input-card {
  background: #FFFAF0;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(139, 0, 0, 0.1);
  border: 1px solid rgba(139, 0, 0, 0.06);
}

.input-label {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  margin-bottom: 16px;
}

.label-icon {
  margin-right: 8px;
  font-size: 20px;
}

.free-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #FF6B6B, #FF4444);
  padding: 3px 12px;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(255, 68, 68, 0.25);
}

.free-badge-text {
  font-size: 12px;
  color: #FFF;
  font-weight: normal;
}

.input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #E8E0D0;
  padding-bottom: 10px;
}

.phone-input {
  flex: 1;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  letter-spacing: 3px;
  height: 44px;
  text-align: center;
  border: none;
  outline: none;
  background: transparent;
}

.phone-input::placeholder {
  color: #C0B8A8;
  font-size: 16px;
  letter-spacing: 1px;
  font-weight: normal;
}

.input-clear {
  width: 28px;
  height: 28px;
  background: #E8E0D0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  flex-shrink: 0;
}

.input-count {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-top: 6px;
}

.count-ok { color: #228B22; font-weight: bold; }
.count-warn { color: #CD5C5C; }

/* ==================== 查询按钮 ==================== */
.calc-btn {
  width: 100%;
  margin-top: 20px;
  height: 56px;
  border-radius: 28px;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 4px;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  outline: none;
}

.calc-btn-active {
  background: linear-gradient(135deg, #8B0000, #B22222);
  color: #FFD700;
  box-shadow: 0 4px 14px rgba(139, 0, 0, 0.3);
}

.calc-btn-disabled {
  background: #D3C8B8;
  color: #FFF;
  box-shadow: none;
}

/* ==================== 快捷入口 ==================== */
.quick-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  padding: 0 24px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 32px;
  cursor: pointer;
}

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFAF0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 2px 8px rgba(139, 0, 0, 0.07);
  border: 1px solid rgba(139, 0, 0, 0.05);
}

.quick-label {
  font-size: 14px;
  color: #888;
  margin-top: 8px;
}

/* ==================== 算法说明 ==================== */
.method-section {
  padding: 24px 24px 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.title-line {
  width: 36px;
  height: 1px;
  background: linear-gradient(to right, transparent, #8B0000);
}

.title-line:last-child {
  background: linear-gradient(to left, transparent, #8B0000);
}

.title-text {
  font-size: 18px;
  font-weight: bold;
  color: #8B0000;
  margin: 0 12px;
  letter-spacing: 2px;
}

.method-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.method-item {
  width: 48%;
  display: flex;
  align-items: center;
  background: #FFFAF0;
  border-radius: 10px;
  padding: 14px 12px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(139, 0, 0, 0.05);
}

.method-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.method-icon-char {
  font-size: 18px;
  color: #FFF;
  font-weight: bold;
}

.method-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.method-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.method-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==================== 底部声明 ==================== */
.disclaimer {
  padding: 12px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.disclaimer span {
  font-size: 13px;
  color: #C0B8A8;
  line-height: 26px;
}

.disclaimer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.disclaimer-dot {
  font-size: 12px;
  color: #C0B8A8;
  margin: 0 10px;
}

.disclaimer-link {
  font-size: 13px;
  color: #8B0000;
  text-decoration: underline;
  cursor: pointer;
}

/* ==================== 用户授权弹窗 ==================== */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.auth-dialog {
  position: relative;
  width: 85%;
  max-width: 420px;
  background: #FFFAF0;
  border-radius: 18px;
  padding: 32px 28px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.auth-title {
  font-size: 22px;
  font-weight: bold;
  color: #8B0000;
  text-align: center;
  margin-bottom: 20px;
}

.auth-content {
  margin-bottom: 20px;
}

.auth-content p {
  font-size: 16px;
  color: #555;
  line-height: 28px;
}

.auth-docs {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  flex-wrap: wrap;
}

.auth-docs span {
  font-size: 16px;
  color: #555;
}

.auth-doc-link {
  font-size: 16px;
  color: #8B0000;
  font-weight: bold;
  text-decoration: underline;
}

.auth-detail {
  font-size: 14px;
  color: #888;
  line-height: 24px;
  padding: 12px;
  background: rgba(139, 0, 0, 0.03);
  border-radius: 8px;
  margin-top: 8px;
}

.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 0 4px;
  cursor: pointer;
}

.auth-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  margin-top: 2px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.auth-checkbox-checked {
  background: #8B0000;
  border-color: #8B0000;
}

.auth-check-mark {
  font-size: 16px;
  color: #FFD700;
  font-weight: bold;
}

.auth-checkbox-text {
  font-size: 14px;
  color: #666;
  line-height: 24px;
}

.auth-btns {
  display: flex;
  gap: 14px;
}

.auth-btn {
  flex: 1;
  height: 52px;
  border-radius: 26px;
  font-size: 17px;
  font-weight: bold;
  text-align: center;
  border: none;
  cursor: pointer;
  outline: none;
}

.auth-btn-cancel {
  background: #F0E8D8;
  color: #888;
}

.auth-btn-confirm {
  background: linear-gradient(135deg, #8B0000, #B22222);
  color: #FFD700;
}

.auth-btn-disabled {
  background: #D3C8B8 !important;
  color: #FFF !important;
}

/* ==================== 分享弹窗 ==================== */
.share-link-box {
  margin: 16px 0;
}

.share-link-box input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E8E0D0;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
  text-align: center;
  outline: none;
}

.copy-btn {
  width: 100%;
  height: 44px;
  border-radius: 22px;
  background: linear-gradient(135deg, #8B0000, #B22222);
  color: #FFD700;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  outline: none;
}

/* ==================== Tab切换 ==================== */
.tab-bar {
  display: flex;
  padding: 0 24px;
  margin-top: -15px;
  margin-bottom: 10px;
  position: relative;
  z-index: 4;
}

.tab-item {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  background: #FFFAF0;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(139, 0, 0, 0.06);
  border-bottom: none;
  transition: all 0.3s;
  cursor: pointer;
}

.tab-active {
  background: linear-gradient(135deg, #8B0000, #B22222);
}

.tab-icon {
  font-size: 14px;
  margin-right: 4px;
}

.tab-text {
  font-size: 13px;
  font-weight: bold;
  color: #555;
}

.tab-active .tab-text {
  color: #FFD700;
}

/* ==================== 车牌输入 ==================== */
.plate-input-wrapper {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #E8E0D0;
  padding-bottom: 7px;
  gap: 6px;
}

.plate-province {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 32px;
  background: #8B0000;
  border-radius: 5px;
  flex-shrink: 0;
  cursor: pointer;
}

.plate-province-text {
  font-size: 18px;
  font-weight: bold;
  color: #FFD700;
}

.plate-province-arrow {
  font-size: 9px;
  color: rgba(255, 215, 0, 0.6);
  margin-left: 2px;
}

.plate-letter-input {
  width: 35px;
  height: 32px;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
  border: 1px solid #E8E0D0;
  border-radius: 5px;
  flex-shrink: 0;
  outline: none;
  background: transparent;
}

.plate-rest-input {
  flex: 1;
  height: 32px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  letter-spacing: 2px;
  text-align: center;
  border: 1px solid #E8E0D0;
  border-radius: 5px;
  outline: none;
  background: transparent;
}

.plate-hint {
  text-align: center;
  font-size: 10px;
  color: #C0B8A8;
  margin-top: 4px;
  margin-bottom: 2px;
}

.plate-special-hint {
  text-align: center;
  font-size: 9px;
  color: #D4C9B5;
  margin-top: 1px;
  margin-bottom: 2px;
  line-height: 1.6;
}

/* ==================== 省份选择器 ==================== */
.province-dialog {
  position: relative;
  width: 85%;
  max-width: 380px;
  background: #FFFAF0;
  border-radius: 12px;
  padding: 18px 14px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.province-dialog-title {
  font-size: 16px;
  font-weight: bold;
  color: #8B0000;
  text-align: center;
  margin-bottom: 12px;
}

.province-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.province-item {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  border-radius: 5px;
  background: #F5F0E8;
  font-size: 16px;
  font-weight: bold;
  color: #555;
  border: 1px solid transparent;
  transition: all 0.2s;
  cursor: pointer;
}

.province-item-active {
  background: #8B0000;
  color: #FFD700;
  border-color: #8B0000;
}

.province-close-btn {
  width: 100%;
  height: 38px;
  margin-top: 10px;
  border-radius: 19px;
  font-size: 14px;
  background: #F0E8D8;
  color: #888;
  border: none;
  cursor: pointer;
  outline: none;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10000;
  max-width: 300px;
  text-align: center;
  pointer-events: none;
}
