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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 600px;
    width: 100%;
    background: linear-gradient(135deg, #1e1e30 0%, #2a2a40 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 画面切り替え */
.screen {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.screen.active {
    display: block;
}

h1 {
    text-align: center;
    color: #fff;
    margin-bottom: 30px;
    font-size: 2rem;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

h2 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

section {
    margin-bottom: 25px;
}

/* 入力セクション */
.input-row {
    display: flex;
    gap: 10px;
}

.input-section input[type="text"] {
    flex: 1;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.input-section input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-section input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

.input-row .btn-primary {
    width: auto;
    margin-top: 0;
    white-space: nowrap;
}

/* ボタン */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #667eea;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover:not(:disabled) {
    background: #5a6fd6;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    margin-right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.25);
}

.btn-start {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #1a1a2e;
    width: 100%;
    padding: 16px 32px;
    font-size: 1.3rem;
    margin-top: 20px;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6);
}

.btn-stop {
    background: linear-gradient(135deg, #ffd700 0%, #ffb800 100%);
    color: #1a1a2e;
    width: 100%;
    padding: 16px 32px;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-stop:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6);
}

/* 名前リスト */
.name-list-section ul {
    list-style: none;
    height: 200px;
    width: 100%;
    overflow-y: auto;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.name-list-section ul:empty::after {
    content: '名前が追加されていません';
    color: rgba(255, 255, 255, 0.5);
    display: block;
    text-align: center;
    padding: 20px;
}

.name-list-section li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s;
}

.name-list-section li:last-child {
    margin-bottom: 0;
}

.name-list-section li.excluded {
    opacity: 0.5;
    background: rgba(255, 82, 82, 0.2);
}

.name-list-section li.excluded>span:first-child {
    text-decoration: line-through;
}

.name-list-section li .delete-btn {
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 0.85rem;
}

.name-list-section li .delete-btn:hover {
    background: #ff1744;
}

#nameCount {
    font-weight: normal;
    color: rgba(255, 255, 255, 0.6);
}

.name-list-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.name-list-buttons .btn-secondary {
    margin: 0;
}

#clearAll {
    margin-left: auto;
}

/* モード選択 */
.mode-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.mode-option {
    flex: 1;
    min-width: 140px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.mode-option:has(input:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.mode-option input {
    display: none;
}

.mode-option .mode-label {
    display: block;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
}

.mode-option .mode-description {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.mode-option:has(input:checked) .mode-label {
    color: #fff;
}

.mode-option:has(input:checked) .mode-description {
    color: rgba(255, 255, 255, 0.8);
}

/* 派手さ選択 */
.party-options {
    display: flex;
    gap: 10px;
}

.party-options-two {
    display: flex;
    gap: 10px;
}

.party-option {
    flex: 1;
    padding: 12px 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
}

/* 普通ボタン - 3倍の大きさ */
.party-options-two .party-normal {
    flex: 3;
}

.party-options-two .party-danger {
    flex: 1;
}

.party-option:has(input:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.party-option.party-danger {
    border-color: rgba(255, 82, 82, 0.5);
}

.party-option.party-danger:has(input:checked) {
    border-color: #ff5252;
    background: rgba(255, 82, 82, 0.3);
    animation: dangerPulse 0.5s ease-in-out infinite;
}

@keyframes dangerPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
    }

    50% {
        box-shadow: 0 0 25px rgba(255, 82, 82, 0.8);
    }
}

.party-option input {
    display: none;
}

.party-label {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.party-option.party-danger .party-label {
    color: #ff5252;
}

/* ルーレット画面 - 全画面表示 */
#rouletteScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 1000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: visible;
}

#rouletteScreen.active {
    display: flex;
}

#rouletteScreen h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

/* ルーレット表示 */
.roulette-section {
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.roulette-display {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #667eea;
    border-radius: 20px;
    background: linear-gradient(135deg, #2d2d44 0%, #1a1a2e 100%);
    font-size: 3.5rem;
    font-weight: bold;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.3);
}

.roulette-display .placeholder {
    font-size: 1.2rem;
    color: #888;
    font-weight: normal;
}

.roulette-display.spinning {
    animation: pulse 0.1s infinite;
}

.roulette-buttons {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2000;
}

.btn-back {
    width: 100%;
    margin: 0;
}

.btn-music-stop {
    width: 100%;
    margin: 0;
    font-size: 1.5rem;
}

@keyframes pulse {

    0%,
    100% {
        border-color: #667eea;
    }

    50% {
        border-color: #f5576c;
    }
}

/* 結果表示 */
.result-section {
    text-align: center;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    animation: fadeIn 0.5s;
    margin-top: 30px;
    width: 100%;
    max-width: 500px;
}

.result-section h2 {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-display {
    font-size: 3rem;
    font-weight: bold;
    color: #fff;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.roulette-display.result-mode {
    height: auto;
    padding: 30px 40px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: none;
    flex-direction: column;
    font-size: 1rem;
    font-weight: normal;
    animation: fadeIn 0.5s;
    overflow: visible;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.roulette-display.result-mode .result-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.roulette-display.result-mode.last-survivor {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.roulette-display.result-mode.last-survivor .result-title {
    color: #ffd700;
}

/* 最後の一人 - 特別演出 */
.roulette-display.last-one {
    animation: lastOnePulse 0.5s ease-in-out infinite;
    border-color: #ffd700;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.last-one-title {
    font-size: 2.5rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: lastOneGlow 0.5s ease-in-out infinite alternate;
}

@keyframes lastOnePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
    }
}

@keyframes lastOneGlow {
    from {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }

    to {
        text-shadow: 0 0 40px rgba(255, 215, 0, 1), 0 0 60px rgba(255, 215, 0, 0.5);
    }
}

.last-survivor-name {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 紙吹雪 */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confettiFall linear forwards;
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg);
    }
}

/* くす玉エフェクト */
.kusudama-burst {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    margin: -75px 0 0 -75px;
    background: radial-gradient(circle, rgba(255, 215, 0, 1) 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 215, 0, 0) 70%);
    border-radius: 50%;
    animation: burst 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 2000;
}

@keyframes burst {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(10);
        opacity: 0;
    }
}

.kusudama {
    position: fixed;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 1999;
    animation: kusudamaExplode 2s ease-out forwards;
}

.kusudama-piece {
    width: 15px;
    height: 15px;
    border-radius: 3px;
}

.kusudama-star {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 16px solid currentColor;
    background: transparent !important;
}

.kusudama-ribbon {
    width: 8px;
    height: 25px;
    border-radius: 4px;
}

@keyframes kusudamaExplode {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) rotate(var(--rotate)) scale(0.3);
        opacity: 0;
    }
}

@keyframes flashBang {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* 打ち上げ花火の軌跡 */
.firework-trail {
    position: fixed;
    bottom: 0;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px #fff, 0 0 20px #ffd700, 0 0 30px #ff6b6b;
    animation: fireworkLaunch 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 2001;
}

.firework-trail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100px;
    background: linear-gradient(to top, transparent, rgba(255, 215, 0, 0.8), #fff);
    animation: trailFade 0.5s ease-out forwards;
}

@keyframes fireworkLaunch {
    0% {
        bottom: 0;
        opacity: 1;
    }

    100% {
        bottom: calc(100vh - var(--explode-y));
        opacity: 0;
    }
}

@keyframes trailFade {
    0% {
        opacity: 1;
        height: 100px;
    }

    100% {
        opacity: 0;
        height: 200px;
    }
}

/* 危険モード専用 - 結果発表演出（金色ピカピカ） */
.roulette-display.danger-result {
    background: linear-gradient(135deg, #1a1a0a 0%, #2a2a10 50%, #1a1a0a 100%);
    border: 4px solid #ffd700;
    box-shadow:
        0 0 30px rgba(255, 215, 0, 0.7),
        0 0 60px rgba(255, 215, 0, 0.5),
        0 0 100px rgba(255, 215, 0, 0.3),
        inset 0 0 50px rgba(255, 215, 0, 0.15);
    animation: goldenPulse 0.8s ease-in-out infinite alternate;
    padding: 50px 60px;
    max-width: 700px;
    position: relative;
    z-index: 1000;
}

@keyframes goldenPulse {
    0% {
        border-color: #ffd700;
        box-shadow:
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 215, 0, 0.2),
            inset 0 0 30px rgba(255, 215, 0, 0.1);
    }

    50% {
        border-color: #fff;
        box-shadow:
            0 0 30px rgba(255, 255, 255, 0.8),
            0 0 60px rgba(255, 215, 0, 0.6),
            0 0 90px rgba(255, 215, 0, 0.4),
            inset 0 0 50px rgba(255, 255, 255, 0.2);
    }

    100% {
        border-color: #ffb800;
        box-shadow:
            0 0 25px rgba(255, 184, 0, 0.7),
            0 0 50px rgba(255, 215, 0, 0.5),
            0 0 80px rgba(255, 215, 0, 0.3),
            inset 0 0 40px rgba(255, 184, 0, 0.15);
    }
}

.danger-result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* グリッチエフェクト - タイトル */
.danger-title {
    position: relative;
}

.glitch {
    position: relative;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    animation: glitchText 0.3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    color: #ff0000;
    animation: glitchBefore 0.3s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch::after {
    color: #00ffff;
    animation: glitchAfter 0.3s infinite;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitchText {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitchBefore {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(3px, -1px);
    }

    40% {
        transform: translate(-3px, 1px);
    }

    60% {
        transform: translate(1px, 3px);
    }

    80% {
        transform: translate(-1px, -3px);
    }
}

@keyframes glitchAfter {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-3px, 1px);
    }

    40% {
        transform: translate(3px, -1px);
    }

    60% {
        transform: translate(-1px, -3px);
    }

    80% {
        transform: translate(1px, 3px);
    }
}

/* 勝者名 - キラキラエフェクト */
.danger-winner-wrapper {
    position: relative;
    padding: 30px 50px;
    z-index: 1001;
}

.sparkle-winner {
    position: relative;
    display: inline-block;
}

.sparkle-text {
    font-size: 5rem;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(90deg,
            #fff 0%,
            #ffd700 15%,
            #fff 30%,
            #87ceeb 45%,
            #fff 60%,
            #ffd700 75%,
            #fff 90%,
            #87ceeb 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: sparkleShine 2s linear infinite, sparkleAppear 0.6s ease-out;
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 50px rgba(135, 206, 235, 0.6));
    position: relative;
    z-index: 1002;
}

@keyframes sparkleShine {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

@keyframes sparkleAppear {
    0% {
        opacity: 0;
        transform: scale(0.5);
        filter: blur(10px);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        filter: blur(0);
    }
}

/* キラキラオーバーレイ */
.sparkle-overlay {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20% 30%, #fff, transparent),
        radial-gradient(2px 2px at 40% 70%, #ffd700, transparent),
        radial-gradient(2px 2px at 50% 20%, #fff, transparent),
        radial-gradient(3px 3px at 60% 50%, #87ceeb, transparent),
        radial-gradient(2px 2px at 70% 80%, #fff, transparent),
        radial-gradient(2px 2px at 80% 40%, #ffd700, transparent),
        radial-gradient(3px 3px at 90% 60%, #fff, transparent),
        radial-gradient(2px 2px at 10% 60%, #87ceeb, transparent),
        radial-gradient(2px 2px at 30% 90%, #fff, transparent),
        radial-gradient(3px 3px at 85% 20%, #ffd700, transparent);
    animation: sparkleOverlay 1.5s ease-in-out infinite;
}

@keyframes sparkleOverlay {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* カオスリング */
.chaos-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    border: 3px solid transparent;
    border-top-color: #ff0000;
    border-right-color: #ffff00;
    border-bottom-color: #00ff00;
    border-left-color: #00ffff;
    border-radius: 50%;
    animation: chaosRingSpin 2s linear infinite;
    pointer-events: none;
}

.chaos-ring.delay-1 {
    width: 400px;
    height: 400px;
    margin: -200px 0 0 -200px;
    animation-delay: 0.3s;
    animation-duration: 3s;
    animation-direction: reverse;
}

.chaos-ring.delay-2 {
    width: 500px;
    height: 500px;
    margin: -250px 0 0 -250px;
    animation-delay: 0.6s;
    animation-duration: 4s;
}

@keyframes chaosRingSpin {
    0% {
        transform: rotate(0deg);
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: rotate(360deg);
        opacity: 0.8;
    }
}

/* 周囲のカオス稲妻 */
.chaos-lightning {
    position: absolute;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #fff, #ffff00, #fff, transparent);
    box-shadow: 0 0 10px #fff, 0 0 20px #ffff00;
    pointer-events: none;
    animation: chaosLightningFlash 0.3s ease-out forwards;
}

@keyframes chaosLightningFlash {
    0% {
        opacity: 1;
        transform: scaleX(0.5);
    }

    50% {
        opacity: 1;
        transform: scaleX(1.5);
    }

    100% {
        opacity: 0;
        transform: scaleX(0.2);
    }
}

/* 渦巻く星 */
.chaos-star {
    position: absolute;
    font-size: 1.5rem;
    pointer-events: none;
    animation: chaosStarOrbit 3s ease-out forwards;
    text-shadow: 0 0 10px currentColor;
}

@keyframes chaosStarOrbit {
    0% {
        transform: rotate(0deg) translateX(0) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: rotate(calc(var(--angle) * 0.3)) translateX(calc(var(--distance) * 0.3)) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: rotate(var(--angle)) translateX(var(--distance)) scale(0.5);
    }
}

/* 四隅の爆発 */
.chaos-burst {
    position: absolute;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    background: radial-gradient(circle, #fff 0%, #ffff00 30%, transparent 70%);
    border-radius: 50%;
    animation: chaosBurst 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes chaosBurst {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.chaos-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    animation: chaosPieceFly 1.5s ease-out forwards;
}

@keyframes chaosPieceFly {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) rotate(720deg);
        opacity: 0;
    }
}

/* グリッチフレーム */
.chaos-glitch-frame {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid #ff0000;
    pointer-events: none;
    animation: chaosGlitchFrame 0.15s steps(3) forwards;
}

@keyframes chaosGlitchFrame {
    0% {
        transform: translate(-5px, 5px);
        border-color: #ff0000;
    }

    33% {
        transform: translate(5px, -5px);
        border-color: #00ff00;
    }

    66% {
        transform: translate(-3px, -3px);
        border-color: #0000ff;
    }

    100% {
        transform: translate(0, 0);
        opacity: 0;
    }
}

/* ポップアップテキスト（花火のように出現） */
.chaos-popup-text {
    position: absolute;
    font-size: 1.8rem;
    font-weight: 900;
    text-shadow:
        0 0 10px currentColor,
        0 0 20px currentColor,
        2px 2px 0 #000,
        -2px -2px 0 #000;
    pointer-events: none;
    z-index: 150;
    animation: chaosPopup 1.2s ease-out forwards;
    white-space: nowrap;
}

@keyframes chaosPopup {
    0% {
        opacity: 0;
        transform: scale(0) rotate(var(--rotate, 0deg));
    }

    20% {
        opacity: 1;
        transform: scale(1.5) rotate(var(--rotate, 0deg));
    }

    40% {
        transform: scale(1) rotate(var(--rotate, 0deg));
    }

    100% {
        opacity: 0;
        transform: scale(0.3) rotate(var(--rotate, 0deg)) translateY(-30px);
    }
}

/* 継続的な花火エフェクト */
.continuous-burst {
    position: absolute;
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    border-radius: 50%;
    animation: continuousBurst 0.5s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

@keyframes continuousBurst {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.continuous-piece {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100;
    animation: continuousPieceFly 1.5s ease-out forwards;
}

@keyframes continuousPieceFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* 打ち上げ花火 */
.launch-firework-trail {
    position: absolute;
    bottom: 5%;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 6px #fff, 0 0 12px #ffd700;
    animation: launchFireworkUp 0.4s ease-out forwards;
    pointer-events: none;
    z-index: 200;
}

.launch-firework-trail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: linear-gradient(to top, transparent, rgba(255, 215, 0, 0.6), #fff);
    animation: trailShrink 0.4s ease-out forwards;
}

@keyframes launchFireworkUp {
    0% {
        bottom: 5%;
        opacity: 1;
    }

    100% {
        bottom: var(--explode-y);
        opacity: 0;
    }
}

@keyframes trailShrink {
    0% {
        height: 60px;
        opacity: 1;
    }

    100% {
        height: 120px;
        opacity: 0;
    }
}

.launch-firework-burst {
    position: absolute;
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    border-radius: 50%;
    animation: launchBurst 0.4s ease-out forwards;
    pointer-events: none;
    z-index: 200;
}

@keyframes launchBurst {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.launch-firework-piece {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 200;
    animation: launchPieceFly 2s ease-out forwards;
    box-shadow: 0 0 4px currentColor;
}

@keyframes launchPieceFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    70% {
        opacity: 0.8;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* ラストサバイバー結果表示 */
.result-section.last-survivor {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.result-section.last-survivor h2 {
    color: #ffd700;
}

.survivor-title {
    font-size: 1rem;
    color: #ffd700;
    letter-spacing: 0.3em;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.survivor-name {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: survivorReveal 0.5s ease-out;
}

@keyframes survivorReveal {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* レスポンシブ */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    #setupScreen h1 {
        font-size: 1.5rem;
    }

    #rouletteScreen h1 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }

    .roulette-display {
        height: 150px;
        font-size: 2.5rem;
    }

    .result-display {
        font-size: 2rem;
    }

    .survivor-name {
        font-size: 2rem;
    }

    .mode-options {
        flex-direction: column;
    }

    .party-options {
        gap: 8px;
    }

    .party-option {
        padding: 10px 5px;
    }

    .party-label {
        font-size: 0.9rem;
    }

    .btn-start,
    .btn-stop {
        font-size: 1.1rem;
        padding: 14px 28px;
    }

    .roulette-buttons {
        max-width: 100%;
    }

    .result-section {
        max-width: 100%;
        padding: 20px;
    }

    .roulette-display.result-mode {
        max-width: 100%;
        padding: 20px;
    }
}

/* ========================================
   危険モード選択時のエフェクト
   ======================================== */

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

@keyframes dangerShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10% {
        transform: translateX(-10px) rotate(-1deg);
    }

    20% {
        transform: translateX(10px) rotate(1deg);
    }

    30% {
        transform: translateX(-10px) rotate(-1deg);
    }

    40% {
        transform: translateX(10px) rotate(1deg);
    }

    50% {
        transform: translateX(-8px) rotate(-1deg);
    }

    60% {
        transform: translateX(8px) rotate(1deg);
    }

    70% {
        transform: translateX(-5px);
    }

    80% {
        transform: translateX(5px);
    }

    90% {
        transform: translateX(-2px);
    }
}

/* 赤フラッシュ */
.danger-flash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 0, 0, 0.6);
    pointer-events: none;
    z-index: 9999;
    animation: dangerFlashAnim 0.3s ease-out forwards;
}

@keyframes dangerFlashAnim {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* 稲妻エフェクト */
.danger-lightning {
    position: fixed;
    top: 0;
    width: 4px;
    height: 100vh;
    background: linear-gradient(to bottom,
            transparent 0%,
            #fff 10%,
            #ffff00 20%,
            #fff 30%,
            transparent 35%,
            #fff 40%,
            #ffff00 50%,
            #fff 55%,
            transparent 60%,
            #fff 70%,
            #ffff00 80%,
            transparent 100%);
    filter: blur(2px);
    box-shadow:
        0 0 10px #fff,
        0 0 20px #ffff00,
        0 0 30px #fff;
    pointer-events: none;
    z-index: 9998;
    animation: lightningFlash 0.2s ease-out forwards;
}

@keyframes lightningFlash {
    0% {
        opacity: 1;
        transform: scaleX(3);
    }

    50% {
        opacity: 1;
        transform: scaleX(1);
    }

    100% {
        opacity: 0;
        transform: scaleX(0.5);
    }
}

/* 警告ポップアップ */
.danger-warning-popup {
    position: fixed;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    text-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 30px #ff0000,
        2px 2px 0 #000,
        -2px -2px 0 #000;
    pointer-events: none;
    z-index: 9997;
    animation: warningPopup 1s ease-out forwards;
    white-space: nowrap;
}

@keyframes warningPopup {
    0% {
        opacity: 0;
        transform: scale(0) rotate(var(--rotate, 0deg));
    }

    20% {
        opacity: 1;
        transform: scale(1.3) rotate(var(--rotate, 0deg));
    }

    40% {
        transform: scale(1) rotate(var(--rotate, 0deg));
    }

    100% {
        opacity: 0;
        transform: scale(0.5) rotate(var(--rotate, 0deg)) translateY(-50px);
    }
}

/* グリッチオーバーレイ */
.danger-glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9996;
    background:
        repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.1) 0px,
            rgba(0, 0, 0, 0.1) 1px,
            transparent 1px,
            transparent 2px);
    animation: glitchOverlay 0.4s steps(10) forwards;
}

@keyframes glitchOverlay {
    0% {
        clip-path: inset(0 0 95% 0);
        transform: translateX(-5px);
    }

    10% {
        clip-path: inset(20% 0 60% 0);
        transform: translateX(5px);
    }

    20% {
        clip-path: inset(50% 0 30% 0);
        transform: translateX(-3px);
    }

    30% {
        clip-path: inset(10% 0 70% 0);
        transform: translateX(3px);
    }

    40% {
        clip-path: inset(80% 0 5% 0);
        transform: translateX(-2px);
    }

    50% {
        clip-path: inset(30% 0 50% 0);
        transform: translateX(2px);
    }

    60% {
        clip-path: inset(60% 0 20% 0);
        transform: translateX(-1px);
    }

    70% {
        clip-path: inset(5% 0 85% 0);
        transform: translateX(1px);
    }

    80% {
        clip-path: inset(40% 0 40% 0);
        transform: translateX(0);
    }

    90%,
    100% {
        clip-path: inset(0 0 0 0);
        opacity: 0;
    }
}

/* スキャンライン */
.danger-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.2) 0px,
            rgba(0, 0, 0, 0.2) 1px,
            transparent 1px,
            transparent 3px);
    pointer-events: none;
    z-index: 9995;
    animation: scanlineMove 0.8s linear forwards;
}

@keyframes scanlineMove {
    0% {
        background-position: 0 0;
        opacity: 1;
    }

    100% {
        background-position: 0 100px;
        opacity: 0;
    }
}

/* サイレンライト */
.danger-siren {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9994;
    animation: sirenSweep 1s ease-out forwards;
}

@keyframes sirenSweep {
    0% {
        background: linear-gradient(90deg, rgba(255, 0, 0, 0.4) 0%, transparent 30%, transparent 70%, rgba(0, 0, 255, 0.4) 100%);
    }

    25% {
        background: linear-gradient(90deg, rgba(0, 0, 255, 0.4) 0%, transparent 30%, transparent 70%, rgba(255, 0, 0, 0.4) 100%);
    }

    50% {
        background: linear-gradient(90deg, rgba(255, 0, 0, 0.4) 0%, transparent 30%, transparent 70%, rgba(0, 0, 255, 0.4) 100%);
    }

    75% {
        background: linear-gradient(90deg, rgba(0, 0, 255, 0.3) 0%, transparent 30%, transparent 70%, rgba(255, 0, 0, 0.3) 100%);
    }

    100% {
        background: transparent;
        opacity: 0;
    }
}

/* 爆発パーティクル */
.danger-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9993;
    animation: particleExplode 1s ease-out forwards;
}

@keyframes particleExplode {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* スカルアイコン */
.danger-skull {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8rem;
    pointer-events: none;
    z-index: 9992;
    animation: skullAppear 1.2s ease-out forwards;
    filter: drop-shadow(0 0 20px rgba(255, 0, 0, 0.8));
}

@keyframes skullAppear {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(-180deg);
        opacity: 0;
    }

    30% {
        transform: translate(-50%, -50%) scale(1.5) rotate(20deg);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1) rotate(-10deg);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }

    100% {
        transform: translate(-50%, -50%) scale(2) rotate(0deg);
        opacity: 0;
    }
}

/* ========================================
   危険モード - 流れる背景テキスト
   ======================================== */

.flowing-bg-text {
    position: absolute;
    left: -100%;
    font-weight: 900;
    font-family: 'Impact', 'Arial Black', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    animation: flowingTextMove linear forwards;
    text-shadow:
        0 0 30px currentColor,
        0 0 60px currentColor;
    opacity: 0.8;
}

@keyframes flowingTextMove {
    0% {
        left: -100%;
        opacity: 0;
    }

    5% {
        opacity: 0.8;
    }

    95% {
        opacity: 0.8;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

/* ========================================
   危険モード確認モーダル
   ======================================== */

.danger-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
}

.danger-modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 背景 - 脈動する赤黒グラデーション */
.danger-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(139, 0, 0, 0.9) 0%, rgba(20, 0, 0, 0.98) 70%),
        linear-gradient(45deg, #000 0%, #1a0000 50%, #000 100%);
    animation: dangerBackdropPulse 1.5s ease-in-out infinite;
}

@keyframes dangerBackdropPulse {

    0%,
    100% {
        background:
            radial-gradient(ellipse at center, rgba(139, 0, 0, 0.9) 0%, rgba(20, 0, 0, 0.98) 70%),
            linear-gradient(45deg, #000 0%, #1a0000 50%, #000 100%);
    }

    50% {
        background:
            radial-gradient(ellipse at center, rgba(200, 0, 0, 0.95) 0%, rgba(50, 0, 0, 0.98) 70%),
            linear-gradient(45deg, #1a0000 0%, #330000 50%, #1a0000 100%);
    }
}

/* 浮遊パーティクル用コンテナ */
.danger-modal-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

/* 稲妻エフェクト */
.danger-modal-lightning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: transparent;
    animation: lightningFlash 3s infinite;
}

@keyframes lightningFlash {

    0%,
    100% {
        background: transparent;
    }

    1% {
        background: rgba(255, 255, 255, 0.4);
    }

    2% {
        background: transparent;
    }

    3% {
        background: rgba(255, 255, 255, 0.2);
    }

    4%,
    50% {
        background: transparent;
    }

    51% {
        background: rgba(255, 255, 255, 0.3);
    }

    52% {
        background: transparent;
    }
}

/* スキャンライン */
.danger-modal-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.2) 2px,
            rgba(0, 0, 0, 0.2) 4px);
    animation: scanlineMove 8s linear infinite;
}

@keyframes scanlineMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 0 100%;
    }
}

/* モーダルコンテンツ */
.danger-modal-content {
    position: relative;
    z-index: 10;
    background: linear-gradient(145deg, rgba(30, 0, 0, 0.95) 0%, rgba(50, 10, 10, 0.95) 50%, rgba(30, 0, 0, 0.95) 100%);
    border: 3px solid #ff0000;
    border-radius: 20px;
    padding: 40px 50px;
    text-align: center;
    box-shadow:
        0 0 30px rgba(255, 0, 0, 0.6),
        0 0 60px rgba(255, 0, 0, 0.4),
        0 0 90px rgba(255, 0, 0, 0.2),
        inset 0 0 30px rgba(255, 0, 0, 0.1);
    animation:
        modalContentPulse 1.2s ease-in-out infinite,
        modalShake 0.15s ease-in-out infinite;
    max-width: 90vw;
    transform-style: preserve-3d;
}

@keyframes modalContentPulse {

    0%,
    100% {
        border-color: #ff0000;
        box-shadow:
            0 0 30px rgba(255, 0, 0, 0.6),
            0 0 60px rgba(255, 0, 0, 0.4),
            0 0 90px rgba(255, 0, 0, 0.2),
            inset 0 0 30px rgba(255, 0, 0, 0.1);
    }

    50% {
        border-color: #ff4444;
        box-shadow:
            0 0 50px rgba(255, 68, 68, 0.8),
            0 0 100px rgba(255, 0, 0, 0.5),
            0 0 150px rgba(255, 0, 0, 0.3),
            inset 0 0 50px rgba(255, 68, 68, 0.15);
    }
}

@keyframes modalShake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* 警告アイコン */
.danger-modal-warning-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: warningBounce 0.6s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 200, 0, 0.8));
}

@keyframes warningBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* タイトル */
.danger-modal-title {
    margin-bottom: 20px;
}

.danger-modal-title .glitch {
    font-size: 2.5rem;
    color: #ff0000;
    text-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000,
        0 0 40px #ff0000;
}

.danger-modal-title .glitch::before {
    color: #ff0000;
}

.danger-modal-title .glitch::after {
    color: #ffff00;
}

/* メッセージ */
.danger-modal-message {
    font-size: 1.4rem;
    color: #fff;
    line-height: 1.8;
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.skull-icon {
    font-size: 1.2em;
    animation: skullPulse 0.8s ease-in-out infinite alternate;
}

@keyframes skullPulse {
    from {
        opacity: 0.7;
        transform: scale(1);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

.danger-text {
    color: #ff0000;
    font-weight: bold;
    text-shadow:
        0 0 10px #ff0000,
        0 0 20px #ff0000;
    animation: dangerTextFlicker 0.5s ease-in-out infinite alternate;
}

@keyframes dangerTextFlicker {
    from {
        text-shadow:
            0 0 10px #ff0000,
            0 0 20px #ff0000;
    }

    to {
        text-shadow:
            0 0 20px #ff0000,
            0 0 40px #ff0000,
            0 0 60px #ff3300;
    }
}

/* サブメッセージ */
.danger-modal-submessage {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 30px;
    font-style: italic;
}

/* ボタンエリア */
.danger-modal-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* はいボタン */
.danger-modal-btn-yes {
    position: relative;
    background: linear-gradient(135deg, #8b0000 0%, #ff0000 50%, #8b0000 100%);
    color: #fff;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: bold;
    border: 2px solid #ff4444;
    border-radius: 10px;
    box-shadow:
        0 0 20px rgba(255, 0, 0, 0.6),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    animation: yesBtnPulse 0.8s ease-in-out infinite;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
}

.danger-modal-btn-yes::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 70%);
    animation: btnShine 2s linear infinite;
}

@keyframes btnShine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

@keyframes yesBtnPulse {

    0%,
    100% {
        box-shadow:
            0 0 20px rgba(255, 0, 0, 0.6),
            inset 0 0 10px rgba(255, 255, 255, 0.1);
        transform: scale(1);
    }

    50% {
        box-shadow:
            0 0 40px rgba(255, 0, 0, 0.9),
            0 0 60px rgba(255, 68, 68, 0.5),
            inset 0 0 15px rgba(255, 255, 255, 0.2);
        transform: scale(1.02);
    }
}

.danger-modal-btn-yes:hover {
    background: linear-gradient(135deg, #a00000 0%, #ff3333 50%, #a00000 100%);
    transform: scale(1.05) !important;
    box-shadow:
        0 0 50px rgba(255, 0, 0, 1),
        0 0 80px rgba(255, 68, 68, 0.7) !important;
}

.danger-modal-btn-yes .btn-text {
    position: relative;
    z-index: 1;
}

.danger-modal-btn-yes .btn-fire {
    font-size: 1.3em;
    animation: fireFlicker 0.3s ease-in-out infinite alternate;
}

@keyframes fireFlicker {
    from {
        transform: scale(1);
        filter: brightness(1);
    }

    to {
        transform: scale(1.2);
        filter: brightness(1.3);
    }
}

/* いいえボタン */
.danger-modal-btn-no {
    background: rgba(50, 50, 50, 0.8);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 500;
    border: 2px solid rgba(100, 100, 100, 0.5);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.danger-modal-btn-no:hover {
    background: rgba(80, 80, 80, 0.9);
    border-color: rgba(150, 150, 150, 0.7);
    color: #fff;
}

/* モーダル内の浮遊パーティクル */
.danger-modal-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #ff0000;
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s ease-in-out infinite;
    box-shadow: 0 0 10px #ff0000;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    20% {
        opacity: 1;
        transform: translateY(80vh) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateY(20vh) scale(1);
    }

    100% {
        transform: translateY(-10vh) scale(0);
        opacity: 0;
    }
}

/* モーダル内稲妻 */
.danger-modal-lightning-bolt {
    position: absolute;
    width: 3px;
    height: 80px;
    background: linear-gradient(to bottom, #fff, #ffff00, #ff0000, transparent);
    box-shadow: 0 0 10px #fff, 0 0 20px #ffff00;
    pointer-events: none;
    animation: boltFlash 0.2s ease-out forwards;
}

@keyframes boltFlash {
    0% {
        opacity: 1;
        transform: scaleY(1);
    }

    100% {
        opacity: 0;
        transform: scaleY(0);
    }
}

/* 警告テキストポップアップ */
.danger-modal-warning-popup {
    position: absolute;
    font-size: 2rem;
    font-weight: bold;
    color: #ff0000;
    text-shadow: 0 0 10px #ff0000;
    pointer-events: none;
    animation: warningPopup 1.5s ease-out forwards;
    white-space: nowrap;
}

@keyframes warningPopup {
    0% {
        transform: scale(0.5) rotate(-10deg);
        opacity: 1;
    }

    50% {
        transform: scale(1.2) rotate(5deg);
        opacity: 1;
    }

    100% {
        transform: scale(1.5) rotate(0deg) translateY(-30px);
        opacity: 0;
    }
}

/* モバイル対応 */
@media (max-width: 480px) {
    .danger-modal-content {
        padding: 30px 25px;
    }

    .danger-modal-title .glitch {
        font-size: 1.8rem;
    }

    .danger-modal-message {
        font-size: 1.1rem;
    }

    .danger-modal-warning-icon {
        font-size: 3rem;
    }

    .danger-modal-buttons {
        flex-direction: column;
    }

    .danger-modal-btn-yes,
    .danger-modal-btn-no {
        width: 100%;
    }
}