/* ============================================
   XToolsPro3 Documentation - Design System
   ============================================ */

:root {
    /* Core Colors - Dark Theme with X Blue accent */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-elevated: #1e1e2a;

    /* Text Colors */
    --text-primary: #f4f4f6;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;

    /* Brand Colors - X Blue */
    --accent-primary: #1d9bf0;
    --accent-secondary: #1a8cd8;
    --accent-glow: rgba(29, 155, 240, 0.3);
    --accent-subtle: rgba(29, 155, 240, 0.1);

    /* Status Colors */
    --success: #00c853;
    --success-bg: rgba(0, 200, 83, 0.1);
    --warning: #ffc107;
    --warning-bg: rgba(255, 193, 7, 0.1);
    --error: #ff5252;
    --error-bg: rgba(255, 82, 82, 0.1);
    --info: #29b6f6;
    --info-bg: rgba(41, 182, 246, 0.1);

    /* Borders & Lines */
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(29, 155, 240, 0.3);

    /* Spacing */
    --sidebar-width: 280px;
    --content-max-width: 900px;

    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
}

/* ============================================
   Base Styles
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 2rem;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   Sidebar Navigation
   ============================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1rem;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version-badge {
    padding: 0.25rem 0.5rem;
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
}

.nav-section {
    padding: 1rem 0;
}

.nav-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--accent-subtle);
}

.nav-link.active {
    color: var(--accent-primary);
    background: var(--accent-subtle);
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-link:hover .nav-icon,
.nav-link.active .nav-icon {
    opacity: 1;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.support-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.support-link:hover {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-glow), transparent),
        radial-gradient(ellipse 60% 40% at 80% 50%, rgba(29, 155, 240, 0.1), transparent);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-highlight), transparent);
}

.hero-content {
    position: relative;
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--accent-subtle);
    border: 1px solid var(--border-highlight);
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    font-family: var(--font-mono);
    animation: fadeInUp 0.6s ease-out;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-x {
    color: var(--accent-primary);
    text-shadow: 0 0 40px var(--accent-glow);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(29, 155, 240, 0.4);
}

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 155, 240, 0.5);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--text-muted);
}

.hero-actions-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-free-link {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.hero-free-link:hover {
    color: var(--accent-primary);
}

/* ============================================
   Features Section
   ============================================ */

.features-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-subtle);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
    padding: 4rem 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
}

.content-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-number {
    width: 28px;
    height: 28px;
    background: var(--accent-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.content-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.content-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Inline Text Links (本文中のリンク) — ダーク背景でも読める明るいX Blue */
.content-section a:not([class]) {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}

.content-section a:not([class]):hover {
    color: #6cc5f7;
}

/* Info Boxes */
.info-box {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.info-box-blue {
    border-color: var(--border-highlight);
    background: var(--accent-subtle);
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.info-box-content {
    padding: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 500;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    background: var(--accent-primary);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.download-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
}

/* Steps List */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.step-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-icon {
    width: 24px;
    height: 24px;
    background: var(--accent-subtle);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.step-content strong {
    color: var(--text-primary);
}

.step-content ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.step-content li {
    margin-bottom: 0.25rem;
}

.hint {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Code Styling */
code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.2em 0.4em;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--accent-primary);
}

/* Lists */
.numbered-list {
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.numbered-list li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.numbered-list strong {
    color: var(--text-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
}

.feature-list strong {
    color: var(--text-primary);
}

/* Highlight Box */
.highlight-box {
    background: var(--accent-subtle);
    border: 1px solid var(--border-highlight);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.highlight-box p {
    color: var(--text-primary);
    margin: 0;
}

.highlight-box ol,
.highlight-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Warning Box */
.warning-box {
    background: var(--warning-bg);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-top: 1rem;
}

.warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--warning);
    margin-bottom: 0.75rem;
}

.warning-box ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.warning-box li {
    margin-bottom: 0.25rem;
}

.warning-box strong {
    color: var(--text-primary);
}

/* Success Box */
.success-box {
    background: var(--success-bg);
    border: 1px solid rgba(0, 200, 83, 0.3);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.success-box ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.success-box li {
    margin-bottom: 0.25rem;
}

.success-box strong {
    color: var(--text-primary);
}

/* Screenshot Container */
.screenshot-container {
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    max-width: 600px;
}

.screenshot {
    width: 100%;
    max-height: 400px;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform var(--transition-normal);
    cursor: zoom-in;
}

.screenshot:hover {
    transform: scale(1.01);
}

/* 小さい画像用 */
.screenshot-container.small {
    max-width: 400px;
}

/* 中サイズ画像用 */
.screenshot-container.medium {
    max-width: 500px;
}

/* 大きい画像用（フル幅が必要な場合） */
.screenshot-container.large {
    max-width: 800px;
}

.screenshot-caption {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Image Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    cursor: zoom-out;
    animation: lightboxFadeIn 0.15s ease-out;
}
.image-lightbox.is-open {
    display: flex;
}
@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.image-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: zoom-out;
}
.image-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.image-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}
.image-lightbox__caption {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    max-width: 80%;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 4px;
    text-align: center;
}

/* Show More Button */
.show-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    color: var(--accent-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.show-more-btn:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.show-more-chevron {
    transition: transform 0.2s;
}

/* Lightbox for screenshots */
.screenshot-container.clickable {
    cursor: pointer;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.menu-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
}

.menu-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.menu-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.status-queued .status-badge {
    background: var(--info-bg);
    color: var(--info);
}

.status-posted .status-badge {
    background: var(--success-bg);
    color: var(--success);
}

.status-failed .status-badge {
    background: var(--error-bg);
    color: var(--error);
}

.status-scheduled .status-badge {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

.column h4 {
    margin-top: 0;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table td {
    color: var(--text-secondary);
}

.data-table td strong {
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

/* File Badges */
.file-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-right: 0.5rem;
}

/* Format Badges */
.format-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.format-badge {
    padding: 0.375rem 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.format-badge.highlight {
    background: var(--accent-subtle);
    border-color: var(--border-highlight);
    color: var(--accent-primary);
}

/* Troubleshooting */
.trouble-item {
    background: var(--bg-tertiary);
    border-radius: 8px;
    overflow: hidden;
}

.trouble-symptom {
    padding: 1rem;
    background: rgba(255, 82, 82, 0.1);
    border-left: 3px solid var(--error);
}

.trouble-solution {
    padding: 1rem;
}

.trouble-solution ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.trouble-solution li {
    margin-bottom: 0.25rem;
}

.trouble-solution strong {
    color: var(--text-primary);
}

/* ============================================
   Footer
   ============================================ */

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    text-align: center;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .hero {
        padding: 5rem 1.5rem 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }

    .features-section,
    .content-section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .two-column {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .status-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-description br {
        display: none;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Latest Update Box (Hero Section)
   ============================================ */

.latest-update-box {
    margin-top: 3rem;
    margin-left: auto;
    margin-right: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    max-width: 580px;
    text-align: left;
}

.latest-update-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.latest-update-version {
    background: var(--accent-primary);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-left: auto;
}

.latest-update-content {
    color: var(--text-secondary);
}

.latest-update-date {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.latest-update-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.latest-update-list li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.latest-update-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.latest-update-link {
    display: inline-block;
    color: var(--accent-primary);
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition-fast);
}

.latest-update-link:hover {
    text-decoration: underline;
}

/* ============================================
   Update History Section
   ============================================ */

.update-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.update-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.update-toggle {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.update-toggle:hover {
    background: var(--bg-tertiary);
}

.update-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.update-version {
    background: var(--accent-subtle);
    color: var(--accent-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: var(--font-mono);
}

.update-date {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.update-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.update-badge-new {
    background: var(--success);
    color: white;
}

.update-summary {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.9rem;
    min-width: 200px;
}

.update-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.update-toggle.active .update-chevron {
    transform: rotate(180deg);
}

.update-details {
    display: none;
    padding: 0 1.25rem 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.update-details.show {
    display: block;
}

.update-details ul {
    list-style: none;
    padding: 1rem 0 0 0;
    margin: 0;
}

.update-details li {
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.update-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

@media (max-width: 640px) {
    .update-toggle {
        flex-direction: column;
        align-items: flex-start;
    }

    .update-summary {
        width: 100%;
        margin-top: 0.25rem;
    }

    .update-chevron {
        position: absolute;
        right: 1rem;
        top: 1rem;
    }

    .latest-update-box {
        max-width: 100%;
    }
}

/* ============================================
   Diagram Components - Common Settings Section
   ============================================ */

/* Architecture Diagram Container */
.diagram-architecture {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

/* Diagram Card */
.diagram-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    position: relative;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.diagram-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px 10px 0 0;
}

.diagram-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.diagram-card--regular::before {
    background: linear-gradient(90deg, var(--accent-primary), #4fc3f7);
}

.diagram-card--scheduled::before {
    background: linear-gradient(90deg, var(--warning), #ffca28);
}

.diagram-card--random::before {
    background: linear-gradient(90deg, var(--success), #69f0ae);
}

.diagram-card--follow::before {
    background: linear-gradient(90deg, #ab47bc, #ce93d8);
}

/* Diagram Card Header */
.diagram-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.diagram-card-header svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.diagram-card--regular .diagram-card-header svg { color: var(--accent-primary); }
.diagram-card--scheduled .diagram-card-header svg { color: var(--warning); }
.diagram-card--random .diagram-card-header svg { color: var(--success); }
.diagram-card--follow .diagram-card-header svg { color: #ab47bc; }

.diagram-card-header strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Diagram Card Params */
.diagram-card-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

/* Queue Badge */
.queue-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.queue-badge--yes {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.queue-badge--no {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

/* Diagram Arrow */
.diagram-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    gap: 0.25rem;
}

.diagram-arrow svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.diagram-arrow-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Account Group */
.diagram-account-group {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.diagram-account {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.diagram-account svg {
    width: 14px;
    height: 14px;
    color: var(--accent-primary);
}

/* Flow Chart */
.diagram-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.diagram-flow-step {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    text-align: center;
    min-width: 120px;
    transition: all var(--transition-normal);
}

.diagram-flow-step:hover {
    border-color: var(--border-highlight);
    background: var(--bg-elevated);
}

.diagram-flow-step--highlight {
    border-color: var(--accent-primary);
    background: var(--accent-subtle);
}

.diagram-flow-connector {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--accent-primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Flow Branch */
.diagram-flow-branch {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.diagram-flow-branch-item {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.diagram-flow-branch-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.diagram-flow-branch-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Flow Split-Merge (分岐→合流) */
.diagram-flow-split {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Comparison Grid */
.diagram-comparison {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

/* Parameter Tags */
.param-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.param-tag--interval {
    background: rgba(29, 155, 240, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(29, 155, 240, 0.3);
}

.param-tag--queue {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(0, 200, 83, 0.3);
}

.param-tag--time {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.param-tag--image {
    background: rgba(171, 71, 188, 0.15);
    color: #ce93d8;
    border: 1px solid rgba(171, 71, 188, 0.3);
}

.param-tag--follow {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(255, 82, 82, 0.3);
}

/* Important Points Section */
.important-points {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.important-point-card {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--warning-bg);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    align-items: flex-start;
}

.important-point-number {
    width: 32px;
    height: 32px;
    background: var(--warning);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.important-point-content {
    flex: 1;
}

.important-point-content strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.important-point-content p,
.important-point-content ul {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.important-point-content ul {
    padding-left: 1.25rem;
    margin-top: 0.35rem;
}

.important-point-content li {
    margin-bottom: 0.2rem;
}

/* Troubleshoot Checklist */
.troubleshoot-checklist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.troubleshoot-checklist li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.troubleshoot-checklist li::before {
    content: '☐';
    color: var(--accent-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ============================================
   Diagram Responsive
   ============================================ */

@media (max-width: 768px) {
    .diagram-architecture {
        grid-template-columns: repeat(2, 1fr);
    }

    .diagram-comparison {
        grid-template-columns: 1fr;
    }

    .diagram-flow {
        flex-direction: column;
        gap: 0;
    }

    .diagram-flow-connector {
        transform: rotate(90deg);
        padding: 0.25rem 0;
    }

    .diagram-flow-branch {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .diagram-architecture {
        grid-template-columns: 1fr;
    }

    .important-point-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .important-point-content ul {
        text-align: left;
    }
}

/* 情報ボックスの「項目名｜値」: スマホでは項目名が細く1文字ずつ折り返すため縦並びにする（2026-10-24） */
@media (max-width: 640px) {
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* 開け閉めできるカード（details.doc-toggle・2026-10-24） */
.doc-toggle > summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
    justify-content: space-between;
}
.doc-toggle > summary::-webkit-details-marker { display: none; }
.doc-toggle > summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.6rem;
    height: 0.6rem;
    border-right: 2px solid var(--text-secondary);
    border-bottom: 2px solid var(--text-secondary);
    transform: rotate(45deg);
    margin: 0 0.25rem 0.25rem 0;
    transition: transform var(--transition-fast);
}
.doc-toggle[open] > summary::after { transform: rotate(-135deg); margin-bottom: -0.25rem; }
.doc-toggle > summary:hover { color: var(--accent-primary); }
.doc-toggle > summary:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 4px; border-radius: 4px; }
.doc-toggle[open] > summary { margin-bottom: 1rem; }

.table-scroll { overflow-x: auto; }
.table-scroll .data-table { margin: 0.5rem 0; }
.usecase-table td:nth-child(n+3), .usecase-table th:nth-child(n+3) { text-align: center; white-space: nowrap; }
.usecase-table td:nth-child(2) { white-space: nowrap; }
.content-card p.table-note { font-size: 0.8125rem; color: var(--text-muted); }

/* 通信量シミュレーター（#proxy-simulator） */
.sim { display: grid; gap: 1.25rem; }
.sim-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
    padding: 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.sim-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.sim-field-wide { grid-column: 1 / -1; }
.sim-field label { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); }
.sim-field select,
.sim-field input[type="number"] {
    width: 100%;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    font: inherit;
    font-size: 0.95rem;
}
.sim-field select:focus,
.sim-field input:focus { outline: 2px solid var(--accent-primary); outline-offset: 1px; }
.sim-field input:disabled { opacity: 0.45; cursor: not-allowed; }
.sim-range { display: flex; align-items: center; gap: 0.75rem; }
.sim-range input[type="range"] { flex: 1; min-width: 0; accent-color: var(--accent-primary); }
.sim-range input[type="number"] { width: 5.5rem; flex: none; }
.sim-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.sim-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}
.sim-stat-main { border-color: var(--border-highlight); background: var(--accent-subtle); }
.sim-stat-label { font-size: 0.8rem; color: var(--text-secondary); }
.sim-stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.content-card p.sim-verdict { margin: 0; color: var(--text-primary); font-weight: 600; }
.sim-plans td { font-variant-numeric: tabular-nums; }
.sim-plans td:first-child, .sim-plans td:nth-child(2) { white-space: nowrap; }
.sim-plans tr.sim-fit td { background: var(--success-bg); }
.sim-plans tr.sim-fit td:first-child strong::after { content: " ✓"; color: var(--success); }
.sim-plans .sim-yen { display: block; font-size: 0.8rem; color: var(--text-muted); }
.sim-notes { margin-top: 1rem; font-size: 0.85rem; }

.doc-toggle-body > ul,
.sim-notes { padding-left: 1.25rem; }

/* 横スクロール枠の中の表は、スマホでも表として並べる（.data-table の display:block を打ち消す） */
@media (max-width: 768px) {
    .table-scroll .data-table { display: table; }
    .table-scroll .data-table th,
    .table-scroll .data-table td { padding: 0.6rem 0.6rem; }
    .usecase-table { min-width: 520px; }
}

@media (max-width: 640px) {
    .sim-inputs, .sim-stats { grid-template-columns: 1fr; }
    .sim-inputs { padding: 1rem; }
    .sim-stat-value { font-size: 1.35rem; }
}

/*
Version History
- ver1.1 | 2026-08-05 | 本文中のインラインリンク（クラス無しa要素）にX Blue(#1d9bf0)+下線のスタイルを追加（ダーク背景でブラウザ既定の濃紺リンクが見づらい問題の修正）
- ver1.2 | 2026-08-28 | 無料版お試しCTA用の .btn-free（緑#22c55e系ボタン）と .hero-actions-note（ヒーローCTA直下の注意書き）を追加
- ver1.3 | 2026-08-28 | ヒーローの無料版CTAをボタンからテキストリンクへ変更: 未使用となった.btn-freeを撤去し、控えめな下線リンク .hero-free-link（hover時X Blue）を追加
- ver1.4 | 2026-10-24 | 640px 以下で .info-item を縦並びに（おすすめプロキシ表の項目名が細く折り返す問題）
- ver1.5 | 2026-10-24 | 開け閉めカード .doc-toggle（details/summary・右の矢印）、.table-scroll／.usecase-table、通信量シミュレーター .sim-*（640px 以下で1列）を追加
*/
