/* Soft Neumorphic Hub — LibreOffice Tutorial Site */
:root {
  --bg: #e8ecf1;
  --bg-raised: #eef1f6;
  --bg-inset: #dde2e9;
  --text: #2d3142;
  --text-muted: #6b7289;
  --accent: #7c6cf0;
  --accent-light: #9b8ef5;
  --accent-dark: #5e4fd4;
  --shadow-light: #ffffff;
  --shadow-dark: #c5cad4;
  --radius-card: 24px;
  --radius-pill: 999px;
  --shadow-raised: 8px 8px 20px var(--shadow-dark), -8px -8px 20px var(--shadow-light);
  --shadow-raised-sm: 4px 4px 12px var(--shadow-dark), -4px -4px 12px var(--shadow-light);
  --shadow-inset: inset 4px 4px 10px var(--shadow-dark), inset -4px -4px 10px var(--shadow-light);
  --shadow-float: 0 12px 40px rgba(124, 108, 240, 0.18), 0 4px 16px rgba(45, 49, 66, 0.08);
  --nav-height: 72px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 32px);
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

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

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

/* Header */
.site-header {
  padding: 32px 0 24px;
  text-align: center;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.site-logo:hover { color: var(--accent); }

.site-logo img { width: 48px; height: 48px; }

.site-tagline {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Neumorphic Cards */
.card {
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
  padding: 28px 32px;
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.card-inset {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow-inset);
  padding: 20px 24px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 40px 0 48px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Pill Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
}

.btn-pill-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  box-shadow: 4px 4px 14px rgba(124, 108, 240, 0.35), -2px -2px 8px rgba(255,255,255,0.6);
}

.btn-pill-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 6px 6px 20px rgba(124, 108, 240, 0.45);
}

.btn-pill-secondary {
  background: var(--bg-raised);
  color: var(--accent);
  box-shadow: var(--shadow-raised-sm);
}

.btn-pill-secondary:hover {
  color: var(--accent-dark);
  box-shadow: var(--shadow-raised);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.feature-card {
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
  padding: 28px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-raised), var(--shadow-float);
}

.feature-card img {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.feature-card .btn-pill {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* Tutorial Steps */
.tutorial-steps {
  counter-reset: step;
  list-style: none;
  margin: 24px 0;
}

.tutorial-steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 24px 20px 72px;
  margin-bottom: 16px;
  background: var(--bg-raised);
  border-radius: 16px;
  box-shadow: var(--shadow-raised-sm);
}

.tutorial-steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 2px 2px 8px rgba(124, 108, 240, 0.3);
}

.tutorial-steps li strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

/* Stats / Metrics */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.metric-box {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow-inset);
  padding: 20px;
  text-align: center;
}

.metric-box .value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.metric-box .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* News List */
.news-list { list-style: none; margin: 24px 0; }

.news-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  margin-bottom: 16px;
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-raised);
}

.news-item img { width: 56px; height: 56px; flex-shrink: 0; }

.news-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.news-item h3 a { color: var(--text); }
.news-item h3 a:hover { color: var(--accent); }

.news-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.news-excerpt { font-size: 0.9rem; color: var(--text-muted); }

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  padding: 12px 20px;
  background: var(--bg-raised);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-raised-sm);
  width: fit-content;
}

.breadcrumbs a { color: var(--accent); }
.breadcrumbs span { color: var(--text-muted); }

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

.article-header h1 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin-bottom: 12px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.article-body h2 {
  font-size: 1.3rem;
  margin: 32px 0 16px;
  color: var(--accent-dark);
}

.article-body p { margin-bottom: 16px; }

.article-body code {
  background: var(--bg-inset);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
}

.version-badge {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-inset);
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
}

/* Section */
.section { margin: 48px 0; }

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

/* Footer */
.site-footer {
  margin-top: 64px;
  padding: 40px 0 24px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.friend-links {
  margin: 24px 0;
  padding: 20px 28px;
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised-sm);
  display: inline-block;
}

.friend-links h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.friend-links ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.friend-links a { font-size: 0.9rem; }

.copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 16px;
}

/* Floating Bottom Pill Nav */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  background: var(--bg-raised);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-raised), var(--shadow-float);
  backdrop-filter: blur(12px);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  min-width: 64px;
}

.bottom-nav a img {
  width: 24px;
  height: 24px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.bottom-nav a:hover,
.bottom-nav a.active {
  color: var(--accent);
  background: var(--bg);
  box-shadow: var(--shadow-inset);
}

.bottom-nav a.active img,
.bottom-nav a:hover img { opacity: 1; }

/* Download Page */
.download-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.download-card {
  background: var(--bg-raised);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-raised);
  padding: 28px;
  text-align: center;
}

.download-card h3 { margin-bottom: 8px; }
.download-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }

/* Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 24px 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-raised-sm);
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  background: var(--bg-raised);
}

.data-table th {
  background: var(--bg-inset);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--accent-dark);
}

.data-table tr:not(:last-child) td { border-bottom: 1px solid var(--bg-inset); }

/* Responsive */
@media (max-width: 600px) {
  .bottom-nav a { padding: 8px 12px; min-width: 52px; font-size: 0.65rem; }
  .bottom-nav a span { display: none; }
  .card { padding: 20px; }
  .news-item { flex-direction: column; }
}
