/* =======================================
   FCX Doc Tools - Blog Premium Stylesheet
   Design: Modern SaaS Dark Mode
   ======================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* === CSS Variables === */
:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #1c2128;
  --bg-card-hover: #21262d;
  --border: #30363d;
  --border-accent: rgba(0, 229, 255, 0.3);

  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;

  --accent-cyan: #00e5ff;
  --accent-blue: #2196f3;
  --accent-blue-dark: #1565c0;
  --accent-glow: rgba(33, 150, 243, 0.25);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(33, 150, 243, 0.2);
}

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

/* === Reading Progress Bar === */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  z-index: 10000;
  transition: width 0.1s ease;
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* === Navigation Bar === */
.blog-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.blog-nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.blog-nav-logo span {
  font-size: 1.3rem;
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}

.blog-nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.blog-nav-cta {
  background: linear-gradient(135deg, var(--accent-blue), #3f51b5) !important;
  color: white !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 10px rgba(33, 150, 243, 0.3);
}

.blog-nav-cta:hover {
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.5) !important;
  transform: translateY(-1px);
}

/* === Hero Header === */
.article-hero {
  background: linear-gradient(160deg, #0d1117 0%, #0a1929 40%, #0d1f3c 100%);
  border-bottom: 1px solid var(--border);
  padding: 60px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(
    ellipse,
    rgba(33, 150, 243, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.article-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-cyan),
    transparent
  );
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.3);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.article-hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  margin-top: 20px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb-sep {
  opacity: 0.4;
}

/* === Main Layout === */
.page-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

@media (max-width: 900px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

/* === Article Body === */
article {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 600px) {
  article {
    padding: 24px 20px;
  }
}

article p {
  color: rgba(230, 237, 243, 0.85);
  margin-bottom: 1.4rem;
  font-size: 1.05rem;
  line-height: 1.85;
}

article h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  position: relative;
}

article h2::before {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 1px;
}

article h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 0.8rem;
}

article ul,
article ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: rgba(230, 237, 243, 0.85);
}

article li {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

article strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* === CTA Box === */
.cta-box {
  background: linear-gradient(
    135deg,
    rgba(33, 150, 243, 0.08),
    rgba(0, 229, 255, 0.05)
  );
  border: 1px solid rgba(33, 150, 243, 0.25);
  border-left: 4px solid var(--accent-blue);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 2rem 0;
}

.cta-box h3 {
  margin-top: 0 !important;
  color: #64b5f6 !important;
  font-size: 1.05rem !important;
}

.cta-box ul,
.cta-box ol {
  margin-bottom: 0;
}

/* === Info Box === */
.info-box {
  background: rgba(255, 193, 7, 0.06);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-left: 4px solid #ffc107;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  color: rgba(230, 237, 243, 0.8);
}

/* === CTA Button Large === */
.btn-cta-wrap {
  text-align: center;
  margin: 3rem 0 1rem;
}

.btn-large {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent-blue), #1565c0);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow:
    0 4px 20px rgba(33, 150, 243, 0.4),
    0 0 40px rgba(33, 150, 243, 0.1);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-large::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.btn-large:hover {
  transform: translateY(-3px);
  box-shadow:
    0 8px 30px rgba(33, 150, 243, 0.55),
    0 0 60px rgba(33, 150, 243, 0.15);
}

.btn-large:hover::before {
  opacity: 1;
}

/* === Sidebar === */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 80px;
}

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.sidebar-card h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.sidebar-tool-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  background: rgba(33, 150, 243, 0.08);
  border: 1px solid rgba(33, 150, 243, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.sidebar-tool-btn:last-child {
  margin-bottom: 0;
}

.sidebar-tool-btn:hover {
  background: rgba(33, 150, 243, 0.15);
  border-color: rgba(33, 150, 243, 0.4);
  transform: translateX(3px);
}

.sidebar-tool-btn .icon {
  font-size: 1.2rem;
  width: 28px;
  text-align: center;
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  margin-bottom: 10px;
}

.related-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  transition: color 0.2s;
}

.related-list a::before {
  content: "→";
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 1px;
}

.related-list a:hover {
  color: var(--text-primary);
}

/* === Footer === */
.blog-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.blog-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}

.blog-footer a:hover {
  color: var(--text-primary);
}

.blog-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

/* === Responsive === */
@media (max-width: 600px) {
  .blog-nav-links {
    display: none;
  }
  .article-hero {
    padding: 40px 16px 32px;
  }
  .page-layout {
    padding: 20px 16px;
  }
}

/* === Animations === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-hero h1,
.article-meta {
  animation: fadeInUp 0.5s ease both;
}
.article-hero h1 {
  animation-delay: 0.1s;
}
.article-meta {
  animation-delay: 0.2s;
}
article {
  animation: fadeInUp 0.5s ease 0.25s both;
}
