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

html, body {
  height: 100%;
}

body {
  font-family: 'Noto Serif SC', serif;
  background: #F9F4F0;
  color: #2C3E50;
}

/* 页面整体布局 */
.page-wrapper {
  min-height: 100vh;           /* 页面最小高度撑满屏幕 */
  display: flex;
  flex-direction: column;
}

/* header */
header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: rgba(249,244,240,0.95);
  border-bottom: 1px solid #E2D7CC;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 16px;
  height: 50px;
  z-index: 1000;
}

header .logo {
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 2px;
}

header nav {
  display: flex;
  gap: 20px;
  font-weight: 500;
}

header nav .active {
  color: #C19A6B;
  border-bottom: 2px solid #C19A6B;
  padding-bottom: 4px;
}

/* 主内容容器 */
.content {
  flex: 1;                     /* 占据 header 和 footer 之间剩余空间 */
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1200px;
  margin: 80px auto 20px;         /* 顶部留出 header 空间 + 水平居中 auto */
  padding: 0 16px;
}

/* 页面标题 */
.page-title {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 40px;
}

.page-title h1 {
  font-size: 36px;
  font-weight: 400;
  color: #2C3E50;
  font-family: 'Noto Serif SC', serif;
  line-height: 40px;
  margin-bottom: 8px;
}

.page-title .title-underline {
  width: 48px;
  height: 4px;
  background-color: #C19A6B;
  margin: 0 auto;
  border-radius: 2px;
}

/* 卡片样式 */
.card {
  background: linear-gradient(145deg, #fff 0%, #F0EDE9 100%);
  border-radius: 10px;
  outline: 1px #E2D7CC solid;
  outline-offset: -1px;
  box-shadow: 0px 1px 2px -1px rgba(0,0,0,0.1), 0px 1px 3px rgba(0,0,0,0.1);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 卡片标题 */
.card h2 {
  font-size: 18px;
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h2 .marker {
  width: 4px;
  height: 20px;
  background: #C19A6B;
}

/* 表单控件 */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}

/* 性别/选项按钮 */
.options {
  display: flex;
  gap: 10px;
}

.option {
  flex: 1;
  padding: 8px 16px;
  border-radius: 4px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  outline: 1px #E2D7CC solid;
  background: white;
  color: #2C3E50;
  font-weight: 400;
  transition: 0.2s;
}

.option.active {
  background: rgba(193,154,107,0.1);
  outline: 1px #C19A6B solid;
  font-weight: 600;
}

.input-field {
  position: relative;       /* 必须相对定位，用于定位箭头 */
  height: 42px;
  border-radius: 4px;
  border: 1px solid #E2D7CC;
  background: white;
  padding: 0 12px;
  padding-right: 32px;      /* 给箭头腾出空间 */
  display: flex;
  align-items: center;
  color: #99A1AF;
  cursor: pointer;          /* 鼠标变手形 */
}

/* 箭头 */
.input-field::after {
  content: "";
  position: absolute;
  right: 12px;              /* 距离右边 */
  top: 50%;
  transform: translateY(-50%) rotate(45deg); /* 居中 + 旋转形成箭头 */
  width: 8px;
  height: 8px;
  border-right: 2px solid #C19A6B;
  border-bottom: 2px solid #C19A6B;
  pointer-events: none;     /* 不影响点击 */
}

.input-field.rotated::after {
  transform: translateY(-50%) rotate(225deg); /* 原来的 45 + 180 = 225° */
  transition: transform 0.3s;
}


/* 文本区域 */
textarea {
  width: 100%;
  min-height: 150px;
  border-radius: 6px;
  border: 1px solid #E2D7CC;
  padding: 12px;
  resize: vertical;
  font-size: 14px;
  line-height: 22px;
  background: rgba(255,255,255,0.5);
  color: #4A5565;
  font-family: 'Noto Serif SC', serif;  /* 确保字体统一 */
}

/* 按钮 */
.analyze-btn-card .btn {
  width: 100%;
  max-width: 400px;
  height: 56px;
  background: #2C3E50;
  color: #F9F4F0;
  font-size: 18px;
  font-weight: 600;
  font-family: 'Noto Serif SC', serif;
  line-height: 28px;
  letter-spacing: 1.8px;
  border-radius: 3.6px;
  text-align: center;
  cursor: pointer;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.small-text {
  text-align: center;
  font-size: 12px;
  color: #6A7282;
  margin-top: 8px;
}

.analyze-btn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 20px;
}

/* footer */
.footer {
  width: 100%;
  padding: 36px 0;
  text-align: center;
  font-size: 12px;
  color: #795e06;
  border-top: 1px solid #E2D7CC;
  background: #F9F4F0;
  flex-shrink: 0;
}

/* 紧凑表单 */
.compact-form {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.compact-form .field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}


/* 过往经历字数统计 */
.experience-card .char-count {
  font-size: 12px;
  color: #6A7282;
  margin-top: 4px;
}

/* 过往经历示例 */
.experience-example {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.experience-example .example-title {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: #C19A6B;
  font-family: 'Noto Serif SC', serif;
  font-weight: 400;
}

/* 默认箭头向右（折叠状态） */
.example-title .example-marker {
  display: inline-block;
  transition: transform 0.3s;
  transform: rotate(90deg);  /* 折叠时箭头指向右 */
}

/* 展开状态箭头向下 */
.example-title.open .example-marker {
  transform: rotate(180deg); /* 展开时箭头向下 */
}



.experience-example .example-marker {
  font-size: 14px;
  line-height: 20px;
}

.experience-example .example-text {
  line-height: 20px;
}

.experience-example .example-content {
  background: #F9F4F0;
  border-radius: 6px;
  border: 1px solid #E2D7CC;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 22px;
  color: #4A5565;
}


/* 弹窗 & 蒙版 */
.hidden {
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none; /* 防止被点击 */
  transition: height 0.3s, opacity 0.3s; /* 平滑过渡可选 */
}


#modal-mask {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
}
.picker-modal {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 680px;
  background: #fff;
  border-radius: 12px 12px 0 0;
  z-index: 1001;
  transition: transform 0.3s;
}
.picker-modal.active {
  transform: translateX(-50%) translateY(0);
}

.picker-modal .wheel-container {
  overflow-y: auto;  /* 允许滚动 */
  -webkit-overflow-scrolling: touch; /* iOS 平滑滚动 */
}


/* 头部 */
.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #E2D7CC;
}
.picker-header .title { font-size: 18px; font-weight: 600; }
.picker-header .close-btn, .picker-header .confirm-btn {
  font-size: 18px;
  cursor: pointer;
}

/* 父容器 */
.picker-type-toggle {
  display: flex;
  justify-content: center;   /* 居中 */
  gap: 16px;                 /* 按钮间距 */
  padding: 8px 0;
}

/* 按钮 */
.picker-type-toggle .picker-type {
  flex: 1 1 auto;            /* 自动伸缩 */
  max-width: 180px;          /* 桌面端最大宽度 */
  text-align: center;
  padding: 10px 0;
  border-radius: 999px;
  cursor: pointer;
  background: #f0f0f0;
  font-size: 16px;
  transition: 0.2s;
  margin: 0px 10px;
}

/* 激活状态 */
.picker-type-toggle .picker-type.active {
  background: #C19A6B;
  color: #fff;
}


/* 滚轮 */
.picker-wheel.horizontal {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0px 8px;
}

.wheel-wrapper {
  position: relative;
  flex: 1;
  height: 180px;
  overflow: hidden;
}

.wheel {
  height: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  text-align: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.wheel::-webkit-scrollbar {
  display: none;
}

.wheel div {
  height: 36px;
  line-height: 36px;
  scroll-snap-align: center;
  transition: color 0.2s, font-weight 0.2s;
  color: #999;

  white-space: nowrap;        /* 单行显示 */
  overflow: hidden;           /* 超出隐藏 */
  text-overflow: ellipsis;    /* 超出显示省略号 */
}

.wheel div:hover {
  overflow: visible;
  white-space: normal;
  background: rgba(0,0,0,0.05); /* 可选高亮 */
  font-size: 1.05em;
}



.wheel div.active {
  color: #C19A6B;
  font-weight: 600;
}

.wheel-wrapper::before,
.wheel-wrapper::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: #C19A6B;
  pointer-events: none;
  z-index: 10;
}

.wheel-wrapper::before { top: 50%; transform: translateY(-18px); }
.wheel-wrapper::after  { top: 50%; transform: translateY(18px); }

/* 地点搜索 */
.location-search {
  padding: 8px 16px;
  border-bottom: 1px solid #E2D7CC;
}
.location-search input {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}
.location-wheel {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
}


/* 响应式 */
@media (max-width: 768px) {
  header {
    height: 50px;
    padding: 0 16px;
  }
  header .logo { font-size: 20px; letter-spacing: 1.5px; }
  header nav { gap: 12px; font-size: 14px; }

  .card { padding: 16px; gap: 12px; }
  .card h2 { font-size: 16px; }
  .option { font-size: 12px; padding: 6px 12px; }
  textarea { min-height: 120px; font-size: 13px; }
  .btn { font-size: 14px; padding: 10px; }
}


