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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-bg: #ecf0f1;
    --dark-bg: #34495e;
    --text-color: #2c3e50;
    --light-text: #7f8c8d;
    --border-color: #bdc3c7;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Noto Sans JP';
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

body.page-loading {
    opacity: 0;
}

/* ヘッダー */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--secondary-color);
}

/* ハンバーガーメニュー */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

/* メインコンテンツ */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    border-radius: 10px;
    margin: 3rem 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    transform: translateY(-2px);
}

/* セクション */
section {
    margin: 4rem 0;
    padding: 2rem 0;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--secondary-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* フィーチャーグリッド */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: var(--secondary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* コード例 */
.code-example {
    background-color: var(--primary-color);
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.code-example code {
    color: #ecf0f1;
}

.highlight-keyword {
    color: #3498db;
    font-weight: bold;
}

.highlight-string {
    color: #2ecc71;
}

.highlight-function {
    color: #f39c12;
}

/* サイドバー */
.sidebar {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 2rem;
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    padding: 0.5rem 0;
}

.sidebar ul li a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* テーブル */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--light-bg);
}

/* フッター */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    padding: 0.3rem 0;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc3c7;
}

/* トップに戻るボタン */
#scrollTop {
    display: none;
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 999;
    transition: all 0.3s;
}

#scrollTop:hover {
    background-color: #c0392b;
    transform: translateY(-5px);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--dark-bg);
        gap: 1rem;
        padding: 1rem;
    }

    nav.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    h2 {
        font-size: 1.5rem;
    }

    main {
        padding: 0 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* ページトランジション */
.page-section {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 新しく追加されたスタイル */
.importance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.importance-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border: 1px solid #dee2e6;
}

.importance-card h3 {
    margin-top: 0;
    font-size: 1.4em;
}

.philosophy {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.philosophy-item {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.philosophy-item h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.critical-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-color);
    padding: 50px;
    border-radius: 15px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 2px solid #dee2e6;
}

.critical-section h2 {
    font-size: 2em;
    margin-top: 0;
}

.critical-content {
    font-size: 1.1em;
    line-height: 1.8;
}

.critical-content .lead {
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 20px;
}

.critical-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.critical-list li {
    padding: 10px 0;
    font-size: 1.1em;
}

.highlight {
    background: rgba(255,255,255,0.2);
    padding: 20px;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: 600;
    margin: 20px 0;
    border-left: 5px solid #ffd700;
}

.cta-inline {
    background: rgba(255,255,255,0.15);
    padding: 25px;
    border-radius: 10px;
    margin-top: 25px;
}

.doc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.doc-links a {
    background: white;
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.doc-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.faq-item {
    background: #f8f9fa;
    padding: 25px;
    margin: 20px 0;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.faq-item h3 {
    color: var(--primary-color);
    margin-top: 0;
}

.faq-item ul, .faq-item ol {
    margin: 15px 0;
    padding-left: 25px;
}

.faq-item li {
    margin: 8px 0;
    line-height: 1.6;
}

.cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text-color);
    padding: 60px 40px;
    text-align: center;
    border-radius: 15px;
    margin: 50px 0;
    border: 2px solid #dee2e6;
}

.cta h2 {
    font-size: 2.5em;
    margin-top: 0;
}

.cta .cta-buttons {
    margin-top: 30px;
}

.cta .btn {
    background: var(--primary-color);
    color: white;
}

.cta .btn:hover {
    background: #f0f0f0;
    transform: translateY(-3px);
}
