:root {
    --sidebar-bg: #343131;
    --sidebar-text: #afb7bc;
    --primary-color: #2980b9;
    --primary-hover: #2471a3;
    --text-color: #333333;
    --bg-color: #ffffff;
    --code-bg: #2d3748;
    --border-color: #e1e4e6;
    --accent-warning: #e67e22;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

/* モバイル用開閉トリガーボタン（PC時は非表示） */
.menu-trigger {
    display: none;
}

/* PC表示：サイドバーを左側に完全固定 */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
    font-size: 1.1em;
    text-align: center;
    display: block;
    text-decoration: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: #d9d9d9;
    text-decoration: none;
    font-size: 0.95em;
    border-bottom: 1px solid #444;
    cursor: pointer;
    background-color: transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: var(--primary-color);
    color: white;
}

/* 企業ロゴ配置エリア */
.sidebar-logo {
    padding: 20px;
    text-align: center;
    background-color: #2b2828;
    border-top: 1px solid #444;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

/* メインコンテンツ領域 */
.main-content {
    flex-grow: 1;
    padding: 30px 40px;
    max-width: 1000px;
}

h1 {
    color: var(--primary-color);
    font-size: 2.2em;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
}

h2 {
    color: #2c3e50;
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    margin-top: 35px;
}

h3 {
    color: #34495e;
    font-size: 1.15em;
    margin-top: 25px;
    background: #f2f4f4;
    padding: 6px 10px;
    border-radius: 4px;
}

.class-def {
    background-color: #eaf2f8;
    border-left: 4px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    font-family: monospace;
    font-size: 1.1em;
    font-weight: bold;
}

.method-def {
    background-color: #f4f6f7;
    border-left: 4px solid #7f8c8d;
    padding: 12px;
    margin: 15px 0 5px 0;
    font-family: monospace;
    font-size: 1em;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 25px 0;
}

th,
td {
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9em;
    vertical-align: top;
}

th {
    background-color: #ebf5fb;
    color: #2c3e50;
    font-weight: bold;
    width: 20%;
}

th.type-col {
    width: 25%;
}

th.range-col {
    width: 25%;
}

pre {
    background-color: var(--code-bg);
    color: #f7fafc;
    padding: 15px;
    overflow-x: auto;
    border-radius: 6px;
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9em;
    line-height: 1.4;
    margin: 15px 0;
}

.inline-code {
    background-color: #f0f3f4;
    color: #c7254e;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

.admonition {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

.admonition.warning {
    background-color: #fdf2e9;
    border-left: 4px solid var(--accent-warning);
}

.admonition.note {
    background-color: #ebf5fb;
    border-left: 4px solid var(--primary-color);
}

.warning .admonition-title {
    color: #d35400;
    font-weight: bold;
}

.note .admonition-title {
    color: #21618c;
    font-weight: bold;
}

.code-comment {
    color: #718096;
    font-style: italic;
}

.code-keyword {
    color: #f6ad55;
    font-weight: bold;
}

.code-string {
    color: #68d391;
}

.nav-list {
    list-style-type: disc;
    padding-left: 20px;
    margin: 20px 0;
}

.nav-list li {
    margin-bottom: 18px;
    line-height: 1.6;
}

.nav-list li strong {
    display: inline-block;
    margin-bottom: 2px;
}

.nav-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.05em;
    font-weight: bold;
}

.nav-list a:hover {
    text-decoration: underline;
}

.nav-list p {
    margin: 2px 0 0 0;
    font-size: 0.88em;
    color: #555555;
}

/* モバイルレスポンシブ・ハンバーガーメニュー表示設定 */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .menu-trigger {
        display: block;
        position: fixed;
        top: 15px;
        right: 15px;
        background-color: var(--primary-color);
        color: white;
        font-size: 22px;
        padding: 6px 14px;
        border-radius: 4px;
        cursor: pointer;
        z-index: 200;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        user-select: none;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        border-right: none;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-menu {
        display: block;
        overflow-y: auto;
    }

    .sidebar-menu li a {
        border-bottom: 1px solid #444;
        border-right: none;
    }

    .main-content {
        padding: 70px 15px 20px 15px;
    }

    h1 {
        font-size: 1.8em;
    }

    table {
        display: block;
        overflow-x: auto;
        width: 100%;
        white-space: nowrap;
    }
}