/**
 * 五目並べゲームのスタイルシート
 */

.gomoku-game {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', sans-serif;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* ヘッダー部分 */
.gomoku-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

/* Hタグのデフォルトスタイルをリセット */
.gomoku-header h1,
.gomoku-header h2,
.gomoku-header h3,
.gomoku-header h4,
.gomoku-header h5,
.gomoku-header h6 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.gomoku-title {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.gomoku-status {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.current-player, .game-status {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

#current-player {
    font-weight: bold;
    color: #ffd700;
}

/* ボードコンテナ */
.gomoku-board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.gomoku-board {
    display: inline-block;
    background: #8B4513;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 3px solid #654321;
}

/* ライトテーマでの盤面の色 */
.gomoku-game:not(.dark-theme) .gomoku-board {
    background: #8B4513;
    border-color: #654321;
}

.gomoku-row {
    display: flex;
    margin: 0;
}

.gomoku-cell {
    width: 35px;
    height: 35px;
    border: 1px solid #654321;
    background: #DEB887;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ライトテーマでのセルの色 */
.gomoku-game:not(.dark-theme) .gomoku-cell {
    background: #DEB887;
    border-color: #654321;
}

.gomoku-cell:hover {
    background: #F4A460;
    transform: scale(1.05);
    z-index: 1;
}

/* ライトテーマでのセルのホバー色 */
.gomoku-game:not(.dark-theme) .gomoku-cell:hover {
    background: #F4A460;
}

.gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚫️';
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚪️';
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
    border: none;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 絵文字キャラクターモード */
.gomoku-cell.character-mode {
    position: relative;
}

/* 空のセルには何も表示しない */
.gomoku-cell.character-mode::before {
    content: '';
    display: none;
}

/* 黒プレイヤーのセルに😎を表示 */
.gomoku-cell.character-mode.black::before {
    content: '😎';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* 白プレイヤーのセルに🤡を表示 */
.gomoku-cell.character-mode.white::before {
    content: '🤡';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* ファンタジーキャラクター - 黒プレイヤー */
.gomoku-cell.fantasy-mode.black::before {
    content: '👺';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* ファンタジーキャラクター - 白プレイヤー */
.gomoku-cell.fantasy-mode.white::before {
    content: '💀';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* アニメキャラクター - 黒プレイヤー */
.gomoku-cell.anime-mode.black::before {
    content: '👽';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* アニメキャラクター - 白プレイヤー */
.gomoku-cell.anime-mode.white::before {
    content: '☠️';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* 追加の絵文字キャラクター */
.gomoku-cell.emoji-mode.black::before {
    content: '😼';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

.gomoku-cell.emoji-mode.white::before {
    content: '🫥';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* 悪魔vsおばけキャラクター */
.gomoku-cell.demon-mode.black::before {
    content: '😈';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

.gomoku-cell.demon-mode.white::before {
    content: '👻';
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    box-shadow: none;
}

/* ライトテーマでの石の色（キャラクターモード以外） */
.gomoku-game:not(.dark-theme) .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚫️';
    background: none;
    border: none;
    box-shadow: none;
    font-size: 28px;
}

.gomoku-game:not(.dark-theme) .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚪️';
    background: none;
    border: none;
    box-shadow: none;
    font-size: 28px;
}

/* コントロールボタン */
.gomoku-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.gomoku-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gomoku-btn-reset {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.gomoku-btn-reset:hover {
    background: linear-gradient(135deg, #ff5252, #d63031);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.gomoku-btn-undo {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.gomoku-btn-undo:hover {
    background: linear-gradient(135deg, #5dade2, #3498db);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* AIレベル選択 */
.ai-level-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
}

/* キャラクター選択 */
.character-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    margin-top: 10px;
}

.character-selector label {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.character-selector .gomoku-select {
    min-width: 120px;
}

/* ライトテーマでのAIレベル選択 */
.gomoku-game:not(.dark-theme) .ai-level-selector {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* ライトテーマでのキャラクター選択 */
.gomoku-game:not(.dark-theme) .character-selector {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.ai-level-selector label {
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.gomoku-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* ライトテーマでのセレクター */
.gomoku-game:not(.dark-theme) .gomoku-select {
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #333;
}

.gomoku-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.gomoku-select option {
    background: #4a5568;
    color: white;
}

/* ライトテーマでのセレクターオプション */
.gomoku-game:not(.dark-theme) .gomoku-select option {
    background: #ffffff;
    color: #333;
    border: 1px solid #e2e8f0;
}

/* ゲーム情報 */
.gomoku-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* ライトテーマでのゲーム情報 */
.gomoku-game:not(.dark-theme) .gomoku-scores,
.gomoku-game:not(.dark-theme) .gomoku-history {
    background: #ffffff;
    color: #333;
    border: 1px solid #e2e8f0;
}

.gomoku-game:not(.dark-theme) .score-item {
    border-bottom-color: #e2e8f0;
}

.gomoku-game:not(.dark-theme) .player-label {
    color: #333;
}

.gomoku-game:not(.dark-theme) .score-value {
    color: #667eea;
}

.gomoku-game:not(.dark-theme) .gomoku-history h4 {
    color: #333;
}

.gomoku-game:not(.dark-theme) .history-list {
    color: #666;
}

.gomoku-scores {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.score-item:last-child {
    border-bottom: none;
}

.player-label {
    font-weight: 600;
    color: #333;
}

.score-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.gomoku-history {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gomoku-history h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    font-size: 14px;
    color: #666;
}

/* ゲーム履歴アイテムのスタイル */
.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-time {
    color: #999;
    font-size: 12px;
    min-width: 50px;
}

.history-winner {
    color: #333;
    font-weight: 500;
    flex: 1;
    text-align: center;
}

    .history-moves {
        color: #666;
        font-size: 12px;
        min-width: 40px;
        text-align: right;
    }
    
    /* ログイン通知のスタイル */
    .gomoku-login-notice {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        padding: 25px;
        border-radius: 12px;
        border: 2px solid #dee2e6;
        text-align: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .gomoku-login-notice h4 {
        margin: 0 0 20px 0;
        color: #495057;
        font-size: 20px;
        font-weight: bold;
    }
    
    .login-benefits {
        margin-bottom: 25px;
        text-align: left;
    }
    
    .benefit-title {
        margin: 0 0 15px 0;
        color: #495057;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
    }
    
    .benefit-list {
        list-style: none;
        padding: 0;
        margin: 0;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 10px;
    }
    
    .benefit-list li {
        color: #6c757d;
        font-size: 14px;
        padding: 8px 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .benefit-list li:last-child {
        border-bottom: none;
    }
    
    .login-actions {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }
    
    .gomoku-btn-register {
        background: linear-gradient(135deg, #28a745, #20c997);
        color: white;
        padding: 12px 24px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .gomoku-btn-register:hover {
        background: linear-gradient(135deg, #20c997, #17a2b8);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        color: white;
        text-decoration: none;
    }
    
    .gomoku-btn-login {
        background: linear-gradient(135deg, #007bff, #0056b3);
        color: white;
        padding: 12px 24px;
        border-radius: 25px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }
    
    .gomoku-btn-login:hover {
        background: linear-gradient(135deg, #0056b3, #004085);
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        color: white;
        text-decoration: none;
    }
    
    .login-note {
        margin: 0;
        color: #6c757d;
        font-size: 13px;
        font-style: italic;
    }

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .gomoku-game {
        padding: 15px;
        margin: 10px;
    }
    
    .gomoku-title {
        font-size: 24px;
    }
    
    .gomoku-status {
        flex-direction: column;
        gap: 10px;
    }
    
    .gomoku-cell {
        width: 25px;
        height: 25px;
    }
    
    .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before,
    .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
        font-size: 20px;
    }
    
    .gomoku-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .gomoku-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .gomoku-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* レスポンシブでのライトテーマ盤面色 */
@media (max-width: 768px) {
    .gomoku-game:not(.dark-theme) .gomoku-board {
        background: #8B4513;
        border-color: #654321;
    }
    
    .gomoku-game:not(.dark-theme) .gomoku-cell {
        background: #DEB887;
        border-color: #654321;
    }
    
    .gomoku-game:not(.dark-theme) .gomoku-cell:hover {
        background: #F4A460;
    }
    
    /* モバイルでの登録案内 */
    .login-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .gomoku-btn-register,
    .gomoku-btn-login {
        width: 100%;
        max-width: 200px;
    }
    
    .benefit-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .gomoku-board {
        padding: 15px;
    }
    
    .gomoku-cell {
        width: 20px;
        height: 20px;
    }
    
    .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before,
    .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
        font-size: 16px;
    }
    
    .gomoku-title {
        font-size: 20px;
    }
}

/* 小画面でのライトテーマ盤面色 */
@media (max-width: 480px) {
    .gomoku-game:not(.dark-theme) .gomoku-board {
        background: #8B4513;
        border-color: #654321;
    }
    
    .gomoku-game:not(.dark-theme) .gomoku-cell {
        background: #DEB887;
        border-color: #654321;
    }
    
    .gomoku-game:not(.dark-theme) .gomoku-cell:hover {
        background: #F4A460;
    }
    
    /* 小画面での登録案内 */
    .gomoku-login-notice {
        padding: 20px 15px;
    }
    
    .gomoku-login-notice h4 {
        font-size: 18px;
    }
    
    .benefit-title {
        font-size: 14px;
    }
    
    .benefit-list li {
        font-size: 13px;
    }
}

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

.gomoku-game {
    animation: fadeIn 0.6s ease-out;
}

/* 勝利時のハイライト */
.gomoku-cell.winning {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* ローディング状態 */
.gomoku-game.loading {
    opacity: 0.7;
    pointer-events: none;
}

.gomoku-game.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
    .gomoku-game {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .gomoku-header {
        background: linear-gradient(135deg, #4c51bf, #553c9a);
    }
    
    .gomoku-board {
        background: #4a5568;
        border-color: #2d3748;
    }
    
    .gomoku-cell {
        background: #718096;
        border-color: #4a5568;
    }
    
    .gomoku-cell:hover {
        background: #a0aec0;
    }
    
    .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
        content: '⚪️';
        background: none;
        border: none;
        box-shadow: none;
        filter: none;
        font-size: 28px;
    }
    
    .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
        content: '⚫️';
        background: none;
        border: none;
        box-shadow: none;
        filter: none;
        font-size: 28px;
    }
    
    .gomoku-scores,
    .gomoku-history {
        background: #4a5568;
        color: #e2e8f0;
        border: 1px solid #2d3748;
    }
    
    .score-item {
        border-bottom-color: #2d3748;
    }
    
    .player-label {
        color: #e2e8f0;
    }
    
    .score-value {
        color: #90cdf4;
    }
    
    .gomoku-history h4 {
        color: #e2e8f0;
    }
    
    .history-list {
        color: #a0aec0;
    }
    
    .history-item {
        border-bottom-color: #2d3748;
    }
    
    .history-time {
        color: #718096;
    }
    
    .history-winner {
        color: #e2e8f0;
    }
    
    .history-moves {
        color: #a0aec0;
    }
    
    .ai-level-selector {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .gomoku-select {
        background: rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .gomoku-select option {
        background: #2d3748;
    }
}

/* ライトテーマ（デフォルト） */
.gomoku-game {
    background: #f8f9fa;
    color: #333;
}

/* ダークテーマクラスが明示的に設定されている場合 */
.gomoku-game.dark-theme {
    background: #2d3748;
    color: #e2e8f0;
}

/* ライトテーマでのHタグスタイルリセット */
.gomoku-game .gomoku-header h1,
.gomoku-game .gomoku-header h2,
.gomoku-game .gomoku-header h3,
.gomoku-game .gomoku-header h4,
.gomoku-game .gomoku-header h5,
.gomoku-game .gomoku-header h6 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* ダークテーマでのHタグスタイルリセット */
.gomoku-game.dark-theme .gomoku-header h1,
.gomoku-game.dark-theme .gomoku-header h2,
.gomoku-game.dark-theme .gomoku-header h3,
.gomoku-game.dark-theme .gomoku-header h4,
.gomoku-game.dark-theme .gomoku-header h5,
.gomoku-game.dark-theme .gomoku-header h6 {
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

.gomoku-game.dark-theme .gomoku-header {
    background: linear-gradient(135deg, #4c51bf, #553c9a);
}

.gomoku-game.dark-theme .gomoku-board {
    background: #4a5568;
    border-color: #2d3748;
}

.gomoku-game.dark-theme .gomoku-cell {
    background: #718096;
    border-color: #4a5568;
}

.gomoku-game.dark-theme .gomoku-cell:hover {
    background: #a0aec0;
}

.gomoku-game.dark-theme .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    background: radial-gradient(circle at 30% 30%, #ffffff, #f7fafc);
    border: 2px solid #4a5568;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.gomoku-game.dark-theme .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    background: radial-gradient(circle at 30% 30%, #4a5568, #2d3748);
    border: 2px solid #e2e8f0;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.gomoku-game.dark-theme .gomoku-scores,
.gomoku-game.dark-theme .gomoku-history {
    background: #4a5568;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

.gomoku-game.dark-theme .score-item {
    border-bottom-color: #2d3748;
}

.gomoku-game.dark-theme .player-label {
    color: #e2e8f0;
}

.gomoku-game.dark-theme .score-value {
    color: #90cdf4;
}

.gomoku-game.dark-theme .gomoku-history h4 {
    color: #e2e8f0;
}

    .gomoku-game.dark-theme .history-list {
        color: #a0aec0;
    }
    
    .gomoku-game.dark-theme .history-item {
        border-bottom-color: #2d3748;
    }
    
    .gomoku-game.dark-theme .history-time {
        color: #718096;
    }
    
    .gomoku-game.dark-theme .history-winner {
        color: #e2e8f0;
    }
    
    .gomoku-game.dark-theme .history-moves {
        color: #a0aec0;
    }
    
    .gomoku-game.dark-theme .gomoku-login-notice {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .gomoku-game.dark-theme .gomoku-login-notice h4 {
        color: #e2e8f0;
    }
    
    .gomoku-game.dark-theme .benefit-title {
        color: #e2e8f0;
    }
    
    .gomoku-game.dark-theme .benefit-list li {
        color: #a0aec0;
        border-bottom-color: #2d3748;
    }
    
    .gomoku-game.dark-theme .login-note {
        color: #a0aec0;
    }
    
    .gomoku-game.dark-theme .ai-level-selector {
    background: rgba(0, 0, 0, 0.2);
}

.gomoku-game.dark-theme .character-selector {
    background: rgba(0, 0, 0, 0.2);
}

.gomoku-game.dark-theme .gomoku-select {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.gomoku-game.dark-theme .gomoku-select option {
    background: #2d3748;
}

/* ダークモード時の白石の視認性を向上（キャラクターモード以外） */
.gomoku-game.dark-theme .gomoku-cell.white:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚪️';
    background: none;
    border: none;
    box-shadow: none;
    filter: none;
    font-size: 28px;
}

/* ダークモード時の黒石の視認性を向上（キャラクターモード以外） */
.gomoku-game.dark-theme .gomoku-cell.black:not(.character-mode):not(.fantasy-mode):not(.anime-mode):not(.emoji-mode):not(.demon-mode)::before {
    content: '⚫️';
    background: none;
    border: none;
    box-shadow: none;
    filter: none;
    font-size: 28px;
}
