:root {
    --divine-color:  #ffd700;
    --divine-color2: #ff8c00;
}

/* game.css - 神の三択 ネオンテーマUI */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', 'Arial', 'Hiragino Sans', sans-serif;
    background: #0a0e27;
    background-image: 
        radial-gradient(at 20% 80%, rgba(120, 0, 255, 0.15) 0px, transparent 50%),
        radial-gradient(at 80% 20%, rgba(255, 0, 150, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(0, 200, 255, 0.1) 0px, transparent 50%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            rgba(0, 255, 255, 0.03) 0px,
            transparent 1px,
            transparent 2px,
            rgba(0, 255, 255, 0.03) 3px
        );
    pointer-events: none;
    z-index: 1;
}

#app {
    width: 100%;
    max-width: 480px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* タイトル */
h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 
        0 0 10px rgba(0, 255, 255, 0.8),
        0 0 20px rgba(0, 255, 255, 0.6),
        0 0 30px rgba(0, 255, 255, 0.4),
        0 0 40px rgba(255, 0, 150, 0.4);
    letter-spacing: 3px;
    animation: titlePulse 3s ease-in-out infinite;
    background: linear-gradient(45deg, #00ffff, #ff0099, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes titlePulse {
    0%, 100% {
        filter: brightness(1);
        transform: scale(1);
    }
    50% {
        filter: brightness(1.2);
        transform: scale(1.02);
    }
}

h2 {
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 0.85rem;
    color: #00ffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    opacity: 0.8;
    letter-spacing: 1px;
}

/* アクティブユーザー数 */
.active-users {
    font-size: 0.9rem;
    color: #00ff88;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.online-dot {
    width: 10px;
    height: 10px;
    background: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* プレイヤー情報 */
.player-info {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.3);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.2),
        inset 0 0 20px rgba(0, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.player-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(0, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shimmer 3s infinite;
}

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

.player-name {
    font-size: 1.8rem;
    font-weight: 900;
    color: #00ffff;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.player-name:hover {
    transform: scale(1.1);
    text-shadow: 
        0 0 15px rgba(0, 255, 255, 1),
        0 0 30px rgba(0, 255, 255, 0.5);
    letter-spacing: 2px;
}

.rating {
    font-size: 1.1rem;
    color: #ff0099;
    position: relative;
    z-index: 1;
    text-shadow: 0 0 5px rgba(255, 0, 153, 0.8);
    font-weight: bold;
}

/* 統計 */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 255, 255, 0.3);
    padding: 15px 10px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}

.stat-box:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 255, 0.6);
    box-shadow: 
        0 0 25px rgba(0, 255, 255, 0.3),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00ffff, #ff0099);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* ボタン */
.btn {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 0, 153, 0.2));
    border: 2px solid rgba(0, 255, 255, 0.5);
    color: #00ffff;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    width: 100%;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 255, 255, 0.8);
    color: #fff;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, rgba(255, 0, 153, 0.3), rgba(255, 0, 100, 0.3));
    border-color: rgba(255, 0, 153, 0.6);
    color: #ff0099;
    box-shadow: 
        0 0 20px rgba(255, 0, 153, 0.4),
        inset 0 0 10px rgba(255, 0, 153, 0.1);
}

.btn-primary:hover {
    border-color: rgba(255, 0, 153, 1);
    color: #fff;
    box-shadow: 
        0 0 30px rgba(255, 0, 153, 0.8),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    font-size: 0.95rem;
    padding: 12px 30px;
}

.btn-cancel {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.2), rgba(139, 0, 0, 0.2));
    border-color: rgba(255, 0, 0, 0.5);
    color: #ff4444;
    font-size: 0.95rem;
    padding: 12px 30px;
    margin-top: 1rem;
}

.btn-cancel:hover {
    border-color: rgba(255, 0, 0, 1);
    color: #fff;
    box-shadow: 
        0 0 30px rgba(255, 0, 0, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.menu-buttons {
    margin-top: 1rem;
}

/* マッチング・待機画面 */
.status {
    font-size: 1.2rem;
    margin: 2rem 0;
    color: #00ffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.match-code-display {
    margin: 2rem 0;
}

.match-code {
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ffff;
    letter-spacing: 10px;
    text-shadow: 
        0 0 20px rgba(0, 255, 255, 1),
        0 0 40px rgba(0, 255, 255, 0.5);
    margin: 1rem 0;
    padding: 25px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    border: 3px solid rgba(0, 255, 255, 0.5);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    animation: codePulse 2s ease-in-out infinite;
}

@keyframes codePulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(0, 255, 255, 0.3),
            inset 0 0 20px rgba(0, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 0 50px rgba(0, 255, 255, 0.6),
            inset 0 0 30px rgba(0, 255, 255, 0.2);
    }
}

/* ゲーム画面 */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
}

.player-bar {
    flex: 1;
}

.vs {
    font-size: 1.8rem;
    font-weight: 900;
    margin: 0 15px;
    color: #ff0099;
    text-shadow: 
        0 0 10px rgba(255, 0, 153, 1),
        0 0 20px rgba(255, 0, 153, 0.5);
    animation: vsPulse 1.5s ease-in-out infinite;
}

@keyframes vsPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.player-label {
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hp-value {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00ffff, #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

.buff {
    display: inline-block;
    font-size: 0.75rem;
    color: #00ff88;
    margin-left: 5px;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.8);
}

.turn-info {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* タイマーコンテナ */
.timer-container {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: rgba(0, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-size: 1rem;
}

.timer-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.timer-value {
    color: #00ffff;
    font-size: 1.4rem;
    font-weight: bold;
    min-width: 40px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.timer-unit {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

/* タイマー警告（残り10秒以下） */
.timer-warning {
    animation: timerPulse 1s infinite;
}

.timer-warning .timer-value {
    color: #ff0099 !important;
    text-shadow: 0 0 15px rgba(255, 0, 153, 1) !important;
}

.timer-warning {
    border-color: rgba(255, 0, 153, 0.5) !important;
    background: rgba(255, 0, 153, 0.1) !important;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(255, 0, 153, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px rgba(255, 0, 153, 0.6);
    }
}

/* ========================================
   エフェクト関連
======================================== */

/* ダメージ/回復の数値表示 */
.damage-text {
    position: fixed;
    font-size: 3rem;
    font-weight: 900;
    pointer-events: none;
    z-index: 9999;
    animation: floatUp 1.5s ease-out forwards;
    text-shadow: 0 0 20px currentColor;
    font-family: 'Orbitron', sans-serif;
}

.damage-text.damage {
    color: #ff0099;
    text-shadow: 
        0 0 20px #ff0099,
        0 0 40px #ff0099,
        0 0 60px #ff0099;
}

.damage-text.heal {
    color: #00ff88;
    text-shadow: 
        0 0 20px #00ff88,
        0 0 40px #00ff88,
        0 0 60px #00ff88;
}

.damage-text.miss {
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-50px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.8);
    }
}

/* 攻撃エフェクト */
.attack-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    animation: attackFlash 0.5s ease-out forwards;
}

.attack-flash.damage {
    background: radial-gradient(circle, rgba(255, 0, 153, 0.5) 0%, transparent 70%);
}

.attack-flash.heal {
    background: radial-gradient(circle, rgba(0, 255, 136, 0.5) 0%, transparent 70%);
}

@keyframes attackFlash {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* HP変動アニメーション */
.hp-change {
    animation: hpPulse 0.5s ease-out;
}

@keyframes hpPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
}

/* 画面シェイク */
.screen-shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

/* パーティクルエフェクト */
.particle {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    opacity: 1;
}

.particle.damage {
    background: radial-gradient(circle, #ff0099, #ff0055);
    box-shadow: 0 0 10px #ff0099;
}

.particle.heal {
    background: radial-gradient(circle, #00ff88, #00dd66);
    box-shadow: 0 0 10px #00ff88;
}

.particle.sparkle {
    background: radial-gradient(circle, #ffff00, #ffaa00);
    box-shadow: 0 0 10px #ffff00;
}

/* 成功/失敗の表示 */
.result-banner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 4rem;
    font-weight: 900;
    padding: 30px 60px;
    border-radius: 20px;
    pointer-events: none;
    z-index: 10000;
    animation: bannerPop 1s ease-out forwards;
    text-shadow: 0 0 30px currentColor;
    font-family: 'Orbitron', sans-serif;
}

.result-banner.success {
    color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
    border: 3px solid #00ff88;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.5),
        inset 0 0 30px rgba(0, 255, 136, 0.2);
}

.result-banner.failure {
    color: #ff0099;
    background: rgba(255, 0, 153, 0.2);
    border: 3px solid #ff0099;
    box-shadow: 
        0 0 30px rgba(255, 0, 153, 0.5),
        inset 0 0 30px rgba(255, 0, 153, 0.2);
}

@keyframes bannerPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    70% {
        transform: translate(-50%, -50%) scale(0.9);
    }
    85% {
        transform: translate(-50%, -50%) scale(1.05);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* カード選択時の光 */
.choice-card.selecting {
    animation: cardGlow 0.3s ease-out;
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.8),
        0 0 80px rgba(0, 255, 255, 0.4),
        inset 0 0 40px rgba(0, 255, 255, 0.2);
}

@keyframes cardGlow {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 
            0 0 40px rgba(0, 255, 255, 0.8),
            0 0 80px rgba(0, 255, 255, 0.4);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    }
}

/* ターン終了時のオーバーレイ */
.turn-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeInOut 2s ease-in-out forwards;
}

.turn-overlay-text {
    font-size: 5rem;
    font-weight: 900;
    color: #00ffff;
    text-shadow: 
        0 0 30px #00ffff,
        0 0 60px #00ffff,
        0 0 90px #00ffff;
    animation: textPulse 2s ease-in-out;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes textPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* プレイヤーバーのダメージ/回復エフェクト */
.player-bar.hit {
    animation: hitEffect 0.5s ease-out;
}

.player-bar.heal {
    animation: healEffect 0.5s ease-out;
}

@keyframes hitEffect {
    0%, 100% {
        background: rgba(0, 0, 0, 0.6);
    }
    50% {
        background: rgba(255, 0, 153, 0.4);
        box-shadow: 0 0 30px rgba(255, 0, 153, 0.6);
    }
}

@keyframes healEffect {
    0%, 100% {
        background: rgba(0, 0, 0, 0.6);
    }
    50% {
        background: rgba(0, 255, 136, 0.4);
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
    }
}

/* リフレクトエフェクト */
.reflect-effect {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 5px solid #ffff00;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    animation: reflectPulse 1s ease-out forwards;
    box-shadow: 
        0 0 30px #ffff00,
        0 0 60px #ffff00,
        inset 0 0 30px rgba(255, 255, 0, 0.3);
}

@keyframes reflectPulse {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5);
    }
}

.battle-log {
    font-size: 0.8rem;
    color: #00ffff;
    margin-bottom: 1rem;
    padding: 12px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 10px;
    min-height: 40px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

/* 選択肢 */
.choices {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 2rem;
}

.choice-card {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transform-style: preserve-3d;
}

.choice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s;
}

.choice-card:hover::before {
    left: 100%;
}

.choice-card.safe {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.choice-card.gamble {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.choice-card.insane {
    border-color: rgba(255, 0, 153, 0.5);
    box-shadow: 0 0 20px rgba(255, 0, 153, 0.2);
}

.choice-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-width: 3px;
}

.choice-card.safe:hover {
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 255, 136, 1);
}

.choice-card.gamble:hover {
    box-shadow: 
        0 0 40px rgba(255, 215, 0, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 215, 0, 1);
}

.choice-card.insane:hover {
    box-shadow: 
        0 0 40px rgba(255, 0, 153, 0.4),
        0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 0, 153, 1);
}

.choice-card.selected {
    border-width: 4px;
    transform: scale(1.05);
    animation: selectedPulse 1s ease-in-out infinite;
}

@keyframes selectedPulse {
    0%, 100% {
        box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 50px rgba(0, 255, 255, 0.8);
    }
}

.choice-type {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-bottom: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.choice-type.safe {
    background: linear-gradient(135deg, #00ff88, #00ffcc);
    color: #000;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.choice-type.gamble {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.choice-type.insane {
    background: linear-gradient(135deg, #ff0099, #ff3366);
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 153, 0.5);
}

.choice-name {
    font-size: 1.4rem;
    font-weight: 900;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.choice-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    line-height: 1.4;
}

.choice-rate {
    font-size: 0.75rem;
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* 待機中 */
.waiting {
    font-size: 1rem;
    color: #00ffff;
    margin: 2rem 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

.waiting::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* 結果画面 */
.result {
    padding: 30px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 25px;
    margin-bottom: 2rem;
    backdrop-filter: blur(30px);
    position: relative;
    overflow: hidden;
}

.result::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.03) 10px,
        rgba(255, 255, 255, 0.03) 20px
    );
    animation: resultBg 20s linear infinite;
}

@keyframes resultBg {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.result.win {
    border: 3px solid rgba(0, 255, 136, 0.8);
    box-shadow: 
        0 0 50px rgba(0, 255, 136, 0.6),
        inset 0 0 30px rgba(0, 255, 136, 0.2);
}

.result.lose {
    border: 3px solid rgba(255, 0, 153, 0.8);
    box-shadow: 
        0 0 50px rgba(255, 0, 153, 0.6),
        inset 0 0 30px rgba(255, 0, 153, 0.2);
}

.result h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: resultAppear 0.5s ease-out;
}

@keyframes resultAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result.win h2 {
    background: linear-gradient(135deg, #00ff88, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(0, 255, 136, 1));
}

.result.lose h2 {
    background: linear-gradient(135deg, #ff0099, #ff3366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(255, 0, 153, 1));
}

.result p {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.end-reason {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* 神格化エフェクト */
.god-mode {
    animation: godGlow 2s infinite;
}

@keyframes godGlow {
    0%, 100% {
        filter: brightness(1) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    }
    50% {
        filter: brightness(1.3) drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    }
}

.god-mode h1 {
    background: linear-gradient(45deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s linear infinite, godFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 1));
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

@keyframes godFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* 神レベル3（10連勝） */
.god-max h1 {
    background: linear-gradient(
        90deg,
        #ff0000,
        #ff7f00,
        #ffff00,
        #00ff00,
        #0000ff,
        #4b0082,
        #9400d3,
        #ff0000
    );
    background-size: 400% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 3s linear infinite, godMaxFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 1));
}

@keyframes rainbow {
    to {
        background-position: 400% center;
    }
}

@keyframes godMaxFloat {
    0%, 100% { 
        transform: translateY(0) scale(1);
    }
    50% { 
        transform: translateY(-8px) scale(1.05);
    }
}

/* ローディング */
.loading {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 5px solid rgba(0, 255, 255, 0.2);
    border-top-color: #00ffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 
        0 0 20px rgba(0, 255, 255, 0.5),
        inset 0 0 20px rgba(0, 255, 255, 0.2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* レスポンシブ */
@media (max-width: 400px) {
    h1 {
        font-size: 2.2rem;
    }
    
    .choice-name {
        font-size: 1.2rem;
    }
    
    .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .hp-value {
        font-size: 2rem;
    }
    
    .result h2 {
        font-size: 2.5rem;
    }
    
    .match-code {
        font-size: 2rem;
        letter-spacing: 6px;
    }
    
    .stat-value {
        font-size: 1.6rem;
    }
}

@media (max-width: 350px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .player-name {
        font-size: 1.5rem;
    }
}

/* ========================================
   ルーレット演出
======================================== */

.battle-area {
    position: relative;
    min-height: 400px;
}

/* カード対決画面 */
.card-battle-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.card-battle-screen.active {
    opacity: 1;
}

.battle-cards {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

.battle-card-display {
    flex: 1;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #00ffff;
    border-radius: 15px;
    text-align: center;
    animation: cardSlideIn 0.8s ease-out;
}

.battle-card-display.player {
    animation: slideInLeft 0.8s ease-out;
}

.battle-card-display.opponent {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.card-player-label {
    font-size: 0.9rem;
    color: #00ffff;
    margin-bottom: 10px;
    font-weight: bold;
}

.battle-card-name {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 10px;
    font-weight: bold;
}

.battle-card-type {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.battle-card-type.safe {
    background: #00ff88;
    color: #000;
}

.battle-card-type.gamble {
    background: #ffaa00;
    color: #000;
}

.battle-card-type.insane {
    background: #ff0099;
    color: #fff;
}

.battle-card-rate {
    font-size: 1.1rem;
    color: #00ffff;
    font-weight: bold;
}

.vs-large {
    font-size: 2.5rem;
    color: #ff0099;
    text-shadow: 0 0 30px rgba(255, 0, 153, 1);
    animation: vsPulse 1.5s infinite;
    font-weight: 900;
    flex-shrink: 0;
}

@keyframes vsPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* ルーレット画面 */
.roulette-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.5s ease-out;
    text-align: center;
    width: 100%;
}

.roulette-screen.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.roulette-title {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: textGlow 2s infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    }
    50% {
        text-shadow: 0 0 40px rgba(255, 255, 255, 1);
    }
}

.roulette-wheel {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.wheel-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid #ffaa00;
    box-shadow:
        0 0 30px rgba(255, 170, 0, 0.8),
        inset 0 0 30px rgba(255, 170, 0, 0.3);
    background: #1a1a1a;
    overflow: hidden;
}

.wheel-bg svg {
    transform: rotate(-90deg);
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    will-change: transform;
}

.wheel-pointer {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 45px solid #ffff00;
    filter: drop-shadow(0 0 15px rgba(255, 255, 0, 1));
    z-index: 10;
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .battle-cards {
        padding: 10px;
        gap: 5px;
    }
    
    .battle-card-display {
        padding: 15px 10px;
    }
    
    .battle-card-name {
        font-size: 1.1rem;
    }
    
    .vs-large {
        font-size: 2rem;
    }
    
    .roulette-wheel {
        width: 240px;
        height: 240px;
    }
    
    .roulette-title {
        font-size: 1.5rem;
    }
}


/* ========================================
   ★ バトル演出フルスクリーンオーバーレイ（修正版）
   ======================================== */

.battle-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0d1a3a 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.battle-overlay.active {
    opacity: 1;
}

.overlay-phase {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
    animation: overlaySlideIn 0.5s ease forwards;
}

@keyframes overlaySlideIn {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

/* HP表示バー */
.overlay-hp-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 12px 20px;
}

.overlay-hp-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.overlay-hp-name {
    font-size: 0.85rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay-hp-label {
    font-size: 0.7rem;
    color: #666;
}

.overlay-hp-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 20px rgba(0,255,136,0.6);
    font-family: 'Courier New', monospace;
}

.overlay-hp-vs {
    font-size: 1.5rem;
    color: #ff6b35;
}

/* カード対決エリア */
.overlay-cards {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.overlay-card {
    flex: 1;
    max-width: 180px;
    background: rgba(255,255,255,0.05);
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
}

.overlay-card.player-card {
    border-color: rgba(0,150,255,0.5);
    box-shadow: 0 0 20px rgba(0,150,255,0.2);
    animation: cardPulseBlue 1.5s ease-in-out infinite;
}

.overlay-card.opp-card {
    border-color: rgba(255,50,50,0.5);
    box-shadow: 0 0 20px rgba(255,50,50,0.2);
    animation: cardPulseRed 1.5s ease-in-out infinite;
}

@keyframes cardPulseBlue {
    0%, 100% { box-shadow: 0 0 20px rgba(0,150,255,0.2); }
    50% { box-shadow: 0 0 40px rgba(0,150,255,0.5); }
}

@keyframes cardPulseRed {
    0%, 100% { box-shadow: 0 0 20px rgba(255,50,50,0.2); }
    50% { box-shadow: 0 0 40px rgba(255,50,50,0.5); }
}

.overlay-card-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.overlay-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.overlay-card-type {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 20px;
    display: inline-block;
}

.overlay-card-type.safe   { background: rgba(0,200,100,0.2); color: #00ff88; }
.overlay-card-type.gamble { background: rgba(255,200,0,0.2);  color: #ffd700; }
.overlay-card-type.insane { background: rgba(255,0,100,0.2);  color: #ff0099; }

.overlay-card-rate {
    font-size: 0.85rem;
    color: #aaa;
}

/* ★ カード効果詳細表示 */
.overlay-card-effect {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: left;
    background: rgba(0,0,0,0.35);
    border-radius: 8px;
    padding: 6px 10px;
    border-left: 3px solid #ffd700;
    color: #eee;
    white-space: normal;
}
.overlay-card-desc {
    margin-top: 5px;
    font-size: 0.78rem;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* ★ カード選択UI の効果テキスト */
.choice-card-effect {
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.5;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    padding: 5px 8px;
    border-left: 2px solid #ffd700;
    color: #ddd;
    text-align: left;
}

.overlay-vs-text {
    font-size: 2rem;
    font-weight: 900;
    color: #ff6b35;
    text-shadow: 0 0 20px rgba(255,107,53,0.8);
    flex-shrink: 0;
    animation: vsPulse 0.8s ease-in-out infinite alternate;
}

@keyframes vsPulse {
    from { transform: scale(1);   text-shadow: 0 0 20px rgba(255,107,53,0.8); }
    to   { transform: scale(1.1); text-shadow: 0 0 40px rgba(255,107,53,1.0); }
}

.overlay-subtitle {
    font-size: 1rem;
    color: #888;
    letter-spacing: 2px;
    animation: subtitleBlink 1s ease-in-out infinite alternate;
}

@keyframes subtitleBlink {
    from { opacity: 0.6; }
    to   { opacity: 1.0; }
}

/* ルーレット */
#roulettePhase {
    gap: 15px;
}

.roulette-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.6);
    letter-spacing: 2px;
    text-align: center;
}

.roulette-wheel {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto;
}

.wheel-pointer {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: #ffd700;
    z-index: 10;
    text-shadow: 0 0 10px rgba(255,215,0,0.8);
}

.wheel-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #333;
    box-shadow: 0 0 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(0,0,0,0.3);
}

.wheel-center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: #fff;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    border: 3px solid #333;
    box-shadow: 0 0 8px rgba(0,0,0,0.6);
}

.roulette-legend {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
}

.legend-success { color: #FFD700; font-weight: 700; }  /* 金色 = 成功 */
.legend-fail    { color: #cc4444; font-weight: 700; }  /* 赤色 = 失敗 */

/* 結果フェーズ */
#resultPhase {
    gap: 20px;
}

.battle-result-banner {
    font-size: 2.5rem;
    font-weight: 900;
    padding: 12px 30px;
    border-radius: 12px;
    text-align: center;
    animation: resultBannerPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.battle-result-banner.success {
    color: #00ff88;
    background: rgba(0,255,136,0.15);
    border: 2px solid rgba(0,255,136,0.5);
    text-shadow: 0 0 30px rgba(0,255,136,0.8);
}

.battle-result-banner.failure {
    color: #ff0099;
    background: rgba(255,0,153,0.15);
    border: 2px solid rgba(255,0,153,0.5);
    text-shadow: 0 0 30px rgba(255,0,153,0.8);
}

@keyframes resultBannerPop {
    0%   { transform: scale(0.3); opacity: 0; }
    70%  { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1);   opacity: 1; }
}

.battle-result-log {
    font-size: 0.85rem;
    color: #aaa;
    text-align: center;
    max-width: 420px;
    width: 100%;
    padding: 8px 16px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 詳細ログ行 */
.battle-detail-line {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
.battle-detail-action {
    color: #cce;
    background: rgba(100,100,200,0.15);
    border-left: 3px solid #66f;
    font-size: 0.82rem;
}
.battle-detail-damage {
    color: #f88;
    background: rgba(200,50,50,0.2);
    border-left: 3px solid #f44;
    font-size: 1rem;
    letter-spacing: 0.02em;
}
.battle-detail-heal {
    color: #8f8;
    background: rgba(50,200,50,0.15);
    border-left: 3px solid #4c4;
    font-size: 1rem;
}
.battle-detail-miss {
    color: #999;
    background: rgba(100,100,100,0.15);
    border-left: 3px solid #666;
    font-style: italic;
}
.battle-detail-swap {
    color: #ff8;
    background: rgba(200,200,0,0.15);
    border-left: 3px solid #cc0;
}
.battle-detail-info {
    color: #aaa;
    background: rgba(255,255,255,0.04);
}

.battle-hp-change {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 16px 24px;
}

.hp-change-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hp-change-name {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.hp-change-value {
    font-size: 2.2rem;
    font-weight: 900;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    transition: color 0.3s ease;
}

.hp-change-value.hp-damage {
    color: #ff0099;
    animation: hpDamage 0.5s ease forwards;
}

.hp-change-value.hp-heal {
    color: #00ff88;
    animation: hpHeal 0.5s ease forwards;
}

@keyframes hpDamage {
    0%   { transform: scale(1.5); color: #ff0099; }
    100% { transform: scale(1);   color: #ff4466; }
}

@keyframes hpHeal {
    0%   { transform: scale(1.5); color: #88ffcc; }
    100% { transform: scale(1);   color: #00ff88; }
}

.hp-change-arrow {
    font-size: 1.5rem;
    color: #666;
}

/* SPINボタン */
.spin-btn {
    padding: 16px 48px;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 200, 0, 0.7);
    transition: transform 0.1s, box-shadow 0.1s;
    animation: pulse-btn 1.2s infinite;
}
.spin-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 0 45px rgba(255, 200, 0, 0.9);
}
.spin-btn:active {
    transform: scale(0.97);
}
.spin-btn:disabled {
    background: #444;
    color: #888;
    box-shadow: none;
    animation: none;
    cursor: not-allowed;
}
@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 25px rgba(255,200,0,0.6); }
    50%       { box-shadow: 0 0 50px rgba(255,200,0,1); }
}
.spin-hint {
    font-size: 0.9rem;
    color: #aaa;
    letter-spacing: 1px;
    margin-top: -4px;
}

/* 神降臨バナーアニメーション */
@keyframes divineAppear {
    0%   { opacity: 0; transform: scale(0.5); }
    20%  { opacity: 1; transform: scale(1.1); }
    70%  { opacity: 1; transform: scale(1.0); }
    100% { opacity: 0; transform: scale(1.2); }
}

/* 神降臨カードのスタイル */
.choice-card.divine {
    border: 2px solid #ffd700 !important;
    background: linear-gradient(135deg, #1a1400, #332800) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5) !important;
    animation: divine-pulse 1.5s infinite;
}
.choice-type.divine {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    font-weight: 900;
}
@keyframes divine-pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
    50%       { box-shadow: 0 0 35px rgba(255, 215, 0, 0.9); }
}

/* カード画像 */
.card-img {
    width: 100%;
    max-height: 90px;
    object-fit: cover;
    border-radius: 6px;
    margin: 4px 0;
    border: 1px solid rgba(255,255,255,0.15);
}

.overlay-card-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin: 6px auto;
    display: block;
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* サブメニューボタン */
.menu-sub-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}
.menu-sub-buttons button {
    background: transparent;
    color: #aaa;
    border: 1px solid #444;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.menu-sub-buttons button:hover {
    color: #ffd700;
    border-color: #ffd700;
    background: rgba(255,215,0,0.08);
}

/* カード詳細情報 */
.choice-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding: 5px 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 6px;
    font-size: 0.78rem;
    gap: 4px;
}
.detail-rate  { color: #ffd700; font-weight: 700; }
.detail-dmg   { color: #ff8c8c; font-weight: 700; }
.choice-card .divine .detail-dmg { color: #ffd700; }
.detail-target { color: #8cdcff; font-size: 0.75rem; }

.choice-fail-hint {
    text-align: center;
    font-size: 0.7rem;
    color: #777;
    margin-top: 4px;
    font-style: italic;
}
.choice-card.safe   .choice-fail-hint { color: #6a9; }
.choice-card.gamble .choice-fail-hint { color: #bb9; }
.choice-card.insane .choice-fail-hint { color: #a66; }

.overlay-card-type.divine  { background: rgba(255,215,0,0.25); color: #ffd700; border-color: #ffd700; }
.battle-result-banner.divine-success { background: linear-gradient(135deg,#7a3,#ffd700); }

/* ===== 神ルーレット ===== */
.divine-roulette-title {
    color: #ffd700 !important;
    text-shadow: 0 0 20px #ffd700, 0 0 40px #ff8c00;
    letter-spacing: 6px;
    animation: divineGlow 1.5s ease-in-out infinite alternate;
}
@keyframes divineGlow {
    from { text-shadow: 0 0 10px #ffd700, 0 0 20px #ff8c00; }
    to   { text-shadow: 0 0 30px #ffd700, 0 0 60px #ff8c00, 0 0 80px #ff4400; }
}

.divine-card-preview {
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,140,0,0.1));
    border: 1px solid rgba(255,215,0,0.4);
    border-radius: 12px;
    padding: 12px 24px;
    text-align: center;
    max-width: 320px;
    width: 100%;
}
.divine-card-name {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 2px;
}
.divine-card-desc {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 4px;
}

.divine-pointer { color: #ffd700 !important; }
.divine-wheel-bg {
    border: 3px solid rgba(255,215,0,0.5) !important;
    box-shadow: 0 0 30px rgba(255,215,0,0.3), inset 0 0 20px rgba(255,215,0,0.1) !important;
}
.divine-center-dot {
    background: radial-gradient(circle, #ffd700, #ff8c00) !important;
    box-shadow: 0 0 15px #ffd700 !important;
}
.divine-spin-btn {
    background: linear-gradient(135deg, #b8860b, #ffd700, #ff8c00) !important;
    color: #1a1a1a !important;
    font-weight: 900 !important;
    box-shadow: 0 0 20px rgba(255,215,0,0.5) !important;
}
.divine-spin-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255,215,0,0.8) !important;
}

/* ===== 広告フッター対応 ===== */
/* body下部に広告フッター分の余白（JSのadjustAppPaddingで動的調整するが初期値として設定） */
body {
    padding-bottom: 70px;
}
/* バトルオーバーレイは広告より上（z-index:9999で既に対応済み）*/

/* ========================================
   神のターン演出フェーズ
   ======================================== */
.divine-turn-header {
    text-align: center;
    margin-bottom: 16px;
    animation: divineHeaderPulse 1.2s ease-in-out infinite alternate;
}
@keyframes divineHeaderPulse {
    from { text-shadow: 0 0 20px #ffd700, 0 0 40px #ff8c00; }
    to   { text-shadow: 0 0 40px #ffd700, 0 0 80px #ff6600, 0 0 120px #ff4400; }
}

.divine-turn-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #ffd700;
    letter-spacing: 6px;
    margin-bottom: 6px;
}

.divine-turn-sub {
    font-size: 0.9rem;
    color: #ff8c00;
    opacity: 0.8;
    letter-spacing: 2px;
}

/* 神のアイコン */
.divine-god-icon {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 20px;
    animation: godIconAppear 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes godIconAppear {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg);   opacity: 1; }
}

.divine-god-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 15%;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px #ffd700, 0 0 60px #ff8c00, 0 0 90px rgba(255,140,0,0.4);
    position: relative;
    z-index: 2;
}

.divine-god-aura {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid rgba(255,215,0,0.4);
    animation: godAuraRotate 4s linear infinite;
    z-index: 1;
}
.divine-god-aura::before {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1px solid rgba(255,140,0,0.3);
    animation: godAuraRotate 2.5s linear infinite reverse;
}
@keyframes godAuraRotate {
    from { transform: rotate(0deg) scale(1); }
    50%  { transform: rotate(180deg) scale(1.08); }
    to   { transform: rotate(360deg) scale(1); }
}

/* カード選択エリア */
.divine-card-select-area {
    text-align: center;
}

.divine-select-label {
    color: #aaa;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 14px;
    animation: selectLabelBlink 0.8s ease-in-out infinite alternate;
}
@keyframes selectLabelBlink {
    from { opacity: 0.5; }
    to   { opacity: 1; }
}

.divine-card-slots {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.divine-slot {
    width: 72px;
    height: 96px;
    perspective: 600px;
}

.divine-slot-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 900;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border: 2px solid rgba(255,215,0,0.3);
}

.divine-face-down {
    background: linear-gradient(135deg, #1a0a2e, #2a1a4e);
    color: rgba(255,215,0,0.4);
}

.divine-face-up {
    background: linear-gradient(135deg, #2a1a4e, #4a2a7e);
    color: #ffd700;
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255,215,0,0.5);
    animation: cardFlipIn 0.6s ease-out;
}
@keyframes cardFlipIn {
    0%   { transform: rotateY(90deg) scale(0.8); }
    100% { transform: rotateY(0deg)  scale(1); }
}

/* 神ターン選択済みカード */
.divine-selected-card {
    background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,140,0,0.05));
    /* god-type動的変更: applyGodTypeTheme() でJS側から上書き */;
    border: 1px solid rgba(255,215,0,0.5);
    border-radius: 12px;
    padding: 14px 20px;
    margin-top: 8px;
    animation: selectedCardAppear 0.5s ease-out forwards;
}
@keyframes selectedCardAppear {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.divine-selected-name {
    color: #ffd700;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.divine-selected-desc {
    color: #ccc;
    font-size: 0.8rem;
}

/* 神の攻撃ログ（結果フェーズ内） */
.divine-attack-banner {
    color: #ffd700;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-shadow: 0 0 20px #ffd700;
    margin-bottom: 8px;
    animation: divineAttackFlash 0.4s ease-out;
}
@keyframes divineAttackFlash {
    0%   { opacity: 0; transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

.divine-attack-log {
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    color: #ffcc44;
    font-size: 0.82rem;
    text-align: left;
    max-height: 80px;
    overflow-y: auto;
    line-height: 1.5;
}

/* ========================================
   広告フッター - 極限まで目立たなく
   ======================================== */
#adFooter {
    opacity: 0.5 !important;
    transition: opacity 0.4s ease;
}
#adFooter:hover {
    opacity: 0.82 !important;
}
/* 広告フッターがゲーム中は完全非表示 */
#adFooter[style*="display: none"] {
    pointer-events: none;
}
