@charset "UTF-8";

/*
Skin Name: Modern Cyber Dark
Description: VS CodeやGitHubを彷彿とさせる、エンジニア・ガジェット系ブログ向けの洗練されたダークUIスキン。
Skin URI: https://yurucraftlab.com/
Author: Antigravity
Author URI: https://yurucraftlab.com/
Version: 1.0.0
Priority: 1
*/

/************************************
* CSS変数定義
************************************/
:root {
    /* Colors */
    --bg-base: #0d1117;
    --bg-panel: #161b22;
    --bg-panel-hover: #1c2128;
    --accent: #58a6ff;
    --accent-hover: #bc8cff;
    --accent-gradient: linear-gradient(135deg, #58a6ff 0%, #bc8cff 100%);
    --text-main: #f0f6fc;
    --text-sub: #8b949e;
    --border-subtle: #30363d;
    --border-bright: #484f58;

    /* Glassmorphism */
    --glass-bg: rgba(22, 27, 34, 0.8);
    --glass-blur: blur(10px);

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/************************************
* 基本レイアウト・背景
************************************/
body {
    background-color: var(--bg-base) !important;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Cocoon標準の白い箱を解除 */
#container,
#content,
.main,
.sidebar,
.header-container,
#navi,
.footer {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* パネルカラーの適用 */
.main,
.sidebar .widget,
.entry-card-wrap {
    background-color: var(--bg-panel);
}

/************************************
* ヘッダー・ナビゲーション
************************************/
.header-container {
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--glass-bg) !important;
    backdrop-filter: blur(10px) !important;
    position: relative;
    z-index: 999;
}

#navi .navi-in a {
    color: var(--text-main) !important;
    font-weight: bold;
    transition: var(--transition-smooth);
    position: relative;
}

#navi .navi-in a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

#navi .navi-in a:hover {
    color: var(--accent) !important;
    background: transparent !important;
}

#navi .navi-in a:hover::after {
    width: 80%;
}

/************************************
* 記事一覧 (エントリーカード)
************************************/
.entry-card-wrap {
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
    margin-bottom: 20px;
}

.entry-card-wrap:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    background-color: var(--bg-panel-hover) !important;
}

.entry-card-title {
    color: var(--accent) !important;
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.entry-card-snippet {
    color: var(--text-main) !important;
    opacity: 0.9;
    font-size: 0.9rem;
}

/************************************
* 個別記事ページ
************************************/
.article h2 {
    padding: 0.5em 1em;
    background: transparent;
    border-left: 5px solid;
    border-image: linear-gradient(to bottom, #58a6ff 0%, #bc8cff 100%) 1;
    font-weight: bold;
    margin: 2em 0 1em;
    line-height: 1.4;
    display: block;
    /* 回り込み防止 */
    clear: both;
}

.article h3 {
    padding: 0.5em 0;
    border: none !important;
    border-bottom: 2px solid var(--border-subtle) !important;
    /* ベースの下線は残すか、消してグラデーションのみにするか。ユーザーは「下線は良いが囲みがおかしい」と言った。囲み（border-top/left/right/bg）を消す */
    background: transparent !important;
    position: relative;
    margin: 1.5em 0 1em;
}

.article h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #58a6ff 0%, #bc8cff 50%, transparent 100%);
}

/* 目次 (TOC) */
.toc {
    background-color: var(--bg-panel) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px;
    padding: 1.5em !important;
}

.toc-title {
    background: transparent !important;
    color: var(--accent) !important;
    font-weight: bold;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1em;
    padding-bottom: 0.5em;
}

.toc-content a {
    color: var(--text-main) !important;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.toc-content a:hover {
    color: var(--accent) !important;
    padding-left: 5px;
}

/************************************
* サイドバー
************************************/
.sidebar .widget {
    margin-bottom: 40px !important;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-main) !important;
    /* 強制適用 */
}

.sidebar .widget a,
.sidebar .widget li,
.sidebar .widget span {
    color: var(--text-main) !important;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.sidebar .widget ul li a {
    position: relative;
    display: block;
    padding: 6px 0;
    /* クリック領域確保 */
    text-decoration: none;
    transition: var(--transition-smooth);
}

.sidebar .widget ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.sidebar .widget ul li:hover,
.sidebar .widget ul li a:hover {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--accent) !important;
}

.sidebar .widget ul li a:hover::after {
    width: 100%;
}

/* サイドバーのh2/h3見出し（Cocoonデフォルトの上書き） */
.sidebar h2,
.sidebar h3 {
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text-main) !important;
    padding: 12px 16px !important;
    margin: 16px 0 !important;
    border-radius: 0 !important;
    border-left: 4px solid;
    border-image: linear-gradient(to bottom, #58a6ff 0%, #bc8cff 100%) 1;
    font-weight: bold;
}

.widget-title {
    background: transparent !important;
    color: var(--text-main) !important;
    font-weight: bold !important;
    border: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* ウィジェットタイトルの疑似要素等による背景を消去 */
.widget-title::after,
.widget-title::before {
    background-color: transparent;
}

/* 検索ボックス */
.search-field {
    background-color: var(--bg-base) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    padding: 8px 12px !important;
    border-radius: 4px 0 0 4px !important;
}

.search-submit {
    background-color: var(--bg-panel-hover) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    padding: 8px 15px !important;
    border-radius: 0 4px 4px 0 !important;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.search-submit:hover {
    background-color: var(--accent) !important;
    color: #fff !important;
}

.widget-title::before {
    content: '';
    width: 4px;
    height: 1.2em;
    background: var(--accent-gradient);
    margin-right: 10px;
    border-radius: 2px;
}

/************************************
* フッター
************************************/
.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0;
    margin-top: 60px;
    color: var(--text-main) !important;
}

.footer a,
.footer .menu-item a,
.footer li a {
    color: var(--text-main) !important;
    transition: var(--transition-smooth);
}

.footer a:hover {
    color: var(--accent) !important;
}

.footer .widget-title {
    border-bottom: none;
}

/************************************
* WPForms 統合
************************************/
.wpforms-container .wpforms-field-label,
.wpforms-container .wpforms-field-sublabel,
.wpforms-container .wpforms-field-description {
    color: var(--text-main) !important;
}

.wpforms-container input,
.wpforms-container textarea,
.wpforms-container select {
    background-color: var(--bg-base) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    border-radius: 4px !important;
    padding: 10px !important;
    transition: var(--transition-smooth);
}

.wpforms-container input:focus,
.wpforms-container textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.2) !important;
    outline: none;
}

.wpforms-submit {
    background: var(--accent-gradient) !important;
    border: none !important;
    color: #fff !important;
    font-weight: bold !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: var(--transition-smooth) !important;
}

.wpforms-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(188, 140, 255, 0.3);
}

/************************************
* モバイル対応
************************************/
@media screen and (max-width: 834px) {

    .main,
    .sidebar .widget {
        padding: 15px;
    }

    #navi-menu-content,
    .menu-content {
        background-color: var(--bg-panel) !important;
        z-index: 10001;
    }

    .mobile-menu-buttons {
        background-color: var(--bg-panel) !important;
        border-top: 1px solid var(--border-subtle) !important;
        z-index: 10000;
    }

    /* モバイルドロワー内の文字色とボタン */
    .menu-content,
    .menu-content a,
    .menu-content li,
    .menu-content .menu-close-button {
        color: var(--text-main) !important;
    }

    /* モバイルフッターメニューのボタンと文字色 */
    .mobile-menu-buttons .menu-button>a,
    .mobile-menu-buttons .menu-button>label {
        color: var(--text-main) !important;
    }

    .mobile-menu-buttons .menu-icon {
        color: var(--accent) !important;
    }

    .mobile-menu-buttons .menu-caption {
        color: var(--text-main) !important;
        font-size: 10px;
    }

    /* スライドインサイドバーの調整 */
    #slide-in-sidebar {
        background-color: var(--bg-panel) !important;
        z-index: 10001;
        top: 0 !important;
        padding-top: 0 !important;
    }

    #slide-in-sidebar .widget {
        border: none !important;
        background-color: transparent !important;
    }
}

/************************************
* 投稿編集画面 (Gutenberg Editor)
************************************/
/* エディター内をサイトの雰囲気に合わせる */
.editor-styles-wrapper {
    background-color: var(--bg-base) !important;
    color: var(--text-main) !important;
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6,
.editor-styles-wrapper p,
.editor-styles-wrapper li {
    color: var(--text-main) !important;
}

/* 編集画面のコードブロック */
.editor-styles-wrapper pre,
.editor-styles-wrapper code {
    background-color: #1e1e1e !important;
    color: #d4d4d4 !important;
}

/* 編集画面のタイトルエリア */
.editor-post-title__input {
    color: var(--accent) !important;
}

/************************************
* アニメーション
************************************/
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.entry-card-wrap,
.widget,
.article {
    animation: fadeIn 0.6s ease-out forwards;
}

/************************************
* 関連記事 (Related Posts)
************************************/
.related-entry-card-wrap {
    background-color: var(--bg-panel) !important;
    border: 1px solid var(--border-subtle) !important;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.related-entry-card-wrap:hover {
    border-color: var(--accent) !important;
    background-color: var(--bg-panel-hover) !important;
}

.related-entry-card-title,
.related-entry-card-title a {
    color: var(--text-main) !important;
    font-size: 0.95rem;
    line-height: 1.4;
    text-decoration: none;
}

.related-entry-card-wrap:hover .related-entry-card-title a {
    color: var(--accent) !important;
}

.related-entry-card-snippet {
    color: var(--text-sub) !important;
    font-size: 0.85rem;
    line-height: 1.5;
}

/************************************
* コードブロック (VS Code Style)
************************************/
pre {
    background-color: #1e1e1e !important;
    /* VS Code dark bg */
    border: 1px solid var(--border-subtle) !important;
    color: #d4d4d4 !important;
    /* VS Code text color */
    border-radius: 6px;
    padding: 1rem !important;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.8em;
    line-height: 1.2 !important;
    word-wrap: normal;
}

code {
    background-color: rgba(110, 118, 129, 0.4);
    /* インラインコード用 */
    color: var(--accent);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
}

pre code {
    background-color: transparent !important;
    /* pre内のcodeは背景なし */
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/************************************
* テーブル (Tables)
************************************/
.article table {
    width: 100%;
    margin: 2em 0;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-panel) !important;
}

.article tr,
.article td,
.article th {
    background-color: transparent !important;
    font-size: 1.1rem !important;
}

.article th {
    background: var(--bg-panel-hover) !important;
    color: var(--accent) !important;
    font-weight: bold;
    padding: 12px 15px;
    border-bottom: 2px solid var(--border-subtle) !important;
    text-align: left;
}

.article td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
    font-size: 0.9rem !important;
}

.article tr:last-child td {
    border-bottom: none !important;
}

.article tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.article tr:hover {
    background-color: rgba(88, 166, 255, 0.08) !important;
}

/************************************
* ページ送り (Pagination)
************************************/
.pagination-next-prev {
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
    margin-top: 40px;
}

.prev-post,
.next-post {
    color: var(--text-main) !important;
    text-decoration: none !important;
    transition: var(--transition-smooth);
}

.prev-post-title,
.next-post-title {
    color: var(--text-main) !important;
    transition: var(--transition-smooth);
}

.prev-post:hover .prev-post-title,
.next-post:hover .next-post-title {
    color: var(--accent) !important;
}

.prev-post .iconfont,
.next-post .iconfont {
    color: var(--accent) !important;
    font-size: 1.5rem;
}

.prev-post:hover,
.next-post:hover {
    opacity: 0.8;
}

/************************************
* ページャー (Pager / Pagination)
************************************/
.pagination {
    margin: 40px 0;
    text-align: center;
}

.pagination a,
.pagination .current,
.pagination .pages {
    display: inline-block;
    min-width: 40px;
    height: 40px;
    line-height: 38px;
    /* Border考慮 */
    text-align: center;
    margin: 0 4px;
    padding: 0 10px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: var(--transition-smooth);
    font-weight: bold;
}

/* 通常の数字リンク */
.pagination a {
    background-color: var(--bg-panel) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-main) !important;
}

.pagination a:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    background-color: var(--bg-panel-hover) !important;
    transform: translateY(-2px);
}

/* 現在のページ */
.pagination .current {
    background: var(--accent-gradient) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* ドット (...) */
.pagination .dots {
    color: var(--border-subtle);
}

/************************************
* ポッドキャスト一覧 (固定ページ 1549) 
* WP標準ブロック (wp-block-latest-posts) 対応版
************************************/

/* 1. リスト全体のコンテナ：余白と下線をリセット */
.post-1549 ul.wp-block-latest-posts {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important; /* リスト間の余白10px */
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

/* 2. 各リスト項目 (li) ：カード形式に変更 */
.post-1549 ul.wp-block-latest-posts li {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    background-color: var(--bg-panel) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 12px !important;
    padding: 15px !important;
    margin: 0 !important; /* 余白はgapで制御 */
    position: relative !important;
    transition: var(--transition-smooth) !important;
    /* スキンの下線を消去 */
    border-bottom: 1px solid var(--border-subtle) !important;
}

/* スキンの疑似要素（白い線など）を強制非表示 */
.post-1549 ul.wp-block-latest-posts li::after,
.post-1549 ul.wp-block-latest-posts li::before {
    display: none !important;
    content: none !important;
}

/* 3. ホバーエフェクト */
.post-1549 ul.wp-block-latest-posts li:hover {
    background-color: var(--bg-panel-hover) !important;
    border-color: var(--accent) !important;
    transform: translateX(5px) !important;
}

/* 4. サムネイル画像エリア ( alignleft を調整 ) */
.post-1549 .wp-block-latest-posts__featured-image {
    flex: 0 0 160px !important;
    width: 160px !important;
    margin: 0 20px 0 0 !important;
    float: none !important; /* 回り込み解除 */
}

.post-1549 .wp-block-latest-posts__featured-image img {
    border-radius: 8px !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* 5. タイトルと日付のテキストエリア */
.post-1549 ul.wp-block-latest-posts li > a:not(.wp-block-latest-posts__post-title) {
    display: none !important; /* 重複リンク防止 */
}

.post-1549 .wp-block-latest-posts__post-title {
    flex: 1 !important;
    color: var(--accent) !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    text-decoration: none !important;
    line-height: 1.4 !important;
    margin: 0 !important;
}

/* タイトルにマイクアイコン付与 */
.post-1549 .wp-block-latest-posts__post-title::before {
    content: '🎙️';
    margin-right: 10px;
}

/* 日付 */
.post-1549 .wp-block-latest-posts__post-date {
    display: block !important;
    color: var(--text-sub) !important;
    font-size: 0.85rem !important;
    margin-top: 5px !important;
}

/* 6. モバイル対応 */
@media screen and (max-width: 600px) {
    .post-1549 ul.wp-block-latest-posts li {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .post-1549 .wp-block-latest-posts__featured-image {
        margin: 0 0 15px 0 !important;
        width: 100% !important;
        flex: 0 0 auto !important;
    }
}