*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #f0f2f5;
  --bg-secondary: #e8eaef;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted: #8a8aa0;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.65);
  --glass-shadow: rgba(0, 0, 0, 0.06);
  --accent: #1a5276;
  --accent-light: #2980b9;
  --accent-bg: rgba(26, 82, 118, 0.06);
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #c0392b;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.glass-header,
.glass-footer {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 24px;
  width: 100%;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-shrink: 1;
}

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.header-info h1 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-info p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 4px;
  flex-shrink: 0;
}

.nav-menu a {
  display: block;
  padding: 8px 16px;
  border-radius: 20px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: var(--accent-bg);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.hero-section {
  padding: 40px 16px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.hero-card {
  padding: 40px;
  text-align: center;
  width: 100%;
}

.hero-banner {
  margin: -40px -40px 30px;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.hero-banner img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
  display: block;
}

.hero-content h2 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 4px;
  word-break: break-word;
}

.hero-content h3 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 8px;
}

.hero-hospital {
  color: var(--accent-light);
  font-weight: 500;
  margin-bottom: 16px;
  word-break: break-word;
}

.hero-titles {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  word-break: break-word;
}

.hero-specialties {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.specialty-tag {
  display: inline-block;
  padding: 8px 20px;
  background: var(--accent-bg);
  border: 1px solid rgba(26, 82, 118, 0.2);
  border-radius: 24px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

.section {
  padding: 30px 16px;
  width: 100%;
}

.section-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.section-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(26, 82, 118, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-card {
  padding: 32px;
  width: 100%;
}

.about-text p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.9;
  word-break: break-word;
}

.about-diseases h4 {
  color: var(--accent);
  margin-bottom: 10px;
}

.about-diseases ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  list-style: none;
}

.about-diseases li {
  padding: 8px 14px;
  background: var(--accent-bg);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
  width: 100%;
}

.article-card {
  padding: 0;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  width: 100%;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.article-card-cover {
  height: 180px;
  overflow: hidden;
}

.article-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.article-card-body {
  padding: 20px 24px 24px;
}

.article-card h3 {
  font-size: 1.05rem;
  color: var(--accent);
  margin-bottom: 10px;
  line-height: 1.4;
}

.article-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.article-tags {
  color: var(--accent-light);
}

.article-views {
  color: var(--text-muted);
}

.load-placeholder,
.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 36px;
  height: 36px;
  margin: 0 auto 12px;
  border: 3px solid var(--accent-bg);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.empty-state span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.experience-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  padding: 4px;
  background: var(--glass-bg);
  border-radius: 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  width: 100%;
  overflow-x: auto;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 24px;
  font-size: 0.88rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  min-width: 80px;
}

.filter-btn.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(26, 82, 118, 0.2);
}

.filter-btn:hover:not(.active) {
  background: var(--accent-bg);
  color: var(--accent);
}

.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 30px;
  width: 100%;
}

.experience-timeline::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(26, 82, 118, 0.12);
  border-radius: 1px;
}

.experience-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  position: relative;
  margin-bottom: 16px;
  width: 100%;
}

.experience-timeline-dot {
  position: absolute;
  left: -24px;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.15);
  z-index: 1;
}

.experience-date-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--accent-bg);
  border-radius: 16px;
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
}

.experience-body {
  flex: 1;
  min-width: 0;
  width: 100%;
}

.experience-header {
  margin-bottom: 8px;
}

.experience-body h3 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1.05rem;
  word-break: break-word;
}

.experience-content {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 12px;
  word-break: break-word;
}

.experience-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 500;
}

.experience-type-badge.education { background: rgba(46, 134, 193, 0.12); color: #2e86c1; }
.experience-type-badge.work { background: rgba(39, 174, 96, 0.12); color: #27ae60; }
.experience-type-badge.honor { background: rgba(243, 156, 18, 0.12); color: #d68910; }
.experience-type-badge.event { background: rgba(142, 68, 173, 0.12); color: #8e44ad; }

.experience-media {
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: 100%;
}

.experience-cover {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.experience-video {
  width: 100%;
  max-height: 300px;
  border-radius: var(--radius-sm);
  display: block;
}

.experience-link-btn {
  margin-top: 12px;
}

.experience-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--accent-bg);
  border-radius: 16px;
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

.attachment-link:hover {
  background: rgba(26, 82, 118, 0.14);
}

.message-form-card {
  padding: 28px;
  margin-bottom: 32px;
  width: 100%;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.08);
}

.form-group textarea[readonly] {
  background: #e8eaef;
  cursor: default;
  color: var(--text-secondary);
  border-color: rgba(0, 0, 0, 0.05);
}

.form-group textarea[readonly]:focus {
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: none;
}

.reply-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--accent-bg);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--accent);
}

.reply-indicator button {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.reply-indicator button:hover {
  color: var(--danger);
  background: rgba(192, 57, 43, 0.08);
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.message-card {
  padding: 24px;
  width: 100%;
}

.message-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.message-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.message-card-name {
  font-weight: 600;
  color: var(--accent);
  font-size: 0.95rem;
}

.message-card-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.message-card-content {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-replies {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.message-reply-item {
  padding: 14px 16px;
  background: rgba(26, 82, 118, 0.03);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-light);
}

.message-reply-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.message-reply-name {
  color: var(--accent-light);
  font-weight: 600;
  font-size: 0.88rem;
}

.message-reply-badge {
  display: inline-block;
  padding: 1px 8px;
  background: rgba(41, 128, 185, 0.12);
  color: var(--accent-light);
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
}

.message-reply-item .message-card-content {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.message-card-actions {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.message-card-actions .glass-btn-sm {
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: 18px;
}

.contact-card {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.contact-item {
  font-size: 0.95rem;
  color: var(--text-secondary);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.contact-item strong {
  color: var(--accent);
  flex-shrink: 0;
  min-width: 70px;
}

.contact-address-item {
  flex-direction: column;
  gap: 12px;
}

.address-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

.address-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-btn {
  padding: 10px 18px;
  font-size: 0.88rem;
  background: var(--white);
  border: 1px solid rgba(26, 82, 118, 0.2);
  color: var(--accent);
}

.nav-btn:hover {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.contact-phone-item {
  flex-wrap: wrap;
  align-items: center;
}

.phone-number {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  font-family: "SF Mono", "Menlo", "Consolas", monospace;
}

.call-btn {
  padding: 10px 24px;
  font-size: 0.95rem;
}

.contact-qrcode {
  margin-top: 8px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.qrcode-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 4px;
}

.qrcode-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

.contact-qrcode #qrcode,
.contact-qrcode #qrcodeAddress {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.contact-qrcode #qrcode img,
.contact-qrcode #qrcodeAddress img {
  display: block;
  max-width: 100%;
}

.contact-map-info {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-map-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
}

.map-hint {
  color: var(--accent-light);
  font-size: 0.85rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 8px 16px;
  border: 1px solid rgba(26, 82, 118, 0.15);
  background: var(--white);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--accent);
  transition: var(--transition);
  font-weight: 500;
}

.pagination button:hover {
  background: var(--accent-bg);
}

.pagination button.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.pagination button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: transparent;
}

.glass-btn {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-primary);
  text-decoration: none;
  font-family: inherit;
}

.glass-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.glass-btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.glass-btn-primary:hover:not(:disabled) {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.glass-btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.form-message {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: none;
}

.form-message.error {
  display: block;
  background: rgba(231, 76, 60, 0.08);
  color: var(--danger);
  border: 1px solid rgba(231, 76, 60, 0.15);
}

.form-message.success {
  display: block;
  background: rgba(39, 174, 96, 0.08);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.15);
}

.site-footer {
  text-align: center;
  padding: 24px 16px;
  margin-top: 40px;
  width: 100%;
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ai-assistant-wrapper {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.ai-assistant-trigger {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(26, 82, 118, 0.3);
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.ai-assistant-trigger:active {
  transform: scale(0.95);
}

.ai-assistant-trigger .ai-trigger-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  background: var(--success);
  border: 2px solid var(--white);
  border-radius: 50%;
  animation: aiPulse 2s infinite;
}

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

.ai-assistant-panel {
  width: 400px;
  max-height: 560px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: aiSlideUp 0.3s ease;
  border-radius: var(--radius);
}

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

.ai-assistant-panel.open {
  display: flex;
}

.ai-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ai-panel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ai-panel-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.ai-panel-header-info {
  min-width: 0;
}

.ai-panel-header-info h3 {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-panel-header-info span {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.ai-panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ai-panel-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 8px;
  transition: var(--transition);
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.ai-panel-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 360px;
  background: rgba(255, 255, 255, 0.15);
  -webkit-overflow-scrolling: touch;
}

.ai-messages::-webkit-scrollbar {
  width: 4px;
}

.ai-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ai-messages::-webkit-scrollbar-thumb {
  background: rgba(26, 82, 118, 0.15);
  border-radius: 2px;
}

.ai-message {
  display: flex;
  gap: 10px;
  animation: aiMsgIn 0.3s ease;
}

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

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  font-weight: 600;
}

.ai-message.assistant .ai-message-avatar {
  background: var(--accent);
  color: var(--white);
}

.ai-message.user .ai-message-avatar {
  background: var(--accent-light);
  color: var(--white);
}

.ai-message-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 75%;
  word-break: break-word;
  position: relative;
  min-width: 0;
}

.ai-message.assistant .ai-message-bubble {
  background: rgba(26, 82, 118, 0.06);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.ai-message.user .ai-message-bubble {
  background: var(--accent);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.ai-message-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
  padding: 0 4px;
}

.ai-message.user .ai-message-time {
  text-align: right;
}

.ai-typing {
  display: none;
  padding: 0 20px 8px;
}

.ai-typing.show {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-typing .ai-message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.ai-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(26, 82, 118, 0.06);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
}

.ai-typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--accent-light);
  border-radius: 50%;
  animation: dotBounce 1.4s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-input-area {
  padding: 14px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.ai-input-area input {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  font-size: 0.88rem;
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  transition: var(--transition);
  min-width: 0;
}

.ai-input-area input:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.08);
}

.ai-input-area input::placeholder {
  color: var(--text-muted);
}

.ai-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.ai-send-btn:active {
  transform: scale(0.95);
}

.ai-send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ai-panel-footer {
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.ai-panel-footer span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ai-loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}

.ai-loading-overlay.active {
  display: flex;
}

.ai-loading-modal {
  padding: 36px 40px;
  text-align: center;
  min-width: 320px;
}

.ai-loading-modal .loading-spinner {
  width: 48px;
  height: 48px;
  border-width: 4px;
  margin-bottom: 20px;
}

.ai-loading-modal h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.ai-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--accent-bg);
  border-radius: 3px;
  margin: 16px 0;
  overflow: hidden;
}

.ai-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s ease;
}

.ai-progress-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.ai-time-remaining {
  color: var(--accent-light);
  font-weight: 600;
}

.ad-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ad-overlay.show {
  opacity: 1;
}

.ad-dialog {
  position: relative;
  width: 90%;
  max-width: 560px;
  max-height: 80vh;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: adScaleIn 0.35s ease;
}

@keyframes adScaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.ad-close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 2;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ad-close-btn:hover {
  background: rgba(0, 0, 0, 0.15);
}

.ad-content {
  padding: 36px 32px 16px;
  overflow-y: auto;
  flex: 1;
  line-height: 1.7;
  font-size: 0.95rem;
  -webkit-overflow-scrolling: touch;
}

.ad-content h2,
.ad-content h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
}

.ad-content p {
  margin-bottom: 10px;
}

.ad-content .cta-button-area {
  margin-top: 16px;
  text-align: center;
}

.ad-content .cta-button-area a,
.ad-content .cta-button-area button {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.ad-footer {
  padding: 16px 32px 24px;
  text-align: center;
}

.ad-read-btn {
  padding: 10px 36px;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.ad-read-btn:hover {
  background: rgba(255, 255, 255, 0.45);
}

@media (max-width: 1024px) {
  .header-inner {
    height: 56px;
  }

  .nav-menu a {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .section {
    padding: 24px 12px;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .hero-card {
    padding: 28px;
  }

  .hero-banner {
    margin: -28px -28px 24px;
  }

  .hero-content h2 {
    font-size: 1.6rem;
  }

  .ai-assistant-panel {
    width: 380px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 52px;
  }

  .header-info h1 {
    font-size: 1rem;
  }

  .header-info p {
    font-size: 0.72rem;
  }

  .nav-toggle {
    display: flex;
    z-index: 1001;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 72px 20px 20px;
    gap: 2px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-menu a {
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 12px;
  }

  .hero-section {
    padding: 20px 12px 16px;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-banner {
    margin: -20px -20px 20px;
  }

  .hero-content h2 {
    font-size: 1.4rem;
  }

  .hero-content h3 {
    font-size: 1rem;
  }

  .hero-hospital {
    font-size: 0.88rem;
  }

  .hero-titles {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .specialty-tag {
    padding: 6px 16px;
    font-size: 0.82rem;
  }

  .section {
    padding: 20px 12px;
  }

  .section-title {
    font-size: 1.2rem;
  }

  .about-card {
    padding: 20px;
  }

  .about-diseases ul {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
  }

  .about-diseases li {
    padding: 6px 10px;
    font-size: 0.82rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .article-card-cover {
    height: 160px;
  }

  .article-card-body {
    padding: 14px 18px 18px;
  }

  .experience-timeline {
    padding-left: 22px;
  }

  .experience-timeline::before {
    left: 7px;
  }

  .experience-timeline-dot {
    left: -19px;
    width: 10px;
    height: 10px;
  }

  .experience-card {
    padding: 16px;
    margin-bottom: 10px;
  }

  .experience-filters {
    gap: 4px;
    border-radius: 20px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .filter-btn {
    padding: 8px 12px;
    font-size: 0.78rem;
    flex: none;
    min-width: auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .message-form-card {
    padding: 16px;
  }

  .message-card {
    padding: 16px;
  }

  .contact-card {
    padding: 20px;
    gap: 16px;
  }

  .contact-item {
    font-size: 0.88rem;
  }

  .contact-phone-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .phone-number {
    font-size: 1.1rem;
  }

  .address-actions {
    flex-direction: column;
    width: 100%;
  }

  .nav-btn {
    width: 100%;
    text-align: center;
  }

  .ai-assistant-wrapper {
    bottom: 12px;
    right: 12px;
    gap: 8px;
  }

  .ai-assistant-trigger {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }

  .ai-assistant-panel {
    position: fixed;
    bottom: 68px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 130px);
    height: auto;
    border-radius: var(--radius);
  }

  .ai-messages {
    max-height: none;
    flex: 1;
    min-height: 180px;
    padding: 14px 14px;
    gap: 12px;
  }

  .ai-message-bubble {
    max-width: 82%;
    font-size: 0.84rem;
    padding: 10px 12px;
  }

  .ai-message-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
  }

  .ai-panel-header {
    padding: 12px 14px;
  }

  .ai-panel-header-info h3 {
    font-size: 0.88rem;
  }

  .ai-panel-header-info span {
    font-size: 0.7rem;
  }

  .ai-input-area {
    padding: 10px 12px;
    gap: 8px;
  }

  .ai-input-area input {
    padding: 10px 14px;
    font-size: 0.84rem;
    border-radius: 20px;
  }

  .ai-send-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .ai-panel-footer {
    padding: 6px 10px;
  }

  .ai-panel-footer span {
    font-size: 0.68rem;
  }

  .ai-typing {
    padding: 0 14px 6px;
  }

  .ai-typing-dots {
    padding: 8px 12px;
  }

  .ai-typing-dots span {
    width: 6px;
    height: 6px;
  }

  .ai-loading-modal {
    min-width: auto;
    width: 80vw;
    padding: 24px 20px;
  }

  .ad-dialog {
    width: 92%;
    max-height: 82vh;
  }

  .ad-content {
    padding: 24px 18px 12px;
    font-size: 0.88rem;
  }

  .ad-content h2,
  .ad-content h3 {
    font-size: 1.1rem;
  }

  .ad-footer {
    padding: 12px 18px 20px;
  }

  .ad-read-btn {
    padding: 8px 28px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .header-inner {
    height: 48px;
  }

  .header-brand {
    gap: 8px;
  }

  .header-avatar {
    width: 34px;
    height: 34px;
  }

  .header-info h1 {
    font-size: 0.9rem;
  }

  .header-info p {
    font-size: 0.68rem;
  }

  .hero-section {
    padding: 16px 8px 12px;
  }

  .hero-card {
    padding: 16px;
    border-radius: var(--radius-sm);
  }

  .hero-banner {
    margin: -16px -16px 16px;
  }

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .hero-content h3 {
    font-size: 0.9rem;
  }

  .hero-titles {
    font-size: 0.8rem;
  }

  .specialty-tag {
    padding: 5px 14px;
    font-size: 0.76rem;
  }

  .section {
    padding: 16px 8px;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .about-card {
    padding: 16px;
  }

  .about-diseases ul {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 4px;
  }

  .about-diseases li {
    padding: 5px 8px;
    font-size: 0.76rem;
  }

  .message-form-card {
    padding: 14px;
  }

  .form-group input[type="text"],
  .form-group input[type="tel"],
  .form-group textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .contact-card {
    padding: 16px;
    gap: 12px;
  }

  .contact-item strong {
    min-width: 56px;
    font-size: 0.85rem;
  }

  .ai-assistant-wrapper {
    bottom: 8px;
    right: 8px;
  }

  .ai-assistant-trigger {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }

  .ai-assistant-panel {
    bottom: 60px;
    right: 8px;
    left: 8px;
    max-height: calc(100vh - 110px);
    border-radius: var(--radius-sm);
  }

  .ai-messages {
    padding: 10px 10px;
    gap: 10px;
  }

  .ai-message-bubble {
    max-width: 85%;
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 12px;
  }

  .ai-message-avatar {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }

  .ai-panel-header {
    padding: 10px 12px;
  }

  .ai-panel-avatar {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

  .ai-panel-header-info h3 {
    font-size: 0.82rem;
  }

  .ai-input-area {
    padding: 8px 10px;
    gap: 6px;
  }

  .ai-input-area input {
    padding: 8px 12px;
    font-size: 0.8rem;
  }

  .ai-send-btn {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }

  .ad-dialog {
    width: 94%;
    max-height: 85vh;
    border-radius: 16px;
  }

  .ad-close-btn {
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 1.3rem;
  }

  .ad-content {
    padding: 20px 14px 10px;
    font-size: 0.84rem;
  }

  .ad-footer {
    padding: 10px 14px 16px;
  }

  .ad-read-btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .header-info h1 {
    font-size: 0.82rem;
  }

  .header-info p {
    font-size: 0.64rem;
  }

  .hero-content h2 {
    font-size: 1.1rem;
  }

  .ai-assistant-panel {
    bottom: 56px;
    right: 6px;
    left: 6px;
    max-height: calc(100vh - 100px);
  }

  .ai-message-bubble {
    max-width: 88%;
    font-size: 0.78rem;
  }
}