/* ---------- 基础布局 ---------- */

#app {
  min-height: 100vh;
  padding: 80px 20px 40px;
}

/* ---------- Header ---------- */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  background: rgba(15,17,21,0.8);
  backdrop-filter: blur(12px);
  z-index: 10;
}

header .left,
header .right {
  font-size: 14px;
  opacity: 0.8;
  cursor: pointer;
}

/* ---------- 通用卡片 ---------- */

.card {
  text-align: center;
  background: #171a21;
  border-radius: 16px;
  padding: 24px;
  max-width: 420px;
  margin: 0 auto;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card h1, .card h2 {
  margin: 0 0 20px;
  font-weight: 600;
}

.field {
  margin-bottom: 16px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.row {
  display: flex;
  gap: 10px;
}

.row input {
  flex: 1;
}

/* ---------- 按钮 ---------- */

.btn {
  margin-top: 24px;
  width: 100%;
  padding: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #5f6cff, #8a5cff);
  color: white;
  font-weight: 500;
}

.btn.ghost {
  margin-top: 18px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.25s ease;
}

.btn.ghost:hover {
  background: rgba(255,255,255,0.05);
}

/* ---------- Tabs ---------- */

.tabs {
  display: flex;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  opacity: 0.4;
  cursor: pointer;
}

.tab.active {
  opacity: 1;
  border-bottom: 2px solid #8a5cff;
}

/* ---------- Home ---------- */

.home-wrap {
  height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}

.brand {
  font-size: 42px;
  letter-spacing: 4px;
  font-weight: 600;
  opacity: 0.9;
}

.slogan {
  font-size: 16px;
  opacity: 0.6;
  margin-bottom: 30px;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 260px;
}

.home-btn {
  padding: 14px 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: all .25s ease;
}

.home-btn:hover {
  background: rgba(255,255,255,0.06);
  transform: translateY(-2px);
}

.home-btn.primary {
  background: rgba(255,255,255,0.12);
}

/* ---------- Capsules 列表 ---------- */

.capsule-wrap {
  padding: 30px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.capsule-item {
  padding: 18px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all .25s ease;
}

.capsule-item:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.07);
}

.cap-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cap-title {
  font-size: 15px;
  font-weight: 500;
}

.cap-time {
  font-size: 12px;
  opacity: 0.6;
}

.cap-foot {
  font-size: 12px;
  opacity: 0.5;
}

/* ---------- 打开胶囊 ---------- */

.open-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.open-box {
  width: 340px;
  padding: 26px;
  border-radius: 14px;
  background: #111;
  border: 1px solid rgba(255,255,255,0.08);
  animation: fadeIn .3s ease;
  text-align: center;
}

.open-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.open-meta {
  font-size: 12px;
  opacity: 0.5;
  margin-bottom: 20px;
}

.open-content {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.open-close {
  font-size: 12px;
  opacity: 0.4;
}

/* ---------- 其他 ---------- */

.link {
  margin-top: 16px;
  color: #6b8cff;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

#toast{
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%) translateY(20px);
  
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  letter-spacing: 0.5px;

  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 10000;
}

#toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ===== Profile Layout Fix ===== */

.profile-wrap {
  width: 720px;
  max-width: 92%;
  margin: 10px auto;
}

.profile-title {
  font-size: 28px;
  margin-bottom: 24px;
  color: #eaeaea;
  letter-spacing: 1px;
  display: flex;
  justify-content: center;   /* 横向居中 */
}
.profile-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px 48px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}

.profile-card h3 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-weight: 500;
  color: #ffffff;
}

.profile-card input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding: 12px 0;
  color: #fff;
  font-size: 16px;
  outline: none;
}

.profile-card .btn {
  margin-top: 32px;
  width: 100%;
}

.profile-logout {
  margin-top: 28px;
  opacity: 0.6;
  cursor: pointer;
}
.profile-logout:hover {
  opacity: 1;
}
.divider {
  height: 1px;
  margin: 28px 0;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.12),
    transparent
  );
}
