﻿/* ========== CSS Variables ========== */
:root {
  --primary: #111111;
  --primary-light: #555555;
  --accent: #0056b3;
  --accent-light: #3380cc;
  --bg: #ffffff;
  --bg-light: #f9fafb;
  --bg-muted: #f3f4f6;
  --text: #222222;
  --text-light: #6b7280;
  --text-white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 6px;
  --radius-sm: 4px;
  --transition: 0.2s ease;
  --sans: 'Times New Roman', serif;
  --heading: 'Times New Roman', serif;
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

/* English default: Times New Roman */
html[lang="en"] body { font-family: 'Times New Roman', serif; }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3,
html[lang="en"] .navbar-brand, html[lang="en"] .hero-subtitle,
html[lang="en"] .stat-count, html[lang="en"] .page-header h1 {
  font-family: 'Times New Roman', serif;
}

/* Chinese: SimSun / 宋体 */
html[lang="zh"] body { font-family: 'SimSun', '宋体', 'Times New Roman', serif; }
html[lang="zh"] h1, html[lang="zh"] h2, html[lang="zh"] h3,
html[lang="zh"] .navbar-brand, html[lang="zh"] .hero-subtitle,
html[lang="zh"] .stat-count, html[lang="zh"] .page-header h1 {
  font-family: 'SimSun', '宋体', 'Times New Roman', serif;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ========== Container ========== */
.container {
  width: 100%;
  max-width: 930px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 56px 0; }

/* ========== Navbar — Left Sidebar ========== */
.navbar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 220px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 20px 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  z-index: 100;
  overflow-y: auto;
}

.navbar-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  padding: 12px 20px 20px;
  text-decoration: none;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.navbar-brand:hover { text-decoration: none; }

.navbar-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 12px 0;
  flex: 1;
}

.navbar-links a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.navbar-links a:hover {
  background: var(--bg-light);
  color: var(--text);
  text-decoration: none;
  border-left-color: var(--border);
}

.navbar-links a.active {
  background: var(--bg-light);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}

.lang-item { padding: 8px 20px; margin-top: auto; }

.lang-switcher {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  color: var(--text-light);
  transition: var(--transition);
  width: 100%;
  text-align: center;
}

.lang-switcher:hover { background: var(--bg-light); color: var(--text); }

.menu-toggle { display: none; }

/* Push content right of sidebar */
main {
  margin-left: 220px;
}

.footer {
  margin-left: 220px;
}

/* ========== Hero Banner ========== */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  background: url('../img/background.jpg') center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-bottom: none;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0) 60%);
  z-index: 1;
}

.hero h1,
.hero .btn,
.hero .hero-actions {
  position: relative;
  z-index: 2;
  color: #ffffff !important;
}
.hero p,
.hero span,
.hero .hero-subtitle,
.hero .hero-info {
  position: relative;
  z-index: 2;
}

.hero .btn-primary {
  background: var(--primary);
  color: #fff !important;
}

.hero .btn-primary:hover {
  background: #333;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 64px 24px;
  max-width: 720px;
  text-align: center;
}

.hero h1 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 20px;
  margin-bottom: 24px;
  font-style: italic;
}

.hero-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 15px;
  margin-bottom: 32px;
}

.hero-info span { display: flex; align-items: center; gap: 6px; }

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* Overlay conference text on hero */
.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
}

/* 方案二：经典皇家庄重风 Logo（改进版） */
.logo-classic {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  margin-bottom: 20px;
}
.logo-title {
  font-family: "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: 40px;
  color: #ffd700 !important;
  letter-spacing: 6px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.logo-year {
  font-family: "Times New Roman", Georgia, serif;
  font-weight: 700;
  font-size: 24px;
  color: #fff !important;
  letter-spacing: 8px;
  margin-top: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-conf {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.95) !important;
  margin-bottom: 10px;
  line-height: 1.4;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}
.hero-date {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.9) !important;
  letter-spacing: 1px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-white);
}

.btn-primary:hover {
  background: #333333;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  background: var(--bg-light);
  border-color: var(--primary);
  text-decoration: none;
}

.btn-lg { padding: 12px 32px; font-size: 16px; }

/* ========== Stats Bar ========== */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 32px 24px;
  margin: -32px auto 0;
  max-width: 760px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  z-index: 2;
}

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

.stat-icon { font-size: 28px; margin-bottom: 4px; }

.stat-count {
  font-family: var(--heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label { font-size: 13px; color: var(--text-light); margin-top: 2px; }

/* ========== Page Header ========== */
.page-header {
  text-align: center;
  padding: 56px 24px 40px;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-family: var(--heading);
  font-size: 34px;
  color: var(--primary);
  margin-bottom: 8px;
}

.page-header p { font-size: 16px; color: var(--text-light); max-width: 560px; margin: 0 auto; }

/* ========== Typography ========== */
h2 {
  font-family: var(--heading);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 16px;
}

h3 {
  font-size: 17px;
  color: var(--primary);
  margin-bottom: 8px;
}

.intro-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.8;
  text-align: justify;
}

/* ========== Topics Grid ========== */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.topic-tag {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  transition: var(--transition);
}

.topic-tag:hover { background: var(--bg-light); border-color: var(--text-light); }

/* ========== Dates Timeline ========== */
.dates-timeline { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.date-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: var(--transition);
}

.date-item:hover { background: var(--bg-light); }

.date-item.highlight { border-color: var(--primary); background: var(--bg-light); }

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

.date-info { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }

.date-info strong { font-size: 15px; color: var(--primary); }

.date-info span { font-size: 14px; color: var(--text-light); }

.date-ext { font-size: 12px; color: var(--accent); font-style: normal; margin-left: 4px; }

/* ========== Guidelines List ========== */
.guidelines-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  padding-left: 20px;
  list-style: disc;
}

.guidelines-list li {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
}

/* ========== Schedule Table ========== */
.schedule-table-wrapper { overflow-x: auto; margin-top: 12px; }

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.schedule-table thead { background: var(--bg-light); }

.schedule-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}

.schedule-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.schedule-table tbody tr:hover { background: var(--bg-light); }

.time-col { color: var(--text-light); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ========== Speakers Detail ========== */
.speaker-detail {
  display: flex;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  background: var(--bg);
  transition: var(--transition);
}

.speaker-detail:hover { box-shadow: var(--shadow); }

.speaker-detail-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 20px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.speaker-detail-info { flex: 1; }

.speaker-detail-info h3 { font-size: 18px; color: var(--primary); margin-bottom: 4px; }

.speaker-affiliation { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.speaker-title { font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 10px; font-style: italic; }

.speaker-abstract, .speaker-bio {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ========== News List ========== */
.news-list { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }

.news-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--bg-light);
  transition: var(--transition);
}

.news-list-item:hover { background: var(--bg-light); padding-left: 8px; padding-right: 8px; margin: 0 -8px; border-radius: var(--radius-sm); }

.news-list-item a {
  font-size: 15px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}

.news-list-item a:hover { color: var(--accent); text-decoration: underline; }

.news-date { font-size: 13px; color: var(--text-light); white-space: nowrap; margin-left: 16px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }

.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-decoration: none;
  color: var(--text);
}

.pagination a:hover { background: var(--bg-light); }

.pagination .current { background: var(--primary); color: var(--text-white); border-color: var(--primary); }

.pagination .disabled { color: var(--border); }

/* ========== News Detail ========== */
.news-detail { max-width: 720px; margin: 0 auto; }

.news-detail h2 { font-family: var(--heading); font-size: 28px; color: var(--primary); margin-bottom: 8px; }

.news-detail-meta { font-size: 14px; color: var(--text-light); margin-bottom: 20px; }

.news-detail-body { font-size: 16px; color: var(--text); line-height: 1.9; }

.news-detail-body p { margin-bottom: 14px; }

.news-detail-body img { margin: 16px 0; border-radius: var(--radius-sm); }

.news-back-link {
  display: inline-block;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
}

.news-back-link:hover { text-decoration: underline; }

/* ========== Registration Form ========== */
.registration-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

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

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label { font-size: 14px; font-weight: 600; color: var(--primary); }

.required { color: #dc2626; }

.form-group input, .form-group select, .form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--sans);
  background: var(--bg);
  transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}

.success-message { text-align: center; padding: 48px 24px; }

/* ========== Contact ========== */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 24px; }

.contact-card {
  text-align: center;
  padding: 28px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: var(--transition);
}

.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.contact-card h3 { font-size: 15px; color: var(--primary); margin-bottom: 6px; }

.contact-card p { font-size: 14px; color: var(--text-light); word-break: break-all; }

/* ========== Footer ========== */
.footer {
  margin-top: 48px;
  padding: 32px 24px;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-content { max-width: 560px; margin: 0 auto; }

.footer p { font-size: 14px; color: var(--text-light); }

.footer-organizer { margin-top: 6px; font-size: 13px; color: var(--text-light); white-space: pre-line; }

/* ========== Overview Section ========== */
.overview h2 { text-align: center; }

.overview p {
  max-width: 720px;
  margin: 0 auto;
  text-align: justify;
  line-height: 1.9;
}

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .container { padding: 0 20px; }
  .hero h1 { font-size: 26px; }
  .hero-subtitle { font-size: 17px; }
  .hero-info { flex-direction: column; gap: 8px; align-items: center; }
  .stats-bar { flex-wrap: wrap; gap: 24px; margin: -24px 16px 0; }
  .topics-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header h1 { font-size: 28px; }
  .news-list-item { flex-direction: column; align-items: flex-start; gap: 4px; }
  .news-date { margin-left: 0; }

  /* Sidebar → top bar */
  .navbar {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: 56px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .navbar-brand {
    padding: 0;
    border-bottom: none;
    font-size: 18px;
  }
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
  }
  .menu-icon { font-size: 20px; }
  .navbar-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: 220px;
    background: var(--bg);
    flex-direction: column;
    padding: 8px;
    border-right: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 99;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a {
    padding: 10px 16px;
    width: 100%;
    border-left: 3px solid transparent;
  }
  .navbar-links a.active {
    background: var(--bg-light);
    border-left-color: var(--primary);
  }
  .lang-item { margin-top: auto; padding: 8px 16px; }

  main { margin-left: 0; }
  .footer { margin-left: 0; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 22px; }
  .hero { aspect-ratio: 16 / 9; }
  .hero-info { font-size: 14px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .stats-bar { flex-direction: column; margin: -20px 12px 0; }
  .speaker-detail { flex-direction: column; align-items: flex-start; padding: 20px; }
  .speaker-detail-avatar { width: 44px; height: 44px; font-size: 16px; }
  .org-aff { text-align: left; }
  .registration-form { padding: 20px; }
  .page-header { padding: 40px 16px 28px; }
  .page-header h1 { font-size: 24px; }
  .footer { margin-top: 40px; }
  .news-detail h2 { font-size: 22px; }
  .section { padding: 40px 0; }
}

/* ========== Organization Cards ========== */
.org-section h2 {
  font-size: 18px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--sans);
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.org-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 4px;
  background: var(--bg);
  transition: all 0.25s ease;
}

.org-card:hover {
  background: var(--bg-light);
  border-color: var(--text-light);
  transform: translateX(4px);
}

.org-card-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.org-card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.org-card-aff {
  font-size: 14px;
  color: var(--text-light);
  text-align: right;
}

@media (max-width: 640px) {
  .org-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px; }
  .org-card-aff { text-align: left; }
}
