* {
  box-sizing: border-box;
}

:root {
  --bg: #faf9f6;
  --white: #ffffff;
  --text: #171717;
  --muted: #8c8b87;
  --line: #ebe8e1;

  --gold: #d8a441;
  --gold-light: #fbf2df;

  --red: #e44d47;
  --green: #53ad78;

  --dark: #171717;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;

  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
  color: inherit;
}


/* =========================
   Layout
========================= */

.site {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;

  margin: auto;
  padding: 0 32px;
}


/* =========================
   Header
========================= */

.header {
  /*height: 76px;*/

  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  padding: 10px 20px;
  border-radius: 40px;
  margin-top: 16px;
  position: stick;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;

  font-size: 17px;
  font-weight: 600;
}

.brand-mark {
  width: 30px;
  height: 30px;

  border-radius: 50%;

  background: #181818;

  position: relative;
}

.brand-mark::after {
  content: "";

  position: absolute;

  width: 12px;
  height: 12px;

  right: -2px;
  top: -2px;

  background: #e8bd67;

  border-radius: 50%;

}


.menu-button {
  border: 0;
  background: transparent;

  width: 42px;
  height: 42px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 1.5px;
  background: #222;
}


/* =========================
   Home
========================= */

.home {
  display: flex;
  flex-direction: column;
  align-items: center;

  padding-top: 100px;
  padding-bottom: 80px;
}

.hero {
  text-align: center;
}

.people-number {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: -0.02em;

}

.people-number strong {
  color: var(--gold);

  font-size: 14px;
  font-weight: 500;
}

.hero h1 {
  margin: 5px 0 0;

  font-size: 40px;
  font-weight: 500;

  letter-spacing: -0.05em;
}

.hero-subtitle {
  margin-top: 10px;

  color: var(--muted);

  font-size: 14px;
}


/* =========================
   Cards
========================= */

.home-card {
  width: min(100%, 700px);

  margin-top: 60px;

  padding: 20px;

  background: var(--white);

  border: 1px solid var(--line);

  border-radius: 27px;

  box-shadow:
    0 20px 60px rgba(40, 30, 15, 0.035);
}

.reading-card {
  margin-top: 18px;
}

.card-top {
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 6px 10px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 16px;
}

.live-dot {
  width: 9px;
  height: 9px;

  background: var(--red);

  border-radius: 50%;

  box-shadow:
    0 0 0 5px rgba(228, 77, 71, .08);
}

.card-count {
  color: var(--muted);
}

.card-count strong {
  color: var(--red);

  font-size: 24px;
  font-weight: 500;
}

.speaking-content {
  min-height: 270px;

  border-radius: 20px;

  background: #fffaf1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sound-wave {
  height: 40px;

  display: flex;
  align-items: center;

  gap: 5px;

  margin-bottom: 20px;
}

.sound-wave i {
  display: block;

  width: 3px;

  border-radius: 10px;

  background: #e5c27d;
}

.sound-wave i:nth-child(1) {
  height: 10px;
}

.sound-wave i:nth-child(2) {
  height: 22px;
}

.sound-wave i:nth-child(3) {
  height: 30px;
}

.sound-wave i:nth-child(4) {
  height: 40px;
}

.sound-wave i:nth-child(5) {
  height: 25px;
}

.sound-wave i:nth-child(6) {
  height: 17px;
}

.sound-wave i:nth-child(7) {
  height: 8px;
}

.speaking-content h2,
.reading-content h2 {
  margin: 0;

  font-size: 25px;
  font-weight: 450;

  letter-spacing: -0.04em;
}

.speaking-content p,
.reading-content p {
  margin: 8px 0 0;

  color: var(--muted);

  font-size: 14px;
}


/* =========================
   Buttons
========================= */

.dark-button {
  width: 210px;
  height: 48px;

  margin-top: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  border-radius: 999px;

  background: var(--dark);
  color: white;

  font-size: 15px;
}

.light-button {
  width: 190px;
  height: 46px;

  margin-top: 22px;

  border-radius: 999px;

  border: 1px solid #e4e4e1;

  background: white;
}

.reading-content {
  min-height: 220px;

  border-radius: 20px;

  background: #f6f8fb;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.book-icon {
  margin-bottom: 8px;

  color: #8fa9d2;

  font-size: 40px;
}

.book-symbol {
  font-size: 22px;
}

.reading-count {
  color: var(--muted);

  font-size: 14px;
}


/* =========================
   Home footer
========================= */

.home-footer {
  margin-top: 50px;

  text-align: center;

  color: var(--muted);

  font-size: 14px;

  line-height: 1.9;
}

.green-dot {
  display: inline-block;

  width: 7px;
  height: 7px;

  margin-right: 6px;

  border-radius: 50%;

  background: var(--green);
}


/* =========================
   Speak page
========================= */

.back-button,
.help-button {
  width: 40px;
  height: 40px;

  border: 0;

  background: transparent;

  font-size: 25px;

  color: #444;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
}

.help-button {
  font-size: 15px;

  border: 1px solid #ddd;

  border-radius: 50%;

  width: 23px;
  height: 23px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.speak-page {
  min-height: calc(100vh - 76px);

  display: flex;
  flex-direction: column;
  align-items: center;

  /*padding-top: 15px;*/
}

.speak-stat {
  text-align: center;
}

.speak-stat h1 {
  margin: 5px 0 0;

  font-size: 30px;

  font-weight: 450;

  letter-spacing: -0.04em;
}


/* =========================
   Mode tabs
========================= */

.mode-tabs {
  width: min(100%, 900px);

  display: none;
  grid-template-columns: repeat(3, 1fr);

  margin-top: 45px;

  padding: 5px;

  border: 1px solid var(--line);

  border-radius: 18px;

  background: #f5f4f1;
}

.mode-tab {
  min-height: 76px;

  border: 0;

  border-radius: 14px;

  background: transparent;

  color: #888;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 4px;

  transition: .2s;
}

.mode-tab span {
  font-size: 18px;
}

.mode-tab strong {
  font-size: 14px;

  font-weight: 500;
}

.mode-tab small {
  font-size: 11px;

  color: #aaa;
}

.mode-tab.active {
  background: white;

  color: var(--text);

  box-shadow:
    0 4px 15px rgba(0,0,0,.05);
}

.mode-tab.active span {
  color: var(--gold);
}


/* =========================
   Panels
========================= */

.mode-content {
  width: min(100%, 680px);
}

.mode-panel {
  display: none;

  min-height: 500px;

  margin-top: 30px;

  text-align: center;

  flex-direction: column;
  align-items: center;
}

.mode-panel.active {
  display: flex;
}

.mode-panel h2 {
  margin: 20px 0 0;

  font-size: 29px;

  font-weight: 450;

  letter-spacing: -0.045em;
}

.mode-panel > p {
  margin: 14px 0 0;

  color: var(--muted);

  font-size: 15px;

  line-height: 1.8;
}


/* =========================
   Record button
========================= */

.record-button {
  width: 175px;
  height: 175px;

  margin-top: 55px;

  border: 0;

  border-radius: 50%;

  background: white;

  box-shadow:
    0 0 0 18px rgba(216,164,65,.025),
    0 0 0 38px rgba(216,164,65,.012),
    0 20px 50px rgba(40,30,10,.08);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: .15s;
}

.record-circle {
  width: 95px;
  height: 95px;

  border: 7px solid var(--gold);

  border-radius: 50%;

  transition: .2s;
}

.record-button.recording {
  transform: scale(.94);
}

.record-button.recording .record-circle {
  background: var(--gold);

  border-radius: 20px;

  transform: scale(.75);
}

.record-label {
  margin-top: 37px;
 opacity: 0.1
  font-size: 14px;
}

.record-hint {
  margin-top: 8px;

  color: var(--muted);

  font-size: 14px;
}


/* =========================
   Anonymous
========================= */

.anonymous-tip {
  display: flex;
  align-items: center;
  gap: 10px;

  margin-top: 35px;

  padding: 13px 20px;

  border: 1px solid var(--line);

  border-radius: 12px;

  text-align: left;

  background: rgba(255,255,255,.5);
}

.anonymous-tip > span {
  font-size: 22px;

  color: var(--gold);
}

.anonymous-tip strong {
  display: block;

  font-size: 13px;

  font-weight: 500;
}

.anonymous-tip small {
  display: block;

  margin-top: 3px;

  color: var(--muted);

  font-size: 11px;
}


/* =========================
   Together
========================= */

.live-status {
  margin-top: 30px;

  color: var(--green);

  font-size: 13px;
}

.live-status span {
  display: inline-block;

  width: 7px;
  height: 7px;

  margin-right: 5px;

  border-radius: 50%;

  background: var(--green);
}

.listener-count {
  margin-top: 55px;

  display: flex;
  flex-direction: column;
}

.listener-count strong {
  font-size: 52px;

  font-weight: 400;

  color: var(--gold);
}

.listener-count span {
  margin-top: 5px;

  color: var(--muted);

  font-size: 14px;
}

.join-room-button {
  width: 230px;
  height: 50px;

  margin-top: 35px;

  border: 0;

  border-radius: 999px;

  background: var(--dark);

  color: white;
}

.room-hint {
  margin-top: 12px;

  color: var(--muted);

  font-size: 13px;
}


/* =========================
   Speak footer
========================= */

.speak-footer {
  margin-top: -30px;

  padding-bottom: 40px;

  text-align: center;

  color: var(--muted);

  font-size: 13px;
}

.today-status strong {
  color: var(--gold);

  font-weight: 500;
}


/* =========================
   Mobile
========================= */

@media (max-width: 700px) {

  .site {
    padding: 0 18px;
  }

  .home {
    padding-top: 75px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .people-number {
    font-size: 17px;
  }

  .people-number strong {
    font-size: 29px;
  }

  .home-card {
    margin-top: 45px;

    padding: 14px;

    border-radius: 22px;
  }

  .reading-card {
    margin-top: 15px;
  }

  .speaking-content {
    min-height: 240px;
  }

  .speaking-content h2 {
    font-size: 23px;
  }

  .dark-button {
    width: 180px;
  }


  /* Speak */

  .speak-page {
    padding-top: 5px;
  }

  .mode-tabs {
    margin-top: 5px;
  }

  .mode-tab {
    min-height: 70px;
  }

  .mode-tab strong {
    font-size: 12px;
  }

  .mode-tab small {
    font-size: 9px;
  }

  .mode-panel h2 {
    font-size: 25px;
  }

  .record-button {
    width: 155px;
    height: 155px;
  }

  .record-circle {
    width: 85px;
    height: 85px;
  }

}


/* ========================================
   录音按钮
======================================== */

.record-button {
  width: 180px;
  height: 180px;

  margin-top: 55px;

  border: 0;
  border-radius: 50%;

  background: white;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  position: relative;

  box-shadow:
    0 0 0 18px rgba(216,164,65,.025),
    0 0 0 38px rgba(216,164,65,.012),
    0 20px 50px rgba(40,30,10,.08);

  transition:
    transform .25s ease,
    box-shadow .35s ease;
}


/* ========================================
   中间圆
======================================== */

.record-circle {
  width: 94px;
  height: 94px;

  border: 7px solid var(--gold);

  border-radius: 50%;

  transition:
    transform .35s ease,
    border-radius .35s ease,
    background .35s ease;
}


/* ========================================
   正在录音
======================================== */

.record-button.recording {

  /*
   * 不缩小
   * 而是产生呼吸
   */

  transform: scale(1);

  animation:
    record-breathe 2.2s ease-in-out infinite;

}


/*
 * 呼吸动画
 */

@keyframes record-breathe {

  0% {

    box-shadow:
      0 0 0 18px rgba(216,164,65,.025),
      0 0 0 38px rgba(216,164,65,.012),
      0 20px 50px rgba(40,30,10,.08);

  }

  50% {

    box-shadow:
      0 0 0 30px rgba(216,164,65,.07),
      0 0 0 58px rgba(216,164,65,.025),
      0 24px 55px rgba(40,30,10,.12);

  }

  100% {

    box-shadow:
      0 0 0 18px rgba(216,164,65,.025),
      0 0 0 38px rgba(216,164,65,.012),
      0 20px 50px rgba(40,30,10,.08);

  }

}


/*
 * 中间圆也轻微呼吸
 */

.record-button.recording
.record-circle {

  background: var(--gold);

  border-color: var(--gold);

  animation:
    inner-breathe 2.2s ease-in-out infinite;

}


@keyframes inner-breathe {

  0% {
    transform: scale(.9);
    border-radius: 50%;
  }

  50% {
    transform: scale(1);
    border-radius: 43%;
  }

  100% {
    transform: scale(.9);
    border-radius: 50%;
  }

}


/* ========================================
   录音文字
======================================== */

.record-label {

  margin-top: 35px;

  font-size: 14px;

  transition:
    color .2s ease;
}


.record-button.recording
~ .record-label {

  color: var(--gold);


}


/* ========================================
   计时器
======================================== */

.record-timer {

  margin-top: 10px;

  font-size: 20px;

  font-variant-numeric:
    tabular-nums;

  color: var(--gold);

  opacity: 0;

  height: 0;

  transition:
    opacity .2s ease;
}


.record-timer.show {

  opacity: 1;

  height: auto;

}


/* ========================================
   录音提示
======================================== */

.record-hint {

  margin-top: 7px;

  color: var(--muted);

  font-size: 14px;

}


/* ========================================
   听听页面
======================================== */

.voices-page {

  width: min(100%, 680px);

  margin: 0 auto;

  padding-top: 75px;

  padding-bottom: 80px;

}


.voices-hero {

  text-align: center;

}


.voices-live {

  color: var(--red);

  font-size: 13px;

}


.voices-live span {

  display: inline-block;

  width: 7px;
  height: 7px;

  margin-right: 5px;

  border-radius: 50%;

  background: var(--red);

}


.voices-hero h1 {

  margin: 15px 0 0;

  font-size: 32px;

  font-weight: 450;

  letter-spacing: -.045em;

}


.voices-hero p {

  margin-top: 10px;

  color: var(--muted);

  font-size: 14px;

}


/* ========================================
   声音列表
======================================== */

.voice-list {

  display: flex;

  flex-direction: column;

  gap: 14px;

  margin-top: 50px;

}


.voice-item {

  padding: 22px;

  background: white;

  border: 1px solid var(--line);

  border-radius: 20px;

  transition:
    transform .2s ease,
    box-shadow .2s ease;

}


.voice-item:hover {

  transform: translateY(-1px);

  box-shadow:
    0 10px 35px
    rgba(40,30,10,.05);

}


/* ========================================
   声音信息
======================================== */

.voice-meta {

  display: flex;

  align-items: center;

  justify-content: space-between;

}


.voice-location {

  font-size: 14px;

  color: #555;

  display: none;

}


.voice-duration {

  font-size: 13px;

  color: var(--muted);

  font-variant-numeric:
    tabular-nums;

}


/* ========================================
   播放器
======================================== */

.voice-player {

  display: flex;

  align-items: center;

  gap: 14px;

  margin-top: 18px;

}


.play-button {

  width: 44px;
  height: 44px;

  flex-shrink: 0;

  border: 0;

  border-radius: 50%;

  background: #181818;

  color: white;

  font-size: 13px;

}


.voice-track {

  height: 4px;

  flex: 1;

  overflow: hidden;

  border-radius: 10px;

  background: #eeeae2;

}


.voice-progress {

  width: 0;

  height: 100%;

  background: var(--gold);

  border-radius: 10px;

  transition:
    width .1s linear;

}


.voice-player audio {

  display: none;

}


/* ========================================
   声音底部
======================================== */

.voice-footer {

  display: flex;

  justify-content: space-between;

  margin-top: 15px;

  color: var(--muted);

  font-size: 12px;

}




.voice-delete {

  border: 0;

  background: transparent;

  padding: 0;

  color: var(--muted);

  font-size: 12px;

  cursor: pointer;

}


.voice-delete:hover {

  color: var(--red);

}


/* ========================================
   空状态
======================================== */

.empty-state {

  min-height: 350px;

  display: none;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  text-align: center;

}


.empty-icon {

  font-size: 45px;

  color: var(--gold);

}


.empty-state h2 {

  margin-top: 20px;

  font-size: 21px;

  font-weight: 450;

}


.empty-state p {

  color: var(--muted);

  font-size: 14px;

}


.empty-state .dark-button {

  margin-top: 25px;

}


/* ========================================
   Footer
======================================== */

.voices-footer {

  margin-top: 60px;

  text-align: center;

  color: var(--muted);

  font-size: 13px;

}


.voices-footer p {

  margin-top: 10px;

}


/* ========================================
   Header link
======================================== */

.voices-link {

  color: #666;

  font-size: 14px;

}


.voices-link:hover {

  color: var(--text);

}


/* ========================================
   Mobile
======================================== */

@media (max-width: 700px) {

  .record-button {

    width: 160px;
    height: 160px;

  }


  .record-circle {

    width: 84px;
    height: 84px;

  }


  .voices-page {

    padding-top: 50px;

  }


  .voices-hero h1 {

    font-size: 28px;

  }


  .voice-item {

    padding: 18px;

  }

}


/* ========================================
   Language Switcher
======================================== */

.lang-switcher {
  position: relative;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-trigger:hover {
  border-color: var(--text);
}

.lang-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.lang-current {
  font-size: 13px;
  color: var(--text);
}

.lang-arrow {
  width: 14px;
  height: 14px;
  fill: var(--muted);
  transition: transform 0.2s ease;
}

.lang-switcher.open .lang-arrow {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  min-width: 120px;
  z-index: 100;
}

.lang-switcher.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease;
}

.lang-option:first-child {
  border-radius: 8px 8px 0 0;
}

.lang-option:last-child {
  border-radius: 0 0 8px 8px;
}

.lang-option:hover {
  background: var(--bg);
}

.lang-option.active {
  color: var(--gold);
  font-weight: 500;
}
