/* 
 ==========================================
  Vocus (方格子) Clone - Premium Design System
  Author: Antigravity AI
 ==========================================
*/

/* --- Import Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Noto+Sans+TC:wght@300;400;500;700;900&family=Noto+Serif+TC:wght@400;500;700&display=swap');

/* --- Root Variables & Theme System --- */
:root {
  /* Common Design Tokens */
  --vocus-red: #FF485A;
  --vocus-red-hover: #E03E4F;
  --vocus-red-light: rgba(255, 72, 90, 0.08);
  --accent-green: #00C853;
  --accent-green-light: rgba(0, 200, 83, 0.08);
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  --font-sans: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Noto Serif TC', Georgia, Cambria, "Times New Roman", Times, serif;
  
  /* Light Theme Specifics */
  --bg-primary: #FAF9F6;      /* Vocus classic warm gray/white background */
  --bg-secondary: #FFFFFF;    /* Pure white for cards, panels */
  --bg-tertiary: #F1EFFB;
  --text-primary: #1F1F1F;    /* Deep elegant dark charcoal */
  --text-secondary: #6B6B6D;  /* Standard body secondary gray */
  --text-tertiary: #9A9A9E;   /* Muted gray for metadata */
  --border-color: #E8E7E3;    /* Light organic grey border */
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.4);
  --navbar-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
  --btn-secondary-bg: #EAE8E4;
  --btn-secondary-hover: #DFDDD8;
  --card-hover-bg: rgba(255, 72, 90, 0.02);
}

[data-theme="dark"] {
  /* Dark Theme Specifics */
  --bg-primary: #0F0F11;      /* Deep obsidian black */
  --bg-secondary: #17171C;    /* Matte dark slate for cards */
  --bg-tertiary: #23232A;
  --text-primary: #F3F3F5;    /* Off-white for high contrast & comfortable reading */
  --text-secondary: #A0A0AB;  /* Cool grey for subtext */
  --text-tertiary: #6E6E77;
  --border-color: #27272A;    /* Dark slate border */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(23, 23, 28, 0.8);
  --glass-border: rgba(255, 255, 255, 0.03);
  --navbar-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  --btn-secondary-bg: #27272A;
  --btn-secondary-hover: #3F3F46;
  --card-hover-bg: rgba(255, 72, 90, 0.04);
}

/* --- Base Resets & Global Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), 
              color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              border-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

input {
  font-family: inherit;
  outline: none;
  border: none;
  transition: all 0.3s ease;
}

/* --- Layout Container --- */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top Navigation Bar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background-color: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--navbar-shadow);
  z-index: 1000;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

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

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

/* Vocus Logo Styled beautifully */
.logo {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-primary);
}

.logo span.brand-dot {
  width: 8px;
  height: 8px;
  background-color: var(--vocus-red);
  border-radius: 50%;
  display: inline-block;
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.8; }
}

.search-bar-wrapper {
  position: relative;
  display: none; /* Hide on small viewports */
}

@media (min-width: 768px) {
  .search-bar-wrapper {
    display: block;
  }
}

.search-input {
  background-color: var(--btn-secondary-bg);
  color: var(--text-primary);
  padding: 8px 16px 8px 36px;
  border-radius: 30px;
  font-size: 14px;
  width: 200px;
}

.search-input:focus {
  width: 280px;
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--vocus-red-light), 0 4px 10px rgba(0,0,0,0.05);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 14px;
  pointer-events: none;
}

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

/* Theme Toggle Button (Premium Icon Transition) */
.theme-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--btn-secondary-bg);
  color: var(--text-primary);
  border: 1px solid transparent;
}

.theme-toggle-btn:hover {
  background-color: var(--btn-secondary-hover);
  transform: scale(1.05);
}

.theme-toggle-btn i {
  font-size: 18px;
  transition: transform 0.5s ease;
}

.theme-toggle-btn:hover i {
  transform: rotate(45deg);
}

.write-btn {
  background-color: var(--vocus-red);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 18px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(255, 72, 90, 0.2);
}

.write-btn:hover {
  background-color: var(--vocus-red-hover);
  box-shadow: 0 6px 16px rgba(255, 72, 90, 0.3);
  transform: translateY(-1px);
}

.notification-btn {
  color: var(--text-secondary);
  font-size: 20px;
  padding: 8px;
}

.notification-btn:hover {
  color: var(--text-primary);
}

.avatar-nav {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.avatar-nav:hover {
  border-color: var(--vocus-red);
}

/* --- Banner Header Section --- */
.banner-section {
  margin-top: 64px;
  position: relative;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform 0.8s ease;
}

.banner-section:hover .banner-img {
  transform: scale(1.03);
}

/* --- Creator Profile Section --- */
.profile-section {
  position: relative;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.profile-container {
  display: flex;
  flex-direction: column;
  position: relative;
}

.profile-header-wrapper {
  display: flex;
  flex-direction: column;
  margin-top: -60px; /* Overlap with banner */
  padding: 0 12px;
}

@media (min-width: 768px) {
  .profile-header-wrapper {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: 0;
  }
}

.profile-left-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .profile-left-block {
    flex-direction: row;
    align-items: flex-end;
    gap: 24px;
  }
}

.avatar-profile-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: var(--bg-secondary);
  padding: 4px;
  box-shadow: var(--shadow-md);
  transition: background-color 0.4s ease;
}

.avatar-profile {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.avatar-profile-wrapper:hover .avatar-profile {
  transform: scale(1.05) rotate(5deg);
}

.creator-info-txt {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.creator-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.verified-badge {
  color: var(--accent-green);
  font-size: 18px;
  display: flex;
  align-items: center;
}

.creator-stats-row {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-item span.stat-num {
  font-weight: 700;
  color: var(--text-primary);
}

.profile-right-block {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

@media (min-width: 768px) {
  .profile-right-block {
    margin-top: 0;
    margin-bottom: 12px;
  }
}

.follow-btn {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 30px;
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.follow-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.follow-btn.following {
  background-color: var(--btn-secondary-bg);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.follow-btn.following:hover {
  background-color: var(--btn-secondary-hover);
  color: var(--vocus-red);
}

.share-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--btn-secondary-bg);
  color: var(--text-primary);
}

.share-btn:hover {
  background-color: var(--btn-secondary-hover);
  color: var(--vocus-red);
  transform: translateY(-1px);
}

.creator-bio-box {
  margin-top: 20px;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 760px;
}

@media (min-width: 768px) {
  .creator-bio-box {
    padding: 0;
  }
}

/* --- Salon Tabs System --- */
.salon-tabs-bar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 64px;
  z-index: 900;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.tabs-container {
  display: flex;
  gap: 32px;
  height: 48px;
}

.tab-item {
  position: relative;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  height: 100%;
  padding: 0 4px;
}

.tab-item:hover {
  color: var(--text-primary);
}

.tab-item.active {
  color: var(--vocus-red);
  font-weight: 700;
}

.tab-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--vocus-red);
  border-radius: 3px 3px 0 0;
}

/* --- SPA View System --- */
.view-panel {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.view-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Home Tab Content (Main Layout) --- */
.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 32px 0 64px 0;
}

@media (min-width: 992px) {
  .main-grid {
    grid-template-columns: 2.2fr 1fr;
  }
}

.content-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Premium Article Card --- */
.article-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  flex-direction: column-reverse;
  gap: 20px;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
              background-color 0.4s ease, border-color 0.4s ease;
}

@media (min-width: 576px) {
  .article-card {
    flex-direction: row;
    justify-content: space-between;
  }
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 72, 90, 0.15);
  background-color: var(--card-hover-bg);
}

.card-text-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.card-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.card-pub-tag {
  background-color: var(--btn-secondary-bg);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.article-card:hover .card-title {
  color: var(--vocus-red);
}

.card-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.meta-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.meta-stats-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-stat-item i {
  font-size: 14px;
}

.card-image-block {
  width: 100%;
  height: 160px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  background-color: var(--btn-secondary-bg);
}

@media (min-width: 576px) {
  .card-image-block {
    width: 200px;
    height: 120px;
    flex-shrink: 0;
  }
}

.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card:hover .card-thumb {
  transform: scale(1.05);
}

/* --- Sidebar Panels --- */
.sidebar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-panel {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-color);
  color: var(--text-primary);
}

/* Salon Info Styling */
.salon-card-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.salon-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.salon-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background-color: var(--vocus-red-light);
  color: var(--vocus-red);
  font-size: 24px;
}

.salon-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
}

.salon-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.salon-join-btn {
  width: 100%;
  background-color: var(--vocus-red-light);
  color: var(--vocus-red);
  font-weight: 600;
  font-size: 13px;
  padding: 10px;
  border-radius: 8px;
  margin-top: 8px;
}

.salon-join-btn:hover {
  background-color: var(--vocus-red);
  color: #FFFFFF;
}

/* Sidebar lists */
.side-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.side-item-num {
  font-weight: 700;
  color: var(--vocus-red);
  font-size: 14px;
}

.side-item-title {
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
}

.side-item:hover .side-item-title {
  color: var(--vocus-red);
}

/* --- SPA View 2: Article Detail View (Reader Mode) --- */
.article-reader-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 80px 16px;
}

/* Scroll progress indicator */
.reader-progress-bar {
  position: fixed;
  top: 64px;
  left: 0;
  height: 3px;
  background-color: var(--vocus-red);
  width: 0%;
  z-index: 1010;
  transition: width 0.1s ease;
}

/* Reader options control box */
.reader-controls-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.back-to-home {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  gap: 6px;
}

.back-to-home:hover {
  color: var(--vocus-red);
}

.control-buttons-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.control-divider {
  width: 1px;
  height: 20px;
  background-color: var(--border-color);
}

.font-style-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
}

.font-style-btn:hover, .font-style-btn.active {
  color: var(--vocus-red);
  background-color: var(--vocus-red-light);
}

.size-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.size-adjust-btn {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: var(--btn-secondary-bg);
  color: var(--text-primary);
  font-size: 14px;
}

.size-adjust-btn:hover {
  background-color: var(--btn-secondary-hover);
}

/* Article Typography Base */
.reader-article-header {
  margin-bottom: 32px;
}

.reader-category-tag {
  color: var(--vocus-red);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-bottom: 12px;
}

.reader-article-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .reader-article-title {
    font-size: 36px;
  }
}

.reader-author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reader-author-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-meta-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.meta-author-name {
  font-weight: 700;
  color: var(--text-primary);
}

.meta-pub-details {
  color: var(--text-tertiary);
}

/* Main Post Image */
.reader-main-illustration {
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  background-color: var(--btn-secondary-bg);
}

/* Font Size Modifiers (applied dynamically to .reader-content-body) */
.reader-content-body {
  line-height: 1.8;
  color: var(--text-primary);
  transition: font-size 0.3s ease;
}

/* Font styles switching classes */
.font-sans-mode {
  font-family: var(--font-sans);
}

.font-serif-mode {
  font-family: var(--font-serif);
}

/* Paragraph styling */
.reader-content-body p {
  margin-bottom: 24px;
  text-align: justify;
}

/* Styled Blockquote for Golden quotes */
.reader-content-body blockquote {
  border-left: 4px solid var(--vocus-red);
  background-color: var(--vocus-red-light);
  padding: 18px 24px;
  margin: 32px 0;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-size: 1.1em;
  font-weight: 500;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.7;
}

/* Paragraph First-letter (Drop Cap) style */
.reader-content-body p:first-of-type::first-letter {
  font-size: 3em;
  font-weight: 900;
  float: left;
  line-height: 1;
  margin-right: 8px;
  color: var(--vocus-red);
}

/* --- Article Bottom Interactive Toolbar --- */
.reader-bottom-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.toolbar-left-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Like Clap Button with Bubbles effect */
.like-clap-wrapper {
  position: relative;
}

.like-clap-btn {
  background-color: var(--vocus-red-light);
  color: var(--vocus-red);
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  gap: 8px;
}

.like-clap-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 72, 90, 0.15);
}

.like-clap-btn.clapped i {
  animation: scaleHeart 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleHeart {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Clapping bubble animation */
.clap-bubble {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--vocus-red);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 20px;
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
}

@keyframes floatUp {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -10px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -40px) scale(0.8); }
}

.bookmark-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  background-color: var(--btn-secondary-bg);
}

.bookmark-btn:hover {
  color: var(--vocus-red);
  background-color: var(--vocus-red-light);
  transform: translateY(-1px);
}

.bookmark-btn.saved {
  color: var(--vocus-red);
  background-color: var(--vocus-red-light);
}

.toolbar-right-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-secondary);
  background-color: var(--btn-secondary-bg);
}

.share-action-btn:hover {
  color: var(--text-primary);
  background-color: var(--btn-secondary-hover);
  transform: translateY(-1px);
}

/* --- About Tab Content --- */
.about-view-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 16px 80px 16px;
}

.about-card-banner {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  margin-bottom: 32px;
}

.about-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--vocus-red);
}

.about-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
}

.about-bio-p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: justify;
}

.about-achievements {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.achieve-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.achieve-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--vocus-red);
}

.achieve-label {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* --- Elegant Toast Notifications --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-message {
  background-color: var(--text-primary);
  color: var(--bg-secondary);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
             toastFadeOut 0.3s ease 2.7s forwards;
  pointer-events: auto;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* --- Styled Footer --- */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 48px 0;
  margin-top: auto;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 768px) {
  .footer-container {
    flex-direction: row;
  }
}

.footer-links {
  display: flex;
  gap: 20px;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--vocus-red);
}

/* Font Size Classes */
.font-size-sm { font-size: 15px !important; }
.font-size-md { font-size: 17px !important; }
.font-size-lg { font-size: 19px !important; }

/* Fontawesome Icons fallback if not loaded */
[class^="ri-"] {
  line-height: 1;
}

/* Custom Override for No Navbar article pages */
.reader-page-body .reader-progress-bar {
  top: 0;
}

/* Empty State Card Style */
.empty-state-card {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 56px 32px;
  text-align: center;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.empty-state-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--vocus-red);
}

.empty-icon {
  font-size: 64px;
  color: var(--vocus-red);
  margin-bottom: 20px;
  animation: floatIcon 3s ease-in-out infinite;
  display: inline-block;
}

.empty-title {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 10px;
  font-weight: 700;
}

.empty-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 340px;
  margin: 0 auto;
  line-height: 1.6;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Premium Search Box in Navbar */
.nav-search-container {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--btn-secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px 6px 36px;
  width: 180px;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.nav-search-container:focus-within {
  width: 260px;
  border-color: var(--vocus-red);
  box-shadow: 0 0 0 3px var(--vocus-red-light);
  background-color: var(--bg-card);
}

.search-box-icon {
  position: absolute;
  left: 12px;
  color: var(--text-tertiary);
  font-size: 15px;
  transition: color 0.3s ease;
  pointer-events: none;
}

.nav-search-container:focus-within .search-box-icon {
  color: var(--vocus-red);
}

#navbar-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text-primary);
  width: 100%;
}

#navbar-search-input::placeholder {
  color: var(--text-tertiary);
}

/* ==========================================
   LANGUAGE SWITCHER
   ========================================== */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--btn-secondary-bg);
  border-radius: 6px;
  padding: 2px;
  margin-left: 8px;
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 24px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-sans);
}

.lang-btn:hover {
  background: var(--btn-secondary-hover);
  color: var(--text-primary);
}

.lang-btn.active {
  background: var(--vocus-red);
  color: #fff;
}

/* Navbar lang switcher (right side) */
.nav-lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--btn-secondary-bg);
  border-radius: 6px;
  padding: 2px;
}

.nav-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-sans);
}

.nav-lang-btn:hover {
  background: var(--btn-secondary-hover);
  color: var(--text-primary);
}

.nav-lang-btn.active {
  background: var(--vocus-red);
  color: #fff;
}

/* ==========================================
   TABS BAR — SCROLLABLE ON MOBILE
   ========================================== */
.tabs-container {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 2px;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

.tab-item {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ==========================================
   ARTICLE ACTION BAR (like / bookmark / share)
   ========================================== */
.article-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0 16px;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.action-btn:hover {
  border-color: var(--vocus-red);
  color: var(--vocus-red);
  background: var(--vocus-red-light);
}

.action-btn.clap-btn.clapped {
  background: var(--vocus-red);
  border-color: var(--vocus-red);
  color: #fff;
}

.action-btn.saved {
  background: var(--accent-green-light);
  border-color: var(--accent-green);
  color: var(--accent-green);
}

/* Clap bubble animation */
.clap-bubble {
  position: absolute;
  font-size: 0.8rem;
  color: var(--vocus-red);
  font-weight: 700;
  pointer-events: none;
  animation: floatUp 0.8s ease-out forwards;
}

@keyframes floatUp {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-40px); }
}

/* ==========================================
   CATEGORY COLOR TAGS — extended
   ========================================== */
.card-pub-tag[data-cat="novel"],
.reader-category-tag.novel { color: #9B59B6; }
.card-pub-tag[data-cat="essay"],
.reader-category-tag.essay  { color: #E67E22; }
.card-pub-tag[data-cat="travel"],
.reader-category-tag.travel { color: #27AE60; }
.card-pub-tag[data-cat="recent"],
.reader-category-tag.recent { color: #2980B9; }

/* ==========================================
   RESPONSIVE: Mobile language switcher
   ========================================== */
@media (max-width: 600px) {
  .lang-switcher,
  .nav-lang-switcher {
    margin-left: 4px;
  }
  
  .lang-btn,
  .nav-lang-btn {
    width: 26px;
    height: 22px;
    font-size: 0.62rem;
  }
  
  .article-actions-bar {
    gap: 8px;
  }
  
  .action-btn {
    padding: 7px 12px;
    font-size: 0.8rem;
  }
}

/* Coastal Mechanics custom figure styles */
.image-row {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 600px) {
  .image-row {
    flex-direction: column;
    gap: 20px;
  }
}

.image-row .article-body-image {
  flex: 1;
  margin: 0;
}

.article-body-image {
  margin: 28px 0;
  text-align: center;
}

.article-body-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.article-body-image img:hover {
  transform: scale(1.02);
}

.article-body-image figcaption {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-top: 10px;
  font-style: italic;
}


