/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100%;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: #ffffff;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

h4 {
    font-size: 1.25rem;
    margin-top: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Links */
a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

a:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Buttons */
button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2563eb;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #1a1a1a;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo {
    border-radius: 50%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger {
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: #666;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.nav-link:hover {
    color: #2563eb;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.theme-toggle:hover {
    background-color: #f3f4f6;
}

.theme-icon {
    display: block;
}

.theme-icon-dark {
    display: none;
}

/* Dark Mode */
body.dark-mode {
    background-color: #1a1a1a;
    color: #ffffff;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #ffffff;
}

body.dark-mode .header {
    background-color: rgba(26, 26, 26, 0.95);
    border-bottom-color: #374151;
}

body.dark-mode .theme-icon-light {
    display: none;
}

body.dark-mode .theme-icon-dark {
    display: block;
}

body.dark-mode .theme-toggle:hover {
    background-color: #374151;
}

/* Breadcrumb */
.breadcrumb {
    background: #f9fafb;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .breadcrumb {
    background: #374151;
    border-bottom-color: #4b5563;
}

.breadcrumb-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: #9ca3af;
}

.breadcrumb-link {
    color: #2563eb;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-current {
    color: #6b7280;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        linear-gradient(45deg, transparent 49%, rgba(255, 255, 255, 0.05) 50%, transparent 51%);
    background-size: 200px 200px, 200px 200px, 40px 40px;
    animation: float 20s ease-in-out infinite;
    opacity: 0.6;
}

.hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
    animation: rotate 60s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(20px, -20px) rotate(1deg); }
    66% { transform: translate(-20px, 20px) rotate(-1deg); }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
    line-height: 1.1;
}

.hero-text {
    max-width: 600px;
}

/* Featured Snippet */
.featured-snippet {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.featured-icon {
    color: #10b981;
}

.featured-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.featured-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.featured-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 8px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-primary {
    background: #10b981;
    color: white;
}

.cta-primary:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.cta-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cta-icon {
    flex-shrink: 0;
}

/* Trust Signals */
.trust-signals {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.trust-icon {
    color: #fbbf24;
}

/* Hero Video Local */
.hero-video-local {
    margin: 2rem 0;
}

.video-container-local {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    background: #000;
}

.hero-video-player {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* Hero Video YouTube */
.hero-video-youtube {
    margin: 1.5rem 0;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    height: 315px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.hero-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    padding: 1rem;
}

.code-snippet {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: #10b981;
}

.code-line {
    margin: 0.25rem 0;
}

/* Quick Answer Section */
.quick-answer {
    background: #f9fafb;
    padding: 3rem 0;
}

body.dark-mode .quick-answer {
    background: #374151;
}

.quick-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.quick-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #1a1a1a;
}

body.dark-mode .quick-title {
    color: #ffffff;
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.quick-summary {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: #4b5563;
}

body.dark-mode .quick-summary {
    color: #d1d5db;
}

.key-takeaways {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.dark-mode .key-takeaways {
    background: #4b5563;
}

.takeaways-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

body.dark-mode .takeaways-title {
    color: #ffffff;
}

.takeaways-list {
    list-style: none;
}

.takeaway-item {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.takeaway-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Process Diagram */
.process-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagram-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.diagram-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #2563eb;
    color: white;
    padding: 1rem;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.step-number {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.step-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem 0;
    line-height: 1.2;
}

.step-desc {
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.2;
}

.diagram-arrow {
    font-size: 1.5rem;
    color: #6b7280;
    font-weight: bold;
}

/* Table of Contents Sidebar */
.toc-sidebar {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    background: white;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 70vh;
    overflow-y: auto;
    margin-left: -240px;
    transition: margin-left 0.3s ease;
}

body.dark-mode .toc-sidebar {
    background: #374151;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.toc-sidebar:hover {
    margin-left: 0;
}

.toc-container {
    padding: 1.5rem;
}

.toc-header {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .toc-header {
    border-bottom-color: #4b5563;
}

.toc-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

body.dark-mode .toc-title {
    color: #ffffff;
}

.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

body.dark-mode .progress-bar {
    background: #4b5563;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
}

.toc-nav {
    margin: 0;
    padding: 0;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.toc-link:hover {
    background: #f3f4f6;
    color: #2563eb;
}

body.dark-mode .toc-link:hover {
    background: #4b5563;
    color: #60a5fa;
}

.toc-duration {
    font-size: 0.75rem;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
}

body.dark-mode .toc-duration {
    background: #4b5563;
    color: #9ca3af;
}

.toc-sublist {
    list-style: none;
    margin: 0.5rem 0 0 1rem;
    padding: 0;
}

.toc-subitem {
    margin-bottom: 0.25rem;
}

.toc-subitem .toc-link {
    font-size: 0.8rem;
    padding-left: 1rem;
}

/* Main Article */
.article {
    padding: 2rem 0;
    background: white;
}

body.dark-mode .article {
    background: #1a1a1a;
}

.main {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    min-width: 0;
}

/* Section Headers */
.section-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

body.dark-mode .section-header {
    border-bottom-color: #374151;
}

.section-title {
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

body.dark-mode .section-title {
    color: #ffffff;
}

.section-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.reading-time,
.difficulty {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

body.dark-mode .reading-time,
body.dark-mode .difficulty {
    background: #374151;
    color: #d1d5db;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px;
}

.section-content {
    line-height: 1.7;
}

/* Feature Lists */
.feature-list {
    list-style: none;
    margin: 1.5rem 0;
}

.feature-item {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
}

.feature-item::before {
    content: '🚀';
    position: absolute;
    left: 0;
    top: 0;
}

/* Expert Quotes */
.expert-quote {
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

body.dark-mode .expert-quote {
    background: #374151;
    border-left-color: #60a5fa;
}

.quote-author {
    margin-top: 1rem;
    font-weight: 600;
    color: #2563eb;
    font-style: normal;
}

body.dark-mode .quote-author {
    color: #60a5fa;
}

/* Comparison Tables */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.dark-mode .data-table {
    background: #374151;
}

.data-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 1px solid #e5e7eb;
}

body.dark-mode .data-table th {
    background: #4b5563;
    color: #ffffff;
    border-bottom-color: #6b7280;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

body.dark-mode .data-table td {
    border-bottom-color: #6b7280;
    color: #d1d5db;
}

.data-table tr:hover {
    background: #f9fafb;
}

body.dark-mode .data-table tr:hover {
    background: #4b5563;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.benefit-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .benefit-card {
    background: #374151;
    border-color: #4b5563;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .benefit-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    color: #2563eb;
    margin-bottom: 1rem;
}

.benefit-card h4 {
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

body.dark-mode .benefit-card h4 {
    color: #ffffff;
}

.benefit-card p {
    color: #6b7280;
    margin: 0;
}

body.dark-mode .benefit-card p {
    color: #d1d5db;
}

/* Use Cases */
.use-cases {
    margin: 2rem 0;
}

.use-case {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

body.dark-mode .use-case {
    background: #374151;
    border-color: #4b5563;
}

.use-case h4 {
    color: #2563eb;
    margin-bottom: 1rem;
}

.use-case p {
    margin-bottom: 1rem;
    color: #4b5563;
}

body.dark-mode .use-case p {
    color: #d1d5db;
}

/* Code Examples */
.code-example {
    position: relative;
    margin: 1rem 0;
}

.code-block {
    background: #1f2937;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
    position: relative;
}

.code-block pre {
    margin: 0;
    color: #f9fafb;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #374151;
    color: #d1d5db;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color 0.2s ease;
}

.copy-button:hover {
    background: #4b5563;
}

.copy-button svg {
    width: 14px;
    height: 14px;
}

/* CTA Sections */
.cta-section {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.cta-benefits {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.benefit-icon {
    color: #fbbf24;
}

.cta-actions {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.cta-main {
    background: #10b981;
    color: white;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.cta-main:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.cta-download {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.cta-download:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cta-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Newsletter Signup */
.newsletter-signup {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-signup h4 {
    margin-bottom: 0.5rem;
    color: white;
}

.newsletter-signup p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
}

.newsletter-button {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.newsletter-button:hover {
    background: #059669;
}

/* Related Articles */
.related-articles {
    background: #f9fafb;
    padding: 4rem 0;
}

body.dark-mode .related-articles {
    background: #374151;
}

.related-title {
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

body.dark-mode .related-title {
    color: #ffffff;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark-mode .related-card {
    background: #4b5563;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .related-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.related-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 1.5rem;
}

.related-content .related-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    text-align: left;
    color: #1a1a1a;
}

body.dark-mode .related-content .related-title {
    color: #ffffff;
}

.related-description {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

body.dark-mode .related-description {
    color: #d1d5db;
}

.related-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    color: #9ca3af;
}

.related-link {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.875rem;
}

.related-link:hover {
    color: #1d4ed8;
}

/* Author Section */
.author-section {
    background: white;
    padding: 4rem 0;
    border-top: 1px solid #e5e7eb;
}

body.dark-mode .author-section {
    background: #1a1a1a;
    border-top-color: #374151;
}

.author-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.author-info {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.author-avatar {
    flex-shrink: 0;
}

.avatar-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    color: #1a1a1a;
}

body.dark-mode .author-details h3 {
    color: #ffffff;
}

.author-title {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 1rem;
}

.author-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

body.dark-mode .author-description {
    color: #d1d5db;
}

.author-credentials {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.credential {
    text-align: center;
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
}

body.dark-mode .credential {
    background: #374151;
    color: #d1d5db;
}

.credential strong {
    display: block;
    font-size: 1.25rem;
    color: #2563eb;
    font-weight: 700;
}

.author-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 50%;
    color: #6b7280;
    transition: all 0.2s ease;
}

body.dark-mode .social-link {
    background: #374151;
    color: #d1d5db;
}

.social-link:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.expertise-box {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

body.dark-mode .expertise-box {
    background: #374151;
    border-color: #4b5563;
}

.expertise-box h4 {
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

body.dark-mode .expertise-box h4 {
    color: #ffffff;
}

.expertise-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.expertise-item h5 {
    color: #2563eb;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.expertise-item p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

body.dark-mode .expertise-item p {
    color: #d1d5db;
}

.trust-signals {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-signal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #059669;
}

.trust-icon {
    color: #10b981;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: #9ca3af;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.footer-description {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.footer-logo {
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    font-size: 0.875rem;
}

.footer-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #2563eb;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
    z-index: 1000;
    display: none;
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .toc-sidebar {
        position: static;
        transform: none;
        width: 100%;
        max-height: none;
        margin: 0;
        border-radius: 12px;
        margin-bottom: 2rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .author-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    body.dark-mode .nav-menu {
        background: #1a1a1a;
        border-top-color: #374151;
    }

    .nav-menu.show {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid #e5e7eb;
    }

    body.dark-mode .nav-link {
        border-bottom-color: #374151;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .cta-button {
        width: 100%;
        justify-content: center;
        max-width: 300px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .diagram-container {
        gap: 0.5rem;
    }

    .diagram-step {
        width: 100px;
        height: 100px;
    }

    .step-number {
        font-size: 1.25rem;
    }

    .step-title {
        font-size: 0.75rem;
    }

    .step-desc {
        font-size: 0.625rem;
    }

    .trust-signals {
        justify-content: center;
    }

    .cta-benefits {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .author-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .author-credentials {
        justify-content: center;
    }

    .expertise-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .featured-snippet {
        padding: 1rem;
    }

    .featured-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 0.75rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-button {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .header,
    .toc-sidebar,
    .footer,
    .back-to-top,
    .cta-section,
    .related-articles,
    .author-section {
        display: none;
    }

    .main {
        grid-template-columns: 1fr;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .hero {
        background: none;
        color: #000;
        padding: 1rem 0;
    }

    .hero-title {
        color: #000;
    }

    .code-block {
        background: #f5f5f5;
        border: 1px solid #ccc;
    }

    .code-block pre {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .data-table {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .data-table th {
        background: #f5f5f5;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
    }

    .featured-snippet {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.5);
    }

    .cta-button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .back-to-top {
        transition: none;
    }

    .benefit-card:hover,
    .related-card:hover {
        transform: none;
    }
}

/* Focus Styles for Better Accessibility */
*:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none;
}

.show {
    display: block;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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