/* ==========================================================================
   MEDIUM-STYLE EDITORIAL TYPOGRAPHY & COUPLE BLOG STYLING
   ========================================================================== */

/* Top Navigation Bar */
.medium-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 850;
  background: rgba(14, 17, 29, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  height: 64px;
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #ffffff, #ffd9c2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 11px;
  color: var(--gold-accent);
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #fff;
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 77, 109, 0.3);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-write {
  background: linear-gradient(135deg, var(--rose-light), var(--rose-primary));
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px var(--rose-glow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-write:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--rose-vibrant);
}

/* ==========================================================================
   BLOG FEED VIEW (生活故事列表)
   ========================================================================== */
.blog-view-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

.blog-header {
  margin-bottom: 36px;
  text-align: center;
}

.blog-header-tag {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold-accent);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

.blog-main-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.blog-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

/* Tag filter bar */
.tag-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  scrollbar-width: none;
}
.tag-filter-bar::-webkit-scrollbar {
  display: none;
}

.tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 12px;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tag-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.tag-chip.active {
  background: rgba(255, 209, 102, 0.15);
  border-color: var(--gold-accent);
  color: var(--gold-accent);
  font-weight: 600;
}

/* Post Stream */
.post-stream {
  display: flex;
  flex-direction: column;
}

.post-card {
  padding: 32px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.post-card:first-child {
  padding-top: 8px;
}

.post-card:hover {
  transform: translateY(-2px);
}

.post-card.pinned {
  background: rgba(255, 209, 102, 0.04);
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pinned-banner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--gold-accent);
  background: rgba(255, 209, 102, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.3);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
  font-weight: 600;
}

.post-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.author-avatar-mini {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff758f, #c9184a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.author-name-bold {
  color: #fff;
  font-weight: 600;
}

.meta-dot {
  opacity: 0.4;
}

.post-card-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 3.5vw, 24px);
  font-weight: 700;
  color: #fff;
  line-height: 1.4;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.post-card:hover .post-card-title {
  color: var(--rose-light);
}

.post-card-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.post-tags-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-tag-item {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.post-stats-right {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.stat-claps {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--rose-soft);
}

/* ==========================================================================
   MEDIUM READER VIEW (沉浸式文章阅读器)
   ========================================================================== */
.reader-view-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 100px;
}

.btn-reader-back {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  transition: color 0.2s;
}

.btn-reader-back:hover {
  color: var(--rose-light);
}

.reader-header {
  margin-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 32px;
}

.reader-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.reader-subtitle {
  font-size: clamp(16px, 2.5vw, 19px);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  font-family: var(--font-serif);
  font-style: italic;
}

.reader-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.author-left-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar-lg {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff758f, #c9184a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px var(--rose-glow);
}

.author-meta-detail {
  display: flex;
  flex-direction: column;
}

.author-main-name {
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}

.author-sub-info {
  font-size: 12px;
  color: var(--text-muted);
}

.reader-actions-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-secondary-sm {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary-sm:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Editorial Body Typography */
.editorial-content {
  font-size: 17px;
  line-height: 1.85;
  color: #e6e9f2;
  word-break: break-word;
}

.editorial-content h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 40px 0 16px;
}

.editorial-content h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 36px 0 14px;
}

.editorial-content h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-accent);
  margin: 30px 0 12px;
}

.editorial-p {
  margin-bottom: 22px;
}

.editorial-quote {
  border-left: 3px solid var(--rose-light);
  padding: 16px 24px;
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--rose-soft);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 30px 0;
  font-style: italic;
}

.editorial-list {
  padding-left: 24px;
  margin-bottom: 22px;
}

.editorial-list li {
  margin-bottom: 8px;
}

.editorial-hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 40px 0;
}

.editorial-link {
  color: var(--rose-light);
  text-decoration: underline;
  transition: color 0.2s;
}

.editorial-link:hover {
  color: var(--gold-accent);
}

.editorial-inline-code {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 14px;
  color: var(--gold-light);
}

.editorial-figure {
  margin: 36px 0;
  text-align: center;
}

.editorial-figure img {
  max-width: 100%;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.editorial-figure figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Medium Clapping Bar (Bottom) */
.medium-clapping-bar {
  margin-top: 56px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-clap-round {
  background: rgba(255, 77, 109, 0.12);
  border: 1px solid rgba(255, 77, 109, 0.35);
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  transition: all 0.2s ease;
}

.btn-clap-round:hover {
  background: rgba(255, 77, 109, 0.22);
  transform: scale(1.05);
}

.btn-clap-round:active {
  transform: scale(0.96);
}

.clap-icon {
  font-size: 20px;
}

.floating-clap {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold-accent);
  font-size: 16px;
  font-weight: 700;
  pointer-events: none;
  animation: floatClap 1s ease-out forwards;
}

@keyframes floatClap {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(1.4); }
}

/* ==========================================================================
   MEDIUM-STYLE DISTRACTION-FREE WRITER MODAL
   ========================================================================== */
.editor-modal-container {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-deep);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.editor-top-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 17, 29, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.editor-brand {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-accent);
}

.editor-draft-status {
  font-size: 12px;
  color: var(--text-muted);
}

.editor-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-editor-publish {
  background: linear-gradient(135deg, var(--rose-light), var(--rose-primary));
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px var(--rose-glow);
  transition: transform 0.2s;
}

.btn-editor-publish:hover {
  transform: translateY(-1px);
}

.editor-body-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 100px;
  width: 100%;
}

.editor-title-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4.5vw, 40px);
  font-weight: 800;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 16px;
  padding: 0;
}
.editor-title-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.editor-subtitle-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  padding: 0;
}
.editor-subtitle-input::placeholder {
  color: rgba(255, 255, 255, 0.2);
}

/* Meta Config row */
.editor-meta-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 30px;
}

.editor-field-item label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.editor-select, .editor-text-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
}
.editor-select:focus, .editor-text-input:focus {
  border-color: var(--rose-light);
}

.editor-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  cursor: pointer;
  font-size: 13px;
  color: var(--gold-light);
}

/* Mode toggles: write vs preview */
.editor-tabs-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.editor-tab-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}

.editor-tab-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.editor-content-textarea {
  width: 100%;
  min-height: 400px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 20px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.8;
  color: #f1f3f8;
  outline: none;
  resize: vertical;
}
.editor-content-textarea:focus {
  border-color: rgba(255, 77, 109, 0.4);
}

.editor-preview-canvas {
  min-height: 400px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .nav-links {
    gap: 4px;
  }
  .nav-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .btn-write span.write-text {
    display: none;
  }
  .btn-write {
    padding: 8px 12px;
  }
}
