/* ========================================
   Discover CSS - 发现页面（独立 APP）
   ins风白色简约 · 独立于讯息/通讯录/短信
   ======================================== */

/* ---- 页面容器 ---- */
.discover-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff;
  z-index: var(--z-drawer);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.discover-screen.is-active {
  display: flex;
}

/* ---- 顶部导航栏 ---- */
.discover-nav {
  height: var(--status-bar-height);
  margin-top: var(--safe-area-top);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--spacing-lg);
  background-color: #fff;
  flex-shrink: 0;
}

.discover-nav__back {
  display: flex;
  align-items: center;
  color: var(--color-text-primary);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-left: -8px;
}

.discover-nav__back svg {
  width: 24px;
  height: 24px;
}

.discover-nav__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.discover-nav__right {
  width: 32px;
}

/* ---- 可滚动内容区 ---- */
.discover-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(60px + var(--safe-area-bottom, 0px));
}

/* ---- 搜索栏 ---- */
.discover-search {
  padding: 6px var(--spacing-lg) 12px;
}

.discover-search__input-wrapper {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 10px;
  padding: 0 12px;
  height: 36px;
  border: 1px solid rgba(0,0,0,0.04);
}

.discover-search__icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-hint);
  flex-shrink: 0;
}

.discover-search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--font-size-sm);
  color: var(--color-text-primary);
  padding: 0 8px;
  font-family: var(--font-family);
}

.discover-search__input::placeholder {
  color: var(--color-text-hint);
}

/* ---- 入口列表区域 ---- */
.discover-entries {
  padding: 0 var(--spacing-lg);
}

/* ---- 入口卡片（圆角分组） ---- */
.discover-card {
  background: #fff;
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* ---- 入口项 ---- */
.discover-entry {
  display: flex;
  align-items: center;
  padding: 16px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  position: relative;
}

.discover-entry:active {
  background-color: rgba(0,0,0,0.03);
}

/* 同一卡片内多项之间的分隔线 */
.discover-entry + .discover-entry {
  border-top: 1px solid rgba(0,0,0,0.05);
}

/* 左侧图标容器 */
.discover-entry__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
  background: #f5f5f5;
  border-radius: 10px;
}

.discover-entry__icon svg {
  width: 22px;
  height: 22px;
}

/* 中间标题 */
.discover-entry__title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-primary);
  line-height: 1.3;
  letter-spacing: 0.01em;
}

/* 右侧箭头 */
.discover-entry__arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: 8px;
}

.discover-entry__arrow svg {
  width: 16px;
  height: 16px;
  color: #c7c7cc;
}

/* ---- 底部导航栏 ---- */
.discover-bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding: 8px 0;
  padding-bottom: calc(8px + var(--safe-area-bottom, 0px));
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.04);
  flex-shrink: 0;
}

.discover-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 56px;
  color: var(--color-text-hint);
  transition: opacity 0.15s ease;
}

.discover-bottom-nav__item:active {
  opacity: 0.6;
}

.discover-bottom-nav__item.is-active .discover-bottom-nav__icon {
  color: var(--color-text-primary);
}

.discover-bottom-nav__item.is-active .discover-bottom-nav__label {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-medium);
}

.discover-bottom-nav__icon {
  width: 24px;
  height: 24px;
}

.discover-bottom-nav__label {
  font-size: 10px;
  font-weight: var(--font-weight-light);
  line-height: 1;
  font-family: var(--font-family);
}

/* ---- Toast 提示 ---- */
.discover-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: var(--font-size-sm);
  font-family: var(--font-family);
  color: #fff;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 9999;
  max-width: 220px;
  text-align: center;
  white-space: nowrap;
}

.discover-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
