/* ==========================================================================
   校园搭子 · 基础样式
   设计体系：黑白灰 + 方角卡片 + 胶囊按钮（Nike 式编辑感）
   Tailwind 负责布局，这里补充 token 与可复用组件类
   ========================================================================== */

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #ffffff;
  color: #111111;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: #111111;
  color: #ffffff;
}

/* 卡片：1px 发丝描边，直角，无阴影 */
.card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 0;
}

/* 按钮：统一胶囊形，无阴影 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 9999px;
  padding: 10px 20px;
  font-size: 13.5px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, opacity .16s ease, transform .16s ease;
  cursor: pointer;
}
.btn:active:not(:disabled) {
  opacity: .72;
  transform: scale(.985);
}
.btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.btn-primary {
  background: #111111;
  color: #ffffff;
  border: 1px solid #111111;
}
.btn-primary:hover:not(:disabled) {
  background: #39393b;
  border-color: #39393b;
}
.btn-ghost {
  background: #f5f5f5;
  color: #111111;
  border: 1px solid transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: #e5e5e5;
}
.btn-danger {
  background: #ffffff;
  color: #d30005;
  border: 1px solid #111111;
}
.btn-danger:hover:not(:disabled) {
  background: #f5f5f5;
}
.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  line-height: 18px;
  border-radius: 9999px;
}

/* 输入框：软灰底、胶囊圆角，聚焦时黑描边 */
.input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 24px;
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 20px;
  background: #f5f5f5;
  color: #111111;
  outline: none;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder {
  color: #9e9ea0;
}
.input:focus {
  background: #ffffff;
  border-color: #111111;
  box-shadow: 0 0 0 4px #f5f5f5;
}
textarea.input {
  min-height: 96px;
  line-height: 1.65;
  resize: vertical;
  border-radius: 18px;
}
select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111111' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* 标签：白底发丝描边胶囊 */
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  color: #39393b;
  font-size: 11px;
  line-height: 1;
  padding: 5px 10px;
  white-space: nowrap;
}

/* 导航 */
.nav-item {
  color: #707072;
  font-size: 14px;
  transition: color .15s ease;
}
.nav-item:hover {
  color: #111111;
}
.nav-item.active {
  color: #111111;
  font-weight: 600;
}

/* 强调标题：编辑感的大字重排版 */
.display-title {
  font-family: Inter, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* 横向滚动隐藏滚动条 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 底部安全区（iPhone） */
.safe-bottom {
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
}

/* 移动端悬浮按钮：上移，避开底部导航与 iPhone 安全区 */
.fab-above-nav {
  bottom: calc(84px + env(safe-area-inset-bottom));
}

/* iOS Safari 聚焦表单时避免页面自动放大（字号小于 16px 会触发缩放） */
@supports (-webkit-touch-callout: none) {
  input:not([type='checkbox']):not([type='radio']),
  select,
  textarea {
    font-size: 16px;
  }
}

/* 移动端浏览器地址栏收放时使用动态视口高度 */
@supports (min-height: 100dvh) {
  body {
    min-height: 100dvh;
  }
}

/* 过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity .18s ease;
}
.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

.slide-up-enter-active,
.slide-up-leave-active {
  transition: opacity .2s ease, transform .2s ease;
}
.slide-up-enter-from,
.slide-up-leave-to {
  opacity: 0;
  transform: translateY(12px);
}

/* 详情页渐入 */
.page-enter-active {
  transition: opacity .2s ease, transform .2s ease;
}
.page-enter-from {
  opacity: 0;
  transform: translateY(6px);
}
