:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --background-color: #f5f6fa;
    --text-color: #2c3e50;
    --card-background: #ffffff;
    --code-background: #2d3436;
    --heading-color: #34495e;
    --link-color: #2980b9;
    --border-radius: 8px;
    --max-width: 1600px;
    --content-width: 1400px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --base-font-size: 20px;
    --nav-height: 60px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: var(--base-font-size);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ナビゲーションバー */
nav {
    background: linear-gradient(to right, var(--primary-color), #34495e);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

nav h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(120deg, #fff, #f1f1f1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* メインコンテンツ */
main {
    max-width: var(--max-width);
    margin: 3rem auto;
    padding: 0 2rem;
    width: 100%;
}

.content {
    background-color: var(--card-background);
    padding: 3rem 4rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: var(--content-width);
    width: 100%;
}

/* 見出し */
h2 {
    color: var(--heading-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

h3 {
    color: var(--heading-color);
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    padding-left: 1rem;
    border-left: 4px solid var(--secondary-color);
}

/* カード */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--card-background);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* コードブロック */
.code-block {
    position: relative;
    margin: 1.5rem 0;
    background-color: var(--code-background);
    border-radius: var(--border-radius);
    overflow: hidden;
    width: 100%;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: calc(var(--base-font-size) - 2px);
    line-height: 1.6;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    user-select: none;
}

.copy-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.copy-button.copied {
    background-color: #27ae60;
}

/* リスト */
ul, ol {
    padding-left: 2rem;
    margin: 1rem 0;
}

li {
    margin: 0.8rem 0;
    line-height: 1.8;
    font-size: var(--base-font-size);
}

/* リンク */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ボタン */
.button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--secondary-color), #2980b9);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    font-size: var(--base-font-size);
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    color: white;
}

/* 画像 */
.image-placeholder {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
}

.image-placeholder img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.image-placeholder img:hover {
    transform: scale(1.02);
}

/* フッター */
footer {
    background: linear-gradient(to right, var(--primary-color), #34495e);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* アニメーション */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* テキスト */
p {
    margin: 1.5rem 0;
    line-height: 1.8;
    color: #444;
    font-size: var(--base-font-size);
}

strong {
    color: var(--heading-color);
    font-weight: 600;
}

.description {
    font-size: var(--base-font-size);
    margin: 1.5rem 0;
    line-height: 1.8;
}

.important-note {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-size: var(--base-font-size);
}

/* スクロールバー */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* レスポンシブデザイン */
@media (max-width: 1700px) {
    :root {
        --content-width: 90%;
    }
}

@media (max-width: 1200px) {
    :root {
        --base-font-size: 18px;
    }
    
    .content {
        padding: 2rem;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --base-font-size: 16px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-content {
        padding: 0 1rem;
    }

    nav ul {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--primary-color);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
    }

    nav ul.active {
        display: flex;
    }

    nav li {
        margin: 0.5rem 0;
    }

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

    .content {
        padding: 1.5rem;
    }

    main {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .step-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        --base-font-size: 14px;
    }

    nav h1 {
        font-size: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* アクセシビリティ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 印刷用スタイル */
@media print {
    :root {
        --base-font-size: 12pt;
    }

    nav {
        position: static;
    }

    .menu-toggle,
    .copy-button {
        display: none;
    }

    .content {
        box-shadow: none;
    }

    a {
        text-decoration: underline;
    }

    .feature-card {
        break-inside: avoid;
    }
}