/* ========================================
   Animations — Space Neon Theme
   ======================================== */

/* Card dealing */
@keyframes dealCard {
    from {
        transform: translate(-50%, -100%) scale(0.5);
        opacity: 0;
    }
    to {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
}

.card.dealing {
    animation: dealCard 0.3s ease-out;
}

/* Card flip */
@keyframes flipCard {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.card.flipping {
    animation: flipCard 0.6s ease-in-out;
}

/* Chip appear */
@keyframes chipAppear {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Acting player pulse (neon cyan) */
@keyframes actingPulse {
    0%, 100% {
        box-shadow: 0 0 16px rgba(34, 211, 238, 0.4), 0 0 32px rgba(34, 211, 238, 0.1);
    }
    50% {
        box-shadow: 0 0 24px rgba(34, 211, 238, 0.6), 0 0 48px rgba(34, 211, 238, 0.2);
    }
}

/* Winner glow (gold) */
@keyframes winnerGlow {
    0%, 100% {
        border-color: rgba(251, 191, 36, 0.6);
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.4), 0 0 40px rgba(251, 191, 36, 0.1);
    }
    50% {
        border-color: rgba(251, 191, 36, 1);
        box-shadow: 0 0 32px rgba(251, 191, 36, 0.6), 0 0 60px rgba(251, 191, 36, 0.2);
    }
}

.player-seat.winner .player-info {
    animation: winnerGlow 1.5s ease-in-out infinite;
}

/* Neon text pulse (for phase headers) */
@keyframes neonPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(34, 211, 238, 0.3); }
    50% { text-shadow: 0 0 16px rgba(34, 211, 238, 0.6), 0 0 24px rgba(34, 211, 238, 0.2); }
}

/* Fade in */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Slide up */
@keyframes slideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

/* Button ripple effect */
.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.action-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Table subtle breathing glow */
@keyframes tableBreath {
    0%, 100% {
        box-shadow:
            0 0 60px rgba(34, 211, 238, 0.06),
            0 0 30px rgba(0, 0, 0, 0.5),
            inset 0 0 60px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow:
            0 0 80px rgba(34, 211, 238, 0.1),
            0 0 40px rgba(0, 0, 0, 0.5),
            inset 0 0 80px rgba(0, 0, 0, 0.3);
    }
}

.poker-table {
    animation: tableBreath 6s ease-in-out infinite;
}

/* ========================================
   ALL-IN — Solar Prominence Effect
   ======================================== */

/* プレイヤー情報パネルの炎グロー */
.player-seat.allin .player-info {
    overflow: visible;
    border-color: rgba(255, 120, 20, 0.7);
    box-shadow:
        0 0 12px rgba(255, 100, 0, 0.5),
        0 0 30px rgba(255, 60, 0, 0.3),
        0 0 60px rgba(255, 40, 0, 0.15);
    animation: allinPulse 2s ease-in-out infinite;
}

@keyframes allinPulse {
    0%, 100% {
        border-color: rgba(255, 120, 20, 0.7);
        box-shadow:
            0 0 12px rgba(255, 100, 0, 0.5),
            0 0 30px rgba(255, 60, 0, 0.3),
            0 0 60px rgba(255, 40, 0, 0.15);
    }
    50% {
        border-color: rgba(255, 180, 40, 0.9);
        box-shadow:
            0 0 18px rgba(255, 140, 0, 0.7),
            0 0 40px rgba(255, 80, 0, 0.4),
            0 0 80px rgba(255, 40, 0, 0.2);
    }
}

/* プロミネンスの炎 — ::before と ::after で2本 */
.player-seat.allin .player-info::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 10%;
    width: 80%;
    height: 16px;
    background:
        radial-gradient(ellipse at 20% 100%, rgba(255, 140, 0, 0.6) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(255, 80, 0, 0.5) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 100%, rgba(255, 160, 20, 0.5) 0%, transparent 60%);
    filter: blur(3px);
    animation: prominenceWave1 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    border-radius: 50% 50% 0 0;
}

.player-seat.allin .player-info::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 15%;
    width: 70%;
    height: 14px;
    background:
        radial-gradient(ellipse at 30% 0%, rgba(255, 100, 0, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 65% 0%, rgba(255, 60, 0, 0.45) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 0%, rgba(255, 180, 40, 0.4) 0%, transparent 50%);
    filter: blur(3px);
    animation: prominenceWave2 2.5s ease-in-out infinite 0.5s;
    pointer-events: none;
    z-index: -1;
    border-radius: 0 0 50% 50%;
}

@keyframes prominenceWave1 {
    0%, 100% {
        transform: scaleY(1) scaleX(1);
        opacity: 0.7;
    }
    25% {
        transform: scaleY(1.6) scaleX(1.05);
        opacity: 1;
    }
    50% {
        transform: scaleY(1.1) scaleX(0.95);
        opacity: 0.6;
    }
    75% {
        transform: scaleY(1.8) scaleX(1.02);
        opacity: 0.9;
    }
}

@keyframes prominenceWave2 {
    0%, 100% {
        transform: scaleY(1) scaleX(1);
        opacity: 0.6;
    }
    30% {
        transform: scaleY(1.5) scaleX(0.97);
        opacity: 0.9;
    }
    60% {
        transform: scaleY(1.2) scaleX(1.04);
        opacity: 0.5;
    }
    80% {
        transform: scaleY(1.7) scaleX(0.98);
        opacity: 0.85;
    }
}

/* ALL-IN テキストのカラー */
.player-seat.allin .player-action {
    color: #ff8c00 !important;
    text-shadow: 0 0 8px rgba(255, 100, 0, 0.6);
}

/* ALL-IN 名前のカラー */
.player-seat.allin .player-name {
    color: #ffb347;
    text-shadow: 0 0 6px rgba(255, 140, 0, 0.4);
}
