/* Add this at the beginning of your style.css, or merge with existing :root */
:root {
   /* Define other global variables here if needed */
  /*--card-bg-color: white; /* Default background for cards and suggestion box */ 
  /*--border-color: #ddd;   /* Example border color */
  /*--text-color: #333;
  --text-secondary-color: #555;
  --primary-color: #007bff;
  --primary-color-light: #e7f3ff; /* Example hover color */

  /* 背景を真っ白ではなく、ごくわずかにグレーがかった色に */
  --body-bg-color: #f2f3f4; 
  /* カード背景は白のまま or さらに少し色をつける場合は #ffffff */
  --card-bg-color: #ffffff; 
  /* 境界線を少し柔らかいグレーに */
  --border-color: #dee2e6;   
  /* メインテキストを真っ黒ではなく、濃いグレーに */
  --text-color: #212529;      
  /* サブテキストも少し調整 */
  --text-secondary-color: #6c757d; 
  /* プライマリカラー (青) はそのままでもOK */
  --primary-color: #007bff;
  /* ホバー色も少し調整 (任意) */
  --primary-color-light: #e9f4ff; 
  /* 他の変数があればここに追加 */

  /* ▼▼▼ バナー用の変数を追加 (ライトモード用) ▼▼▼ */
  --approval-banner-bg: #fffbeB; /* 薄い黄色 */
  --approval-banner-border: #fde68a; /* 黄色系の境界線 */

}

body {
/* ↓ 念のため、bodyにも背景色を適用*/
  background: var(--body-bg-color);
  color: var(--text-color);

}

/* Add or merge this inside your existing body.dark-mode rule */
body.dark-mode {
  /* ... other dark mode styles ... */
  --card-bg-color: #2a2a2a; /* Dark mode background for cards and suggestion box */
  --border-color: #444;   /* Dark mode border */
  --text-color: #e0e0e0;
  --text-secondary-color: #aaa;
  --primary-color: #bb86fc;
  --primary-color-light: #3a3a3a; /* Dark mode hover */
  --body-bg-color: #121212;
  /* Add other dark mode variables */
  background-color: #121212; /* Ensure body dark mode bg is set */
  color: #e0e0e0;         /* Ensure body dark mode text color is set */

  /* ▼▼▼ バナー用の変数を追加 (ダークモード用) ▼▼▼ */
  --approval-banner-bg: #2a3a4a; /* ダークモード用の濃い青系 */
  --approval-banner-border: #4a5a6a; /* 濃い青系の境界線 */
}



/* メインコンテンツエリア */
main {
    padding: 2em;
    max-width: 1200px;
    margin: 0 auto;
}

/* スライダーなどのUIコントロールをまとめるスタイル */
.view-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.artwork-gallery, .artwork-grid {
    --card-size: 250px; 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-size), 1fr));
    gap: 20px;
}

/* 作品カード */
.nft-card {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* ▼▼▼ この transition を追加 ▼▼▼ */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.price-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}
.nft-card a {
    text-decoration: none;
    color: inherit;
    position: relative; /* price-tagの位置を正しくするために必要 */
}
.nft-card > p, .nft-card > .card-actions {
    padding: 0 1em;
}
.nft-card > .card-actions {
    margin-top: auto;
    padding-bottom: 1em;
}

/* メディアプレビューのスタイル */
.nft-card img,
.nft-card video,
.nft-card model-viewer {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    background-color: #f0f0f0;
}

.nft-card h3 {
    padding: 0 1em;
}
/* ▼▼▼ この :hover スタイルをまるごと追加 ▼▼▼ */
.nft-card:hover {
    transform: translateY(-5px); /* 少し上に移動 */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* 影を追加 */
}

/* ▼▼▼ ダークモード用のホバー時の影も追加 ▼▼▼ */
body.dark-mode .nft-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* ダークモード用の濃い影 */
}
/* ▲▲▲ ここまで追加 ▲▲▲ */

/* フォーム全体のコンテナ */
.form-container {
    background-color: white;
    padding: 2em;
    border-radius: 8px;
}
.form-container form div {
    margin-bottom: 1em;
}
.form-container form input, 
.form-container form textarea, 
.form-container form button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
}

/* カード内のアクションボタンをまとめるスタイル */
.card-actions {
    display: flex;
    flex-wrap: wrap; /* 👈 横幅が足りなくなったら折り返す設定 */
    justify-content: space-between; /* 要素を両端に配置 */
    align-items: center;/* 縦方向中央揃え */
    padding: 5px 10px; /* 上下左右の余白 */
}
/* カード内のアクションボタンをまとめるスタイル */
.card-actions {
    display: flex;
    flex-wrap: wrap; 
    justify-content: space-between; 
    align-items: center;
    padding: 5px 10px;
    gap: 8px; /* ★ボタン間のスペースを確保 */
}

/* ▼▼▼ このブロックをまるごと追加 ▼▼▼ */
/* aタグでできたボタンにも、buttonタグと同じスタイルを適用する */
.card-actions a.button-primary,
.card-actions a.button-secondary {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    display: inline-block; /* aタグをボタンらしく見せるために必要 */
}

.card-actions a.button-secondary {
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    color: #333; /* 文字色を明示 */
}
.card-actions a.button-secondary:hover {
    background-color: #eee;
}
/* ▲▲▲ ここまで追加 ▲▲▲ */

/* ❤️と💬の数値をまとめるスタイル */
/* (以下、既存のスタイルが続く) */
/* ❤️と💬の数値をまとめるスタイル */
.card-stats {
    display: flex;
    gap: 10px; /* アイコン間のスペース */
    font-size: 0.9em;
    color: #555;
}
/* ボタンの基本スタイル */
button, .button-primary {
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
}
button:hover {
    background-color: #eee;
}

/* プライマリボタン（決定ボタンなど）のスタイル */
.button-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.button-primary:hover {
    background-color: #0056b3;
}

/* ★ボタンのスタイル */
.favorite-btn {
    background: none;
    border: none;
    font-size: 1.5em;
    color: #ccc;
    padding: 0;
    margin-left: auto; /* ★ボタンを右端に配置 */
}
.favorite-btn.favorited {
    color: gold;
}

/* モーダルウィンドウのスタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background-color: white;
    padding: 20px 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}
.modal-actions {
    margin-top: 20px;
    text-align: right;
}
/* mypage.htmlのタブの初期表示を設定 */
.tab-content {
    display: none; /* 全てのタブコンテンツを一旦非表示に */
}

#my-artworks {
    display: block; /* 「自分の作品」タブだけを表示する */
}

/* css/style.css に追記 */
.tags-container {
    padding: 0 1em 0.5em;
}
.tag {
    display: inline-block;
    background-color: #eee;
    color: #333;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-right: 5px;
    margin-bottom: 5px;
}
/* css/style.css に追記 */
.comments-section {
    margin-top: 40px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}
.comment {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}
.comment p {
    margin: 5px 0;
}
#comment-form textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 10px;
}
.gkc-balance-display {
  color: blue;
  font-size: 1.1em; /* 少し文字を大きくする */
  margin: 10px 0; /* 上下の余白 */
}
/* style.css に追加 */
.card-media-container {
    position: relative;
}
.price-display {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
    margin: 20px 0;
    text-align: center;
}
#buy-btn {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 0 auto 20px auto;
    padding: 15px;
    font-size: 1.2em;
}
/* カード内の所有者、制作者、日時のテキストスタイルを統一 */
.owner, .creators, .timestamp {
    font-size: 0.8em;
    color: #666;
    margin: 4px 0;
    line-height: 1.4;
}
/* css/style.css の末尾に追加 */

/* --- ダークモード用スタイル --- */

/* bodyに.dark-modeクラスが付いた時のスタイルを定義 */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode header {
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}

body.dark-mode .form-container,
body.dark-mode .nft-card,
body.dark-mode .modal-content {
    background-color: #2a2a2a;
    border-color: #444;
}

body.dark-mode .tag {
    background-color: #333;
    color: #bbb;
}

body.dark-mode button,
body.dark-mode .button-secondary {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}
body.dark-mode button:hover,
body.dark-mode .button-secondary:hover {
    background-color: #444;
}

body.dark-mode .button-primary {
    background-color: #bb86fc;
    color: #121212;
    border-color: #bb86fc;
}
body.dark-mode .button-primary:hover {
    background-color: #a06cd5;
}

body.dark-mode .favorite-btn.favorited {
    color: #fce38a;
}

body.dark-mode input,
body.dark-mode textarea {
    background-color: #333;
    color: #e0e0e0;
    border-color: #555;
}

body.dark-mode .tabs button {
    background-color: transparent;
    color: #e0e0e0;
}

body.dark-mode .tabs button.active {
    border-bottom-color: #bb86fc;
}
/* ▼▼▼ 以下のスタイルを末尾に追加 ▼▼▼ */

#header-right-container {
    display: flex;
    align-items: center;
    gap: 20px; /* 要素間のスペース */
    margin-top: 10px; /* ← 上の要素との間に余白を追加 */
}

#header-gkc-balance {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    white-space: nowrap; /* 折り返しを防ぐ */
}

#gkc-balance-value {
    font-weight: bold;
}
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%; /* bodyが全体を覆うように */
}
/* header のスタイルを修正 - 全体を背景画像にする */
.hero-header {
    background-image: url('../img/mint_leaf_header.png');
    background-size: cover;
    background-position: center;
    color: white;
    position: fixed;
    top: 0;
    z-index: 100;
    width: 100%;
}

/* 画像の上に半透明のオーバーレイをかけることで、文字を読みやすくする */
.header-overlay {
    background-color: rgba(0, 0, 0, 0.4); /* 背景を少し濃くして文字を際立たせる */
    padding: 0.4em 1.5em; /* 上下の余白を狭くして、ヘッダー全体を薄くする */
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
    justify-content: space-between; /* 左右の要素を両端に配置 */
    flex-wrap: wrap; /* 画面が狭いときに折り返す */
    gap: 20px;
}

/* ヘッダーのトップ行（タイトルと右側要素） */
.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* ▼▼▼ 1. 右側要素の見切れ：要素が収まらない場合に折り返す ▼▼▼ */
    gap: 15px; /* ▼▼▼ 1. 右側要素の見切れ：要素間のスペースを確保 ▼▼▼ */
    margin-bottom: 0.8em; /* ▼▼▼ 2. 影の調整：ナビゲーションとの間にスペースを調整 ▼▼▼ */
}

.header-left-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* サイトタイトル */
.site-title {
    font-family: 'Arial', sans-serif;
    font-size: 1.8em; /* タイトルサイズを少し調整 */
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
}

/* 右側のメニューとボタンをまとめるコンテナ */
.header-right-content {
    display: flex;
    align-items: center; /* 垂直方向の中央揃え */
    gap: 25px; /* メニューとボタン群の間のスペース */
    flex-wrap: wrap;
    justify-content: flex-end;
}
/* 右側のGKC残高とモード切替コンテナ */
#header-right-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* GKC残高表示 */
#header-gkc-balance {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ナビゲーションの調整 */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; /* ← この行を追加して、常に縦並びにする */
    gap: 15px; /* メニュー間のスペース */
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-size: 0.9em;
    white-space: nowrap;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* モード切替ボタンの調整 */
#dark-mode-toggle {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.8em;
    white-space: nowrap;
}

#dark-mode-toggle:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* --- ダークモード用スタイル --- */
/* ▼▼▼ 3. ダークモードでの背景：この部分を削除またはコメントアウト ▼▼▼ */
/*
body.dark-mode .hero-header {
    background-image: url('../img/mint_leaf_header_dark.png');
}
*/

body.dark-mode .header-overlay {
    background-color: rgba(0, 0, 0, 0.6); /* ダークモードではオーバーレイを少し濃く */
}

body.dark-mode .site-title {
    color: #e0e0e0; /* ダークモードでの文字色 */
}

body.dark-mode #header-gkc-balance {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
}

body.dark-mode nav ul li a {
    color: #e0e0e0;
}
body.dark-mode nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode #dark-mode-toggle {
    background-color: rgba(0, 0, 0, 0.4);
    color: #e0e0e0;
    border-color: rgba(255, 255, 255, 0.2);
}
body.dark-mode #dark-mode-toggle:hover {
    background-color: rgba(0, 0, 0, 0.6);
}
/* GKC履歴テーブルのスタイル (末尾に追加) */
.gkc-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em;
    background-color: #2a2a2a; /* ダークモードに合わせた背景 */
    color: #e0e0e0;
}

.gkc-history-table th,
.gkc-history-table td {
    border: 1px solid #444; /* ダークモードに合わせたボーダー */
    padding: 10px;
    text-align: left;
}

.gkc-history-table th {
    background-color: #333;
    font-weight: bold;
}

.gkc-history-table tr:nth-child(even) {
    background-color: #222; /* 偶数行の背景 */
}

/* 金額の入出金の色 */
.gkc-incoming {
    color: #4CAF50; /* 緑 */
    font-weight: bold;
}

.gkc-outgoing {
    color: #F44336; /* 赤 */
    font-weight: bold;
}

/* ダークモードでのテーブルスタイルの調整 */
body.dark-mode .gkc-history-table {
    background-color: #2a2a2a;
    color: #e0e0e0;
}
body.dark-mode .gkc-history-table th {
    background-color: #333;
}
body.dark-mode .gkc-history-table td {
    border-color: #444;
}
body.dark-mode .gkc-history-table tr:nth-child(even) {
    background-color: #222;
}
/* --- ▼▼▼ フッターのコピーボタン用のスタイル ▼▼▼ --- */
.copy-btn {
    background: none;         /* 背景をなくす */
    border: none;             /* 枠線をなくす */
    padding-right: 20px;           /* 左右に少しだけ余白を追加 */
    cursor: pointer;          /* マウスカーソルを指の形にする */
    font-size: 1em;           /* 文字サイズを周りのテキストに合わせる */
    vertical-align: middle;   /* 上下の位置を微調整 */
    opacity: 0.6;             /* 少しだけ薄くして、主張しすぎないようにする */
    transition: opacity 0.2s; /* マウスを乗せたときのアニメーション効果 */
}

/* マウスがボタンの上に乗ったときに、少し濃くして反応しているように見せる */
.copy-btn:hover {
    opacity: 1.0;
}
.header-contract-info {
    font-size: 0.75em;
    margin-top: 5px;
    opacity: 0.8;
}
.header-contract-info span {
    margin-right: 15px;
}
/* style.css に追記 */

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* 画面が狭いときに折り返す */
    gap: 20px;
    margin-bottom: 20px;
}

.search-bar {
    display: flex; /* ← 子要素を横並びにする */
    align-items: center; /* ← 垂直方向の中央揃え */
    gap: 10px; /* ← 要素間のスペース */
}

/* チェックボックスの見た目を調整 */
.filter-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap; /* テキストが折り返さないようにする */
}
/* --- マイページのタブとスライダーのレイアウト --- */
.tabs-header {
    display: flex;
    justify-content: space-between; /* 要素を両端に配置 */
    align-items: center;         /* 垂直方向の中央揃え */
    margin-bottom: 20px;         /* 下のコンテンツとの余白 */
    flex-wrap: wrap;             /* スマホ表示で折り返す */
}

/* スライダーコントロールのスタイル */
.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ラベルの文字が折り返さないようにする */
.slider-container label {
    white-space: nowrap;
}


/* ===============================================================
   レスポンシブデザイン (スマホ対応)
   画面幅が768px以下の場合に適用されるスタイル
   =============================================================== */
@media (max-width: 1080px) {


    /* --- ▼▼▼ この3行を追加 ▼▼▼ --- */
    .view-controls, .slider-container {
        display: none; /* カードサイズのスライダーを非表示にする */
    }
    /* --- ▲▲▲ ここまで ▲▲▲ --- */



    /* --- 全体的な調整 --- */
    body {
        font-size: 14px; /* スマホでは少し文字を小さくして情報量を確保 */
    }

    main {
        padding: 1em; /* メインコンテンツの左右の余白を調整 */
    }

    /* --- ヘッダー --- */
        /* --- ヘッダー --- */
    /* ▼▼▼ このブロックをまるごと追加 ▼▼▼ */
    .hero-header {
        position: static; /* スマホではヘッダーの固定表示を解除 */
        height: auto;
    }
    .header-overlay {
        padding-bottom: 1em;
    }
    /* ▲▲▲ ▲▲▲ */
    
    /* ★★★ この3行を追加 ★★★ */
    main {
        padding-top: 1em; /* ヘッダー下の不要な余白をリセット */
    }
    /* ★★★ ここまで ★★★ */

    .hero-header .header-top-row {
        flex-direction: column; /* 上段の要素を縦積みにする */
        align-items: flex-start;
        gap: 0.5em;
    }
    .hero-header nav ul {
        /*flex-direction: column; /* ナビゲーションを縦積みに */
        gap: 0.5em;
        align-items: center;
    }
    .hero-header nav li {
        width: 100%;
        text-align: center;
    }
    .header-contract-info {
        font-size: 0.7em; /* コントラクトアドレス表示を小さく */
    }

    /* --- 作品カードのグリッド --- */
    .artwork-gallery, .artwork-grid {
        /* 画面幅に応じてカードを自動で折り返すようにする */
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1em; /* カード間の余白を少し詰める */
    }
    
    /* --- マイページのタブ --- */
    .tabs {
        display: flex;
        flex-wrap: wrap; /* ボタンが多ければ折り返す */
    }
    .tab-button {
        flex-grow: 1; /* ボタンを均等幅にする */
    }

    /* --- エクスプローラーページ --- */
    .explorer-grid {
        grid-template-columns: 1fr; /* 2列レイアウトを1列に */
    }

    /* --- テーブル全般 (横スクロール対応) --- */
    .table-container {
        overflow-x: auto; /* テーブルが画面からはみ出す場合に横スクロールできるようにする */
        -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
    }
    .transaction-table, .leaderboard-table, .gkc-history-table {
        min-width: 600px; /* テーブルの最小幅を設定し、横スクロールを促す */
        font-size: 0.8em; /* テーブル内の文字を小さく */
    }
    
    /* --- フォームとボタン --- */
    .search-bar {
        flex-direction: column; /* 検索窓とボタンを縦積みに */
        gap: 0.5em;
    }
    input[type="search"], input[type="text"], textarea {
        width: 100%; /* 入力欄を画面幅いっぱいに */
    }
    button {
        padding: 0.8em 1em; /* ボタンのタップ領域を確保 */
    }
}
/* style.css の末尾に追加 */

/* --- 登録チャンネルフィード用のスタイル --- */
.creator-feed-card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 2em;
    padding: 1.5em;
}

.creator-profile-info h3 {
    margin-top: 0;
}

.creator-profile-info .profile-message {
    font-size: 0.9em;
    color: var(--text-secondary-color);
    white-space: pre-wrap; /* 改行を反映させる */
}

.creator-profile-info .website-link {
    font-size: 0.9em;
}

/* 作品サムネイルの横スクロールエリア */
.creator-artworks-strip {
    display: flex;
    overflow-x: auto; /* 横スクロールを有効にする */
    gap: 15px;
    padding: 1em 0;
    -webkit-overflow-scrolling: touch; /* iOSでのスクロールを滑らかに */
}

/* サムネイル単体 */
.thumbnail-item {
    flex: 0 0 120px; /* サムネイルの基本サイズを固定 (縮まない・伸びない・幅120px) */
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f0f0f0;
    transition: transform 0.2s ease;
}

.thumbnail-item:hover {
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像をコンテナに合わせてトリミング */
}

/* 横スクロールバーのデザイン（モダンブラウザ向け） */
.creator-artworks-strip::-webkit-scrollbar {
    height: 8px;
}
.creator-artworks-strip::-webkit-scrollbar-track {
    background: transparent;
}
.creator-artworks-strip::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
body.dark-mode .creator-artworks-strip::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}
/* style.css の末尾に追加 */

/* --- 登録チャンネルのサムネイルアイコン用スタイル --- */
.thumbnail-item {
    position: relative; /* アイコンを中央に配置するための基準 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumbnail-item .thumbnail-icon {
    width: 50%; /* アイコンのサイズを調整 */
    height: 50%;
    object-fit: contain;
    opacity: 0.7; /* アイコンを少し薄くして背景と馴染ませる */
}
/* style.css の末尾に追加 */

/* --- 作品カード内の制作者リンクのスタイル --- */

/* 普段の状態：下線なし、色は周りに合わせる */
.creators a {
    text-decoration: none;      /* 下線を消す */
    color: inherit;             /* 親要素の色を継承する */
    cursor: pointer;            /* カーソルを指の形にする */
    transition: color 0.2s ease; /* 色が滑らかに変わるアニメーション */
}

/* マウスが乗った時の状態：色を変え、下線を表示 */
.creators a:hover {
    color: #bb86fc; /* ダークモードのプライマリカラーなど、少し目立つ色 */
    text-decoration: underline; /* 下線を表示する */
}
/* style.css の末尾に追加 */

/* --- 登録ページのマニュアル注意喚起ボックスのスタイル --- */
.manual-notice-box {
    background-color: #f0f8ff; /* 通常時の背景色 (薄い青) */
    border: 1px solid #cce5ff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}
.manual-notice-box p {
    margin: 0;
}

/* ダークモード時のスタイル */
body.dark-mode .manual-notice-box {
    background-color: #2a3a4a; /* ダークモード用の背景色 (濃い青) */
    border-color: #4a5a6a;     /* ダークモード用の枠線の色 */
}
/* style.css の末尾に追加 */

/* --- GKC獲得ガイドリンクのスタイル --- */
.gkc-guide-link a {
    font-size: 0.9em;
    color: var(--text-secondary-color); /* 通常時の色 */
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}
.gkc-guide-link a:hover {
    text-decoration: underline;
    color: var(--primary-color); /* ホバー時の色 */
}

/* ダークモード時の調整 */
body.dark-mode .gkc-guide-link a {
    color: #a0a0a0; /* ダークモードの薄いグレーなど */
}
body.dark-mode .gkc-guide-link a:hover {
    color: #bb86fc; /* ダークモードのプライマリカラー */
}
/* style.css の末尾に追加 */

/* --- ログインページのヘルプリンク用スタイル --- */
body.dark-mode .login-help a {
    color: #8ab4f8; /* ダークモード用の明るい青色 */
}

body.dark-mode .login-help a:hover {
    color: #a7c5fb; /* マウスを乗せた時にもう少し明るく */
}
/* style.css の末尾に追加 */

/* --- マニュアルページ等のシンプルヘッダーのスタイル --- */
.simple-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px; /* メインコンテンツの幅と合わせる */
    margin: 0 auto;
}
/* ヘッダー背景画像（既存のhero-headerを流用） */
.hero-header {
    background-image: url('../img/mint_leaf_header.png'); /* ここで画像を指定 */
    background-size: cover;
    background-position: center;
    color: white;
/*
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    width: 100%;
*/
}
.hero-header .header-overlay {
    background-color: rgba(0, 0, 0, 0.5); /* 文字を読みやすくするためのオーバーレイ */
    padding: 1em 2em;
}
.hero-header .site-title a {
    text-decoration: none;
    color: white;
}

/* メインコンテンツがヘッダーに隠れないように調整 */
main {
    padding-top: 120px; /* ヘッダーの高さ分、上部の余白を確保 */
}

/* --- マニュアル＆GKCガイドページのダークモード対応 --- */
body.dark-mode .manual-content h2,
body.dark-mode .gkc-guide-content h2 {
    border-bottom-color: #444;
}

body.dark-mode .manual-content h3,
body.dark-mode .gkc-guide-content h3 {
    border-left-color: #bb86fc;
}

body.dark-mode .important-note {
    background-color: #4d441e; /* 黄色系の暗い色 */
    border-color: #8c7b3e;
}
/* style.css の末尾に追加 */

/* --- マニュアルページ等のリンクのダークモード対応 --- */
body.dark-mode .manual-content a,
body.dark-mode .gkc-guide-content a {
    color: #8ab4f8; /* ダークモード用の、可読性の高い明るい青色 */
    text-decoration: underline;
}

/* マウスが乗った時に、さらに少し明るくして反応を示す */
body.dark-mode .manual-content a:hover,
body.dark-mode .gkc-guide-content a:hover {
    color: #a7c5fb;
}
/* style.css の末尾に追加 */

/* --- 登録ページのマニュアルリンクのダークモード対応 --- */
body.dark-mode .manual-notice-box a {
    color: #8ab4f8; /* ダークモード用の明るい青色 */
}

body.dark-mode .manual-notice-box a:hover {
    color: #a7c5fb; /* マウスを乗せた時にもう少し明るく */
}

/* style.css の末尾に追加 */

/* --- ポートフォリオリンクのボタンスタイル --- */
.portfolio-link {
    display: inline-flex; /* アイコンとテキストを横並びにする */
    align-items: center;  /* 上下中央に揃える */
    gap: 8px;             /* アイコンとテキストの間の余白 */
    
    background-color: transparent;
    border: 1px solid #ccc;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px; /* 角を丸めて柔らかい印象に */
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* マウスが乗った時のスタイル */
.portfolio-link:hover {
    background-color: #f0f0f0;
    border-color: #aaa;
}

/* --- ダークモード時のスタイル --- */
body.dark-mode .portfolio-link {
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .portfolio-link:hover {
    background-color: #333;
    border-color: #777;
}
/* --- 制作者プロフィールボックスの調整 --- */
.creator-profile-box {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    padding: 1.5em;
    border-radius: 8px;
    margin-bottom: 2em; /* ★これがプロフィールボックス下の余白になります */
}
/* style.css の末尾に追加 */

/* --- トップページ専用スタイル --- */
.welcome-hero {
    text-align: center;
    padding: 3em 1em;
    margin-bottom: 2em;
}
.top-page-actions {
    margin-top: 1.5em;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.top-page-actions .button-primary,
.top-page-actions .button-secondary {
    font-size: 1.1em;
    padding: 12px 25px;
}

.showcase-section, .dashboard-section {
    margin-bottom: 3em;
}
.showcase-section h2, .dashboard-section h2 {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}
.more-link {
    text-align: right;
    margin-top: 1em;
    font-size: 0.9em;
}

/* --- ミニカード --- */
.mini-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background-color: var(--card-bg-color);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
body.dark-mode .mini-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.mini-card-info {
    padding: 0.8em;
}
.mini-card-info h4 {
    margin: 0 0 0.3em 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-card-info p {
    margin: 0;
    font-size: 0.8em;
    color: var(--text-secondary-color);
}
.mini-card.simple {
    padding: 1em;
}

/* --- クイックリンク --- */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}
.quick-link-item {
    display: block;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5em 1em;
    text-align: center;
    text-decoration: none;
    color: inherit;
    font-size: 0.9em;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}
.quick-link-item:hover {
    background-color: #f0f0f0;
}
body.dark-mode .quick-link-item:hover {
    background-color: #333;
}
/* style.css の末尾に追加 */

/* --- トップページの登録チャンネルフィードのスタイル --- */
#feed-container {
    display: flex;       /* 子要素を横に並べる */
    overflow-x: auto;    /* 横方向にはみ出た部分をスクロールさせる */
    gap: 20px;           /* カード間の余白 */
    padding-bottom: 1em; /* スクロールバーのための下部余白 */
}

/* フィード内の各クリエイターカードの幅を調整 */
#feed-container .creator-feed-card {
    flex: 0 0 80%;      /* カード幅を画面の80%に設定 (縮まない・伸びない) */
    max-width: 450px;   /* PC表示でのカードの最大幅 */
}
/* style.css の末尾に追加 */

/* --- ダークモード時の各種リンク色の調整 --- */

/* index.htmlの「もっと見る」リンク */
body.dark-mode .more-link a {
    color: #8ab4f8; /* ダークモード用の明るい青色 */
}

/* explorer.htmlのランキング内にある作品名リンク */
body.dark-mode .ranking-table a {
    color: #8ab4f8; /* 同じく明るい青色に設定 */
}
/* style.css の末尾に追加 */

/* --- トップページのガイドリンク --- */
.guide-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}
.guide-link-item {
    display: block;
    padding: 1.5em;
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease;
}
.guide-link-item:hover {
    background-color: #f0f0f0;
}
body.dark-mode .guide-link-item:hover {
    background-color: #333;
}
/* style.css の末尾に追加 */

/* --- ログアウトボタンのスタイル --- */
.quick-link-item.danger {
    border-color: #e57373; /* A soft red */
    color: #e57373;
}
.quick-link-item.danger:hover {
    background-color: #e57373;
    color: white;
}
body.dark-mode .quick-link-item.danger:hover {
    color: #121212; /* Dark text on light red background */
}
/* style.css の末尾に追加 */

/* --- トップページのクイックリンクアイコン調整 --- */
.quick-link-icon {
    font-size: 2.5em; /* アイコンの文字サイズを大きくする */
    display: block;   /* アイコンをブロック要素にして下のテキストとの間に余白を作る */
    margin-bottom: 0.5em;
}
/* style.css の末尾に追加 */

/* --- トップページのミニカード・プレビュー調整 --- */
.mini-card-media-wrapper {
    width: 100%;
    height: 150px; /* メディアエリアの高さを統一 */
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* プレビュー内の全メディア要素に適用 */
.mini-card-media-wrapper img,
.mini-card-media-wrapper video,
.mini-card-media-wrapper model-viewer {
    width: 100%;
    height: 100%;
    object-fit: cover; /* コンテナを埋めるように調整 */
}

/* アイコンは引き伸ばさず中央に表示 */
.mini-card-media-wrapper .icon-preview {
    object-fit: contain;
    width: 40%;
    height: 40%;
    opacity: 0.7;
}
/* style.css の末尾に追加 */

/* --- トップページの登録チャンネル・スクロールバーのスタイル調整 --- */

/* スクロールバーが表示されるコンテナの下に余白を追加 */
#feed-container {
    padding-bottom: 15px;
}

/* スクロールバー全体のデザイン */
#feed-container::-webkit-scrollbar {
    height: 8px; /* スクロールバーの太さ */
}

/* スクロールバーの背景部分(トラック) */
#feed-container::-webkit-scrollbar-track {
    background: transparent; /* 背景は透明にする */
}

/* スクロールバーのつまみ部分(サム) */
#feed-container::-webkit-scrollbar-thumb {
    background-color: #ddd; /* 通常時のつまみの色 */
    border-radius: 4px;   /* つまみを角丸にする */
}

/* マウスが乗った時のつまみの色 */
#feed-container::-webkit-scrollbar-thumb:hover {
    background-color: #bbb;
}

/* ダークモード時のつまみの色 */
body.dark-mode #feed-container::-webkit-scrollbar-thumb {
    background-color: #444;
}

body.dark-mode #feed-container::-webkit-scrollbar-thumb:hover {
    background-color: #666;
}
/* style.css の末尾に追加 */

/* --- エクスプローラーページのAboutリンク用スタイル --- */
body.dark-mode .about-link-container a {
    color: #8ab4f8; /* ダークモード用の明るい青色 */
}

body.dark-mode .about-link-container a:hover {
    color: #a7c5fb; /* マウスを乗せた時にもう少し明るく */
}
/* style.css の末尾に追加 */

/* --- 詳細ページの情報リンクのスタイル --- */
body.dark-mode .info-link {
    color: #8ab4f8; /* ダークモード用の明るい青色 */
}

body.dark-mode .info-link:hover {
    color: #a7c5fb; /* マウスが乗った時にもう少し明るく */
}
/* ▼▼▼ このコードを末尾に追加 ▼▼▼ */
body.dark-mode #teacher-options {
    background-color: #2a3a4a !important; /* ダークモード用の背景色 (濃い青) */
    border: 1px solid #4a5a6a;
}
/* ===============================================================
   ダークモードとUIの追加調整 (2025/10/21 - 強制上書き版)
   =============================================================== */

/* 1. upload.html: ダークモード時の読み取り専用入力欄の背景色 */
body.dark-mode input[readonly] {
    background-color: #404040 !important; /* !importantでJSの指定を強制的に上書きします */
    color: #ccc;                       /* 文字色を少し明るくして可読性を確保します */
    cursor: not-allowed;                /* 操作不可であることが分かるカーソルに設定します */
}

/* 2. edit-draft.html: ダークモード時のファイル情報表示欄の背景色 */
body.dark-mode #current-file-info {
    background-color: #404040 !important; /* !importantでHTMLの指定を強制的に上書きします */
    color: #e0e0e0;
}

body.dark-mode #current-file-info a#current-file-link {
    color: #8ab4f8; /* ダークモード用の明るい青色 (他のリンクと合わせる) */
    text-decoration: underline; /* リンクであることを分かりやすく */
}

body.dark-mode #current-file-info a#current-file-link:hover {
    color: #a7c5fb; /* マウスホバー時の色 */
}

/* --- 以下は前回から変更ありませんが、念のため含めています --- */

/* 3. draft-detail: ダークモード時のステータスボックスの背景 */
body.dark-mode #publish-controls {
    background-color: #2a3a4a; 
    border-color: #4a5a6a;     
}

/* 4. draft-detail: ダークモード時の制作者リンクの色 */
body.dark-mode #artwork-creators a {
    color: #8ab4f8;
}
body.dark-mode #artwork-creators a:hover {
    color: #a7c5fb;
}

/* 5. draft-detail: 「編集」リンクのボタンスタイル */
a.button-secondary {
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    display: inline-block;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    color: #333 !important;
}
a.button-secondary:hover {
    background-color: #eee;
}
body.dark-mode a.button-secondary {
    background-color: #333;
    color: #e0e0e0 !important;
    border-color: #555;
}
body.dark-mode a.button-secondary:hover {
    background-color: #444;
}
/* ===============================================================
   draft-detailページのステータスボックス修正 (2025/10/21)
   =============================================================== */

/* 全体のデザインをCSSで管理 */
#publish-controls {
    background-color: #fffbe6; /* 通常時のクリーム色 */
    border: 1px solid #ffe58f;
    padding: 1em;
    border-radius: 8px;
    margin-bottom: 1.5em;
}

/* ダークモード時の上書き設定 */
body.dark-mode #publish-controls {
    background-color: #2a3a4a; /* ダークモード用の濃い青系 */
    border-color: #4a5a6a;
}
/* ===================================
   トップページ 承認待ちバナー
   =================================== */
.approval-banner {
    display: flex; /* JSによって flex に変更されます */
    align-items: center;
    /* 注意を引くが、警告すぎない色（薄い黄色） */
    background-color: var(--approval-banner-bg); 
    color: var(--text-color);
    border: 1px solid var(--approval-banner-border); /* 黄色系の境界線 */
    padding: 1.5em;
    border-radius: 8px;
    margin-bottom: 2em;
    gap: 1.5em; /* アイコンとテキストの隙間 */
}

.approval-banner .banner-icon {
    font-size: 2.5em;
    line-height: 1;
    color: var(--primary-color, #007bff); /* アイコンの色 */
}

.approval-banner .banner-text {
    flex-grow: 1; /* テキスト領域が横幅いっぱいに広がる */
}

.approval-banner .banner-text strong {
    font-size: 1.2em;
    font-weight: 600;
}

.approval-banner .banner-text p {
    margin: 0.25em 0 0;
    font-size: 0.9em;
    color: var(--text-secondary-color, #555);
}

.approval-banner .button-secondary {
    flex-shrink: 0; /* ボタンが縮まないようにする */
    /* 既存の .button-secondary スタイルが適用されます */
}

/* スマホ用の調整 */
@media (max-width: 768px) {
    .approval-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1em;
    }
    .approval-banner .button-secondary {
        width: 100%;
        text-align: center;
        margin-top: 0.5em;
    }
}
/* ===================================
   サジェストボックス (datalist代替)
   =================================== */
.form-group {
    /* これが基準位置になる */
    position: relative;
}

.suggestions-container {
    display: none; /* 普段は隠しておく */
    position: absolute;
    /*top: 100%; /* inputの真下に表示 */
    left: auto;
    /*transform: translateX(-50%); /* 要素自身の幅の半分だけ左にずらす */
    /*right: 0;*/
    width: auto;
    /*max-width: 600px;*/
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 150px;
    overflow-y: auto;
    z-index: 1000;
    box-sizing: border-box;
}

.suggestion-item {
    padding: 0.75em 1em;
    cursor: pointer;
    color: var(--text-color);
}

.suggestion-item:hover {
    background-color: var(--primary-color-light);
}

.suggestion-item small {
    color: var(--text-secondary-color);
    font-size: 0.8em;
    display: block; /* 2行表示にする */
    word-break: break-all;
}
/* === ランキングテーブルの整形 (explorer.html用) === */

.ranking-table {
    width: 100%;             /* テーブル幅をコンテナいっぱいに */
    border-collapse: collapse; /* ボーダーを重ねる */
    margin-bottom: 1em;      /* テーブル下の余白 */
}

.ranking-table th,
.ranking-table td {
    padding: 0.8em 0.5em;       /* セル内の余白を調整 (上下を少し広めに) */
    border-bottom: 1px solid var(--border-color); /* 下線 */
    text-align: center;         /* 基本的に中央揃え */
    vertical-align: middle;     /* 上下中央揃え (ズレ防止) */
}

/* ヘッダー行 (th) のスタイル */
.ranking-table th {
    font-weight: bold;
    white-space: nowrap; /* ヘッダーが折り返さないように */
}

/* 各列の細かい調整 */
.ranking-table .rank {
    width: 50px;        /* 順位列の幅を固定 */
    font-weight: bold;
}

.ranking-table .tag {
    /* タグ列は中央揃えのまま */
    font-family: inherit; /* monospace指定を解除 (任意) */
}

.ranking-table .count {
    text-align: right;   /* カウント数は右揃え */
    width: 80px;         /* カウント列の幅を固定 */
    white-space: nowrap;
}

/* テーブル本体 (tbody) の最後の行の下線を消す */
.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

/* (任意) 行にマウスを乗せたときの背景色 */
.ranking-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03); /* 薄いグレー */
}
body.dark-mode .ranking-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05); /* ダークモード用の薄い色 */
}

/* === ここまで === */
/* css/style.css に追加 */

#header-logout-btn {
  /* 1. 「モード切替」ボタンから少し右に離します */
  margin-left: 20px; /* 10px や 0.5em など、お好みの距離に調整してください */

  /* 2. 角を丸めてデザインを整えます */
  border-radius: 10px; /* 角の丸み */
  
  /* 3. ボタン内の余白 (padding) を調整します */
  padding: 6px 12px;  /* おそらく #dark-mode-toggle と同じ値にすると綺麗に揃います */

  /* * 4. 目立ちすぎないよう、枠線や背景色を調整します。
   * (もし #dark-mode-toggle に指定があれば、それに合わせるのがベストです) 
   */
  border: 1px solid #ccc;  /* 枠線 */
  background-color: #f0f0f0; /* 背景色 */
  color: #333;            /* 文字色 */
  cursor: pointer;
}

/* * もし theme.js でダークモードを制御している場合、
 * 以下のようにダークモード用のスタイルも定義すると完璧です。
 */
body.dark-mode #header-logout-btn {
  border-color: #555;
  background-color: #333;
  color: #f0f0f0;
}

/* css/style.css に追加 */

/* Galleryページのページネーションの下に隙間を追加 */
#gallery-pagination {
  margin-bottom: 20px; /* 20pxの隙間を追加 (この数値はお好みで調整してください) */
}
.page-container {
            display: grid;
            /* 左に 280px のサイドバー、残りをメインコンテンツに */
            grid-template-columns: 280px 1fr;
            gap: 2em; /* 2つのカラム間の隙間 */
        }

        /* ガイドリンク（左側）のスタイル上書き */
        .sidebar-left .guide-links {
            /* style.css の横並びグリッドを上書き */
            grid-template-columns: 1fr; /* 1列（縦並び）に変更 */
            gap: 1em;
        }
        
        /* スマホなど画面が狭い場合 (900px以下) */
        @media (max-width: 900px) {
            .page-container {
                /* 2カラムを解除し、1列（縦並び）に戻す */
                grid-template-columns: 1fr;
            }
            .sidebar-left {
                /* スマホでは「初めての方へ」が先に表示される */
                margin-bottom: 2em;
            }
        }

/* --- link.html 用のスタイル (リッチデザイン版) --- */

.link-page-header {
    margin-bottom: 2em;
    border-bottom: 1px solid var(--border-color, #ddd);
    padding-bottom: 1em;
}

.link-section-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 2em 0 1em;
    color: var(--text-color, #333);
    display: flex;
    align-items: center;
}
.link-section-title::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background-color: var(--border-color, #ddd);
    margin-left: 1em;
    opacity: 0.5;
}

.link-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 少し幅を狭めて密度を上げる */
    gap: 20px;
}

.link-card {
    display: flex;
    flex-direction: column; /* アイコンを上に、テキストを下にするレイアウトも可だが、今回は横並び維持で洗練 */
    align-items: flex-start;
    background-color: var(--card-bg-color, #ffffff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px; /* 角丸を少し大きく */
    padding: 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* 滑らかなアニメーション */
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 控えめな影 */
}

/* アクセントカラーのライン（左端） */
.link-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--border-color, #ccc); /* デフォルト色 */
    transition: width 0.2s ease;
}

/* 個別のアクセントカラー */
.link-card.accent-blue::before { background-color: #007bff; }
.link-card.accent-niit::before { background-color: #0056b3; } /* NIITカラー(仮) */

/* ホバー時のエフェクト */
.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: transparent; /* 枠線を消して影を強調 */
}
.link-card:hover::before {
    width: 6px; /* ラインを少し太く */
}

/* ダークモード対応 (コントラスト強化) */
body.dark-mode .link-card {
    background-color: #2a2a2a; /* カード背景を少し明るく */
    border-color: #444;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
body.dark-mode .link-card:hover {
    background-color: #333;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.link-icon {
    font-size: 2.5em;
    margin-bottom: 10px; /* アイコンの下に余白 */
}

.link-info {
    width: 100%;
}

.link-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color, #007bff);
    line-height: 1.3;
}
/* ダークモードでの見出し色調整 */
body.dark-mode .link-info h3 {
    color: #8ab4f8; /* 明るい青 */
}

.link-info p {
    margin: 0 0 12px 0;
    font-size: 0.9em;
    color: var(--text-secondary-color, #666);
    line-height: 1.5;
}
/* ダークモードでの本文色調整 (コントラスト確保) */
body.dark-mode .link-info p {
    color: #ccc; /* 薄すぎないグレー */
}

.link-url {
    font-size: 0.75em;
    color: #999;
    display: inline-block;
    background-color: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace; /* URLっぽさを出す */
}
body.dark-mode .link-url {
    color: #aaa;
    background-color: rgba(255,255,255,0.1);
}


/* style.css (外部CSSファイルに追記することを想定) */

/* ヘッダー全体にトランジションを追加 */
.hero-header {
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
}

/* ヘッダー非表示時のスタイル */
.hero-header.hidden-header {
    /* 自身の高さを考慮して完全に上に移動 */
    transform: translateY(-100%);
    box-shadow: none;
}

/* ヘッダーのトグルボタンのスタイル */
#header-toggle-btn {
    /* 他のヘッダーボタンと馴染むように */
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.3s;
}

#header-toggle-btn:hover {
    background-color: var(--color-primary-hover);
}

/* ヘッダーが隠れている時のボタンの表示 (下矢印) */
.hero-header.hidden-header #header-toggle-btn {
    /* ヘッダーが隠れても、ボタンだけは画面上端に残す */
    position: fixed;
    top: 0;
    right: 10px;
    z-index: 1001;
    /* ボタンの表示を「下矢印」に変える */
    content: "▼";
    transform: none; /* トランスフォームの継承を解除 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
/* --- 作品カード内のファイル情報バッジ --- */
.file-info-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明の黒 */
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: bold;
    font-family: sans-serif;
    pointer-events: none; /* クリックを邪魔しない */
    z-index: 5;
    backdrop-filter: blur(2px); /* 背景を少しぼかす */
    letter-spacing: 0.5px;
}
/* --- プレビュー画像入力欄のダークモード対応 --- */
body.dark-mode .form-group {
    background-color: #2a2a2a !important; /* 背景を暗く */
    border-color: #444 !important;         /* 枠線を暗く */
}

body.dark-mode .form-group label {
    color: #8ab4f8 !important; /* ラベルを明るい青に (視認性向上) */
}

body.dark-mode .form-group small,
body.dark-mode .form-group div {
    color: #ccc !important; /* 説明文を明るいグレーに */
}

/* ファイル選択ボタン周りの調整 */
body.dark-mode input[type="file"] {
    color: #e0e0e0;
}

/* --- ステータス表示のスタイル (カード中央に浮かせる版) --- */
.status-text {
    /* 重要: position: absolute を使うことで、
       親要素 (.nft-card または .action-left) を基準にして配置されます。
       画面全体の中央ではなく、カードの中央に来るようになります。
    */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    
    /* 幅とサイズの調整 */
    width: 90%;           /* カード幅の90%に収める */
    max-width: 280px;     /* 大きくなりすぎないように */
    box-sizing: border-box; /* パディングを含めて幅を計算 (はみ出し防止) */
    
    /* 見た目の装飾 */
    padding: 15px;
    background-color: rgba(227, 242, 253, 0.95); /* 薄い青 (少し透過させて背景を透かす) */
    color: #0d47a1;          /* 濃い青 */
    border: 2px solid #90caf9; /* 枠線を少し太く */
    border-radius: 8px;
    
    font-weight: bold;
    font-size: 1em;
    text-align: center;
    
    z-index: 100; /* 画像や文字の上に重ねる */
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); /* 影をつけて浮かせる */
    
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* ポップアップアニメーション */
    pointer-events: none; /* 下にあるボタンなどを間違って押さないように(念のため) */
}

/* 成功時 */
.status-text.success {
    background-color: rgba(232, 245, 233, 0.95);
    color: #1b5e20;
    border-color: #66bb6a;
}

/* エラー時 */
.status-text.error {
    background-color: rgba(255, 235, 238, 0.95);
    color: #b71c1c;
    border-color: #ef5350;
}

/* ポップアップのアニメーション定義 */
@keyframes popIn {
    from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ダークモード対応 */
body.dark-mode .status-text {
    background-color: rgba(26, 35, 126, 0.95);
    color: #e3f2fd;
    border-color: #5c6bc0;
}
body.dark-mode .status-text.success {
    background-color: rgba(27, 94, 32, 0.95);
    color: #e8f5e9;
    border-color: #43a047;
}
/* --- GKC送付タブの強制左寄せ --- */
/* HTML側のスタイル記述に関わらず、強制的に左寄せにします */
#send-gkc .form-container {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* ついでに、単独ページ(send-gkc.html)用も念のため */
body > main > .form-container {
    margin-left: 0 !important; 
    margin-right: auto !important;
}

/* ヘッダー隠し機能用スタイル */
.hidden-header {
    transform: translateY(-100%); /* 上にスライドして隠す */
}

/* トグルボタン */
.header-toggle-btn {
    position: fixed;
    top: 10px;      /* ヘッダーより少し下 */
    right: 10px;    /* 右端 */
    z-index: 1001;  /* ヘッダー(z-index:1000)より上 */
    
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s, top 0.3s;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* ヘッダーが隠れている時のボタンの位置調整 (必要であれば) */
.hidden-header + .header-toggle-btn {
    /* top: 10px; のままでOKなら指定不要 */
}

/* ▼▼▼ 追加: スマホでの位置調整（少し内側に寄せるなど） ▼▼▼ */
@media (max-width: 768px) {
    .header-toggle-btn {
        top: 15px;
        right: 15px;
        width: 35px; /* 少し大きくしてタップしやすく */
        height: 35px;
        font-size: 1em;
    }

/* ▲▲▲ 追加ここまで ▲▲▲ */

/* @media (max-width: 1080px) のブロック内の一番最後に追加してください */

    /* --- テーブルのスマホ最適化 (画面幅に収める設定) --- */
    .transaction-table, 
    .leaderboard-table, 
    .ranking-table, 
    .gkc-history-table {
        min-width: auto !important; /* 600pxの強制確保を解除 */
        width: 100% !important;     /* 画面幅に合わせる */
        table-layout: fixed;        /* 列幅を均等配分ベースにする */
        font-size: 0.7em !important; /* 文字を小さくする */
    }

    /* セルの余白を極限まで詰める */
    .transaction-table th, .transaction-table td,
    .ranking-table th, .ranking-table td,
    .gkc-history-table th, .gkc-history-table td {
        padding: 4px 2px !important;    /* 上下4px, 左右2px */
        white-space: normal !important; /* 文字の折り返しを許可 */
        word-break: break-all;          /* 長いアドレスなども強制的に折り返す */
        overflow-wrap: break-word;
    }

    /* アイコン列などの幅調整 */
    .tx-icon {
        width: 20px !important;
        font-size: 1.2em !important;
        padding: 0 !important;
        text-align: center;
    }

    /* ランキングの「順位」列を狭く */
    .ranking-table .rank {
        width: 25px !important;
    }
    
    /* ランキングの「件数」列を狭く */
    .ranking-table .count {
        width: 50px !important;
        white-space: nowrap !important; /* 件数は折り返さない */
    }
    
    /* トランザクションの日時列を調整 */
    .transaction-table td:first-child {
        width: 65px !important; /* 日付が入るギリギリの幅 */
        line-height: 1.2;
    }

    /* @media (max-width: 1080px) のブロック内に追加してください */

    /* --- ページネーションのスマホ最適化 --- */
    .pagination-controls {
        display: flex;
        flex-wrap: wrap; /* 幅が足りないときは折り返す */
        justify-content: center;
        gap: 5px; /* ボタン間の隙間を狭く */
        margin-top: 15px;
        width: 100%;
        box-sizing: border-box;
    }

    /* 「前へ」「次へ」ボタンを小さく */
    .pagination-controls button {
        padding: 5px 10px;
        font-size: 0.8em;
        margin: 0; /* マージンをリセット */
    }

    /* ページ番号リストの調整 */
    .page-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px; /* ページ番号同士の隙間をさらに詰める */
    }

    /* ページ番号ボタン単体の調整 */
    .page-links a, 
    .page-links span {
        padding: 5px 8px; /* 内側の余白を小さく */
        font-size: 0.8em; /* 文字サイズを小さく */
        min-width: 25px;  /* 押しやすさを考慮した最低幅 */
        text-align: center;
    }

/* @media (max-width: 1080px) のブロック内に追加してください */

    /* --- ページネーションのスマホ最適化 --- */
    .pagination-controls {
        display: flex;
        flex-wrap: wrap; /* 画面幅が足りないときに折り返す */
        justify-content: center; /* 中央寄せ */
        gap: 5px; /* ボタン間の隙間を小さく */
        margin-top: 20px;
    }

    .page-links {
        display: flex;
        flex-wrap: wrap; /* ページ番号リンクも折り返す */
        justify-content: center;
        gap: 3px;
    }

    /* ボタン自体のサイズ調整 */
    .pagination-controls button,
    .page-links a,
    .page-links span {
        padding: 6px 10px !important; /* 内側の余白を少し減らす */
        font-size: 0.85em !important; /* 文字サイズを少し小さく */
        margin: 2px !important; /* 外側の余白も調整 */
        flex-shrink: 0; /* 縮みすぎないようにする */
    }

    /* 「前のページ」「次のページ」ボタンの文字を短くする工夫 (任意) */
    /* 画面幅が極端に狭い場合(350px以下)の微調整 */
    @media (max-width: 350px) {
        .pagination-controls button {
            font-size: 0.75em !important;
            padding: 5px 8px !important;
        }
    }
}

/* --- コントラクトアドレス等の長い文字列のはみ出し防止 --- */
/* (末尾または適当な場所に追加してください) */

#contract-address, 
#token-id, 
#artwork-owner, 
#artwork-creators,
#user-address {
    /* 長い文字列が来てもはみ出さないようにする */
    overflow-wrap: break-word; /* 可能な場所で折り返す */
    word-break: break-all;     /* 必要なら単語の途中でも折り返す */
    
    /* もし1行に収めて「...」にしたい場合はこちらを使用してください */
    /*
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block; 
    max-width: 100%;
    */
}

/* スマホ表示時の微調整 */
@media (max-width: 768px) {
    #contract-address {
        font-size: 0.8em; /* スマホではフォントサイズを少し小さくする */
    }
}
/* css/style.css */

/* ... existing code ... */

/* マイページのスライダーコンテナ: 初期状態は非表示 */
#card-size-control {
    display: none; /* JSで条件が合致したときだけ flex にする */
}

/* ===============================================================
   統合された外部ページのスタイル (Manual, Guide, About)
   thread.html で読み込んだ際にも反映させるため、ここに集約します。
   =============================================================== */

/* --- manual.html / nft-guide.html 用スタイル --- */
.manual-content {
    line-height: 1.8;
}
.manual-content h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5em;
    margin-top: 2em;
}
.manual-content h3 {
    border-left: 5px solid #007bff;
    padding-left: 0.8em;
}
.manual-content img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 1em 0;
}
.important-note {
    background-color: #fffbe6;
    border: 1px solid #ffe58f;
    padding: 1em;
    border-radius: 5px;
}
/* ダークモード時の important-note (既存style.cssにあるかもしれないが念のため統合) */
body.dark-mode .important-note {
    background-color: #4d441e; 
    border-color: #8c7b3e;
    color: #e0e0e0;
}

/* テーブルスタイル (manual.html) */
.network-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}
.network-table th, .network-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
.network-table th {
    background-color: #f2f2f2;
    width: 30%;
}
body.dark-mode .network-table th {
    background-color: #333;
    color: #fff;
}
body.dark-mode .network-table td {
    border-color: #444;
}

/* --- about.html 用スタイル --- */
.about-content {
    line-height: 1.8;
    max-width: 800px;
    margin: 2em auto;
    padding: 0 1em;
}
.about-content h2, .about-content h3 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    margin-top: 2em;
}
.about-content .role-list {
    list-style-type: none;
    padding-left: 0;
}
.about-content .role-list li {
    margin-bottom: 1.5em;
}
.about-content .role-list h4 {
    margin-bottom: 0.3em;
    font-size: 1.2em;
}
.about-content .role-list p {
    margin-top: 0;
    padding-left: 1em;
    border-left: 3px solid #ccc;
}
body.dark-mode .about-content .role-list p {
    border-left-color: #555;
}

/* --- gkc-guide.html 用スタイル --- */
.gkc-guide-content {
    line-height: 1.8;
    max-width: 800px;
    margin: 2em 0;
    padding: 0 1em;
}
.gkc-guide-content h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5em;
    margin-top: 2em;
}
.gkc-guide-content h3 {
    border-left: 5px solid #007bff;
    padding-left: 0.8em;
}
.gkc-guide-content ul {
    list-style-type: none;
    padding-left: 0;
}
.gkc-guide-content li {
    margin-bottom: 1.5em;
}
.gkc-guide-content strong {
    color: #007bff;
}
/* ダークモード対応 */
body.dark-mode .gkc-guide-content strong {
    color: #8ab4f8;
}
/* --- ▼▼▼ 追加: 関連作品チップのスタイル ▼▼▼ --- */
.related-nft-chip {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0; /* ライトモード: 明るいグレー */
    color: #333;               /* ライトモード: 黒文字 */
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    margin: 5px 5px 0 0;
    font-size: 0.95em;
    transition: all 0.2s ease;
}

.related-nft-chip img {
    width: 20px; 
    height: 20px; 
    object-fit: cover; 
    border-radius: 50%; 
    margin-right: 8px;
}

/* 削除ボタン */
.related-nft-chip .remove-related-btn {
    border: none;
    background: none;
    cursor: pointer;
    font-weight: bold;
    color: #888;
    margin-left: 8px;
    padding: 0 4px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
}
.related-nft-chip .remove-related-btn:hover {
    color: #d9534f; /* 赤色 */
}

/* ▼ ダークモード時のスタイル上書き ▼ */
body.dark-mode .related-nft-chip {
    background-color: #343a40; /* 暗い背景 */
    color: #e9ecef;            /* 白い文字 */
    border-color: #495057;
}
body.dark-mode .related-nft-chip .remove-related-btn {
    color: #adb5bd;
}
body.dark-mode .related-nft-chip .remove-related-btn:hover {
    color: #ff6b6b;
}
/* --- ▲▲▲ 追加ここまで ▲▲▲ --- */
/* css/style.css に追加 */

/* ヘッダーの重なり順序を下げる、または... */
header, .navbar {
    z-index: 11 !important; /* 必要最小限の値にする */
}

/* WalletConnect (Web3Modal) の重なり順序を最強にする */
/* Web3Modalは通常 z-index が高いですが、念のため */
w3m-modal {
    z-index: 2147483647 !important; /* 理論上の最大値 */
}