/* カスタムCSS - 視認性の改善 */

/* コードブロックの視認性向上 */
.highlight {
    background-color: #2d2d2d !important;
}

.highlight pre {
    background-color: #2d2d2d !important;
    color: #f8f8f2 !important;
}

.highlight code {
    background-color: transparent !important;
    color: #f8f8f2 !important;
}

/* コードブロック全体の背景を統一 */
.highlighttable {
    background-color: #2d2d2d !important;
}

.highlighttable td {
    background-color: #2d2d2d !important;
}

/* コードブロックのラッパー要素 */
div.highlight {
    background-color: #2d2d2d !important;
    margin: 0 !important;
}

/* pre要素のパディング調整 */
.highlight pre {
    margin: 0 !important;
    padding: 12px !important;
}

/* インラインコードの視認性向上 */
code {
    background-color: #f5f5f5 !important;
    color: #c7254e !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}

/* ダークモード対応のインラインコード */
[data-md-color-scheme="slate"] code {
    background-color: #37474f !important;
    color: #ff9800 !important;
}

/* テーブルのヘッダー視認性向上 */
th {
    background-color: #009688 !important;
    color: white !important;
}

/* テーブルの偶数行に背景色を追加 */
tr:nth-child(even) {
    background-color: #f9f9f9 !important;
}

[data-md-color-scheme="slate"] tr:nth-child(even) {
    background-color: #263238 !important;
}

/* リンクの視認性向上 */
a {
    color: #00897b !important;
}

a:hover {
    color: #00695c !important;
    text-decoration: underline !important;
}

[data-md-color-scheme="slate"] a {
    color: #4db6ac !important;
}

[data-md-color-scheme="slate"] a:hover {
    color: #80cbc4 !important;
}

/* 警告ブロックのコントラスト改善 */
.admonition {
    border-left: 4px solid !important;
}

.admonition.note {
    border-color: #448aff !important;
}

.admonition.warning {
    border-color: #ff9800 !important;
}

.admonition.danger {
    border-color: #ff5252 !important;
}

.admonition.tip {
    border-color: #00e676 !important;
}

/* ナビゲーションタブの視認性向上 */
.md-tabs {
    background-color: #009688 !important;
}

.md-tabs__link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.md-tabs__link--active {
    color: white !important;
    font-weight: bold !important;
}

/* サイドバーの視認性向上 */
.md-nav__link--active {
    color: #009688 !important;
    font-weight: bold !important;
}

/* コードブロック内の行番号の視認性 */
.linenodiv {
    background-color: #2d2d2d !important;
    color: #666 !important;
    padding-right: 8px !important;
}

.linenodiv pre {
    background-color: #2d2d2d !important;
    color: #666 !important;
    margin: 0 !important;
    padding: 12px 8px !important;
}

/* 行番号のセル */
.highlighttable .linenos {
    background-color: #2d2d2d !important;
    border-right: 1px solid #444 !important;
}

/* コードのセル */
.highlighttable .code {
    background-color: #2d2d2d !important;
}

/* テキスト選択時の背景色 */
::selection {
    background-color: #b2dfdb !important;
    color: #000 !important;
}

::-moz-selection {
    background-color: #b2dfdb !important;
    color: #000 !important;
}

/* 検索ハイライトの視認性 */
mark {
    background-color: #ffeb3b !important;
    color: #000 !important;
}

/* フッターの視認性 */
.md-footer {
    background-color: #00897b !important;
}

/* コードブロックのスクロールバー */
.highlight pre::-webkit-scrollbar {
    height: 8px;
}

.highlight pre::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.highlight pre::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.highlight pre::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* YAMLコードブロックの特別な色設定 */
.language-yaml .highlight {
    background-color: #2d2d2d !important;
}

.language-yaml .highlight pre {
    color: #f8f8f2 !important;
}

/* Pythonコードブロックの特別な色設定 */
.language-python .highlight {
    background-color: #2d2d2d !important;
}

.language-python .highlight pre {
    color: #f8f8f2 !important;
}

/* シェルスクリプトの特別な色設定 */
.language-bash .highlight {
    background-color: #2d2d2d !important;
}

.language-bash .highlight pre {
    color: #f8f8f2 !important;
}
