/* DroneGIS ヘルプページ共通スタイル */
:root {
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-subtle: rgba(0,0,0,0.08);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Noto Sans JP', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.8;
}

/* Background */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Main Content */
main {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 7rem 2rem 4rem;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: left;
}

.breadcrumb a {
    color: var(--accent-blue);
    text-decoration: none;
}

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

.breadcrumb span {
    color: var(--text-secondary);
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header .tool-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.page-header .tool-icon svg {
    width: 48px;
    height: 48px;
    color: #fff;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.page-header .tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.page-header .tool-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Table of Contents */
.toc {
    display: inline-block;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    text-align: left;
}

.toc-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ul {
    list-style: none;
}

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

.toc a {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.95rem;
}

.toc a:hover {
    text-decoration: underline;
}

/* Section */
.section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-blue);
}

.section-title svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
}

/* Feature List */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent-green);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-item span {
    font-size: 0.95rem;
}

/* Steps */
.steps {
    counter-reset: step;
}

.step {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content {
    color: var(--text-secondary);
}

.step-content ul {
    margin-top: 0.5rem;
    padding-left: 1.25rem;
}

.step-content li {
    margin-bottom: 0.25rem;
}

/* Screenshot Placeholder */
.screenshot {
    background: linear-gradient(135deg, #e2e8f0, #f1f5f9);
    border-radius: 8px;
    padding: 3rem;
    margin: 1rem 0;
    text-align: center;
    color: var(--text-muted);
    border: 2px dashed #cbd5e1;
}

.screenshot svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Screenshot with Image */
.screenshot.has-image {
    padding: 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.screenshot.has-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 7px;
}

/* Tips */
.tip {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-green);
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.tip svg {
    width: 24px;
    height: 24px;
    color: var(--accent-green);
    flex-shrink: 0;
}

.tip-content {
    font-size: 0.95rem;
}

/* Warning */
.warning {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(249, 115, 22, 0.1);
    border-left: 4px solid var(--accent-orange);
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

.warning svg {
    width: 24px;
    height: 24px;
    color: var(--accent-orange);
    flex-shrink: 0;
}

.warning-content {
    font-size: 0.95rem;
}

/* FAQ */
.faq-item {
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.25rem 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.faq-question::before {
    content: 'Q.';
    color: var(--accent-blue);
    font-weight: 700;
}

.faq-answer {
    color: var(--text-secondary);
    padding-left: 1.5rem;
}

.faq-answer::before {
    content: 'A.';
    color: var(--accent-green);
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Troubleshooting */
.trouble-item {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.trouble-problem {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--accent-red);
    margin-bottom: 0.75rem;
}

.trouble-problem svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.trouble-solution {
    padding-left: 1.75rem;
    color: var(--text-secondary);
}

.trouble-solution strong {
    color: var(--accent-green);
}

/* Related Tools */
.related-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.related-tool {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.related-tool:hover {
    border-color: var(--accent-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.related-tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.related-tool-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.related-tool-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.related-tool-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    main {
        padding: 6rem 1rem 3rem;
    }

    .section {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .step {
        padding-left: 3rem;
    }

    .step::before {
        width: 2rem;
        height: 2rem;
        font-size: 0.9rem;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

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

}

/* Index Page Specific */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.help-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.help-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
}

.help-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.help-card-icon svg {
    width: 28px;
    height: 28px;
    color: #fff;
}

.help-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.help-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.help-card-arrow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--accent-blue);
    font-size: 0.9rem;
    font-weight: 500;
}

.help-card-arrow svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.help-card:hover .help-card-arrow svg {
    transform: translateX(4px);
}

/* Category Colors */
.help-card.coord .help-card-icon { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.help-card.kml .help-card-icon { background: linear-gradient(135deg, #f97316, #eab308); }
.help-card.image .help-card-icon { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.help-card.data .help-card-icon { background: linear-gradient(135deg, #10b981, #14b8a6); }
