/* アニメーション定義 */

/* サイバーパンクスキャンライン */
@keyframes scanlines {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

/* グリッチエフェクト */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* ネオングロー */
@keyframes neonGlow {
    0%, 100% {
        text-shadow: 0 0 5px #00ff41, 0 0 10px #00ff41, 0 0 15px #00ff41;
    }
    50% {
        text-shadow: 0 0 2px #00ff41, 0 0 5px #00ff41, 0 0 8px #00ff41;
    }
}

/* タイプライター効果 */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* ローター回転アニメーション（無効化） */
@keyframes rotorSpin {
    0% { transform: rotateY(0deg) scale(1.05); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1.05); }
}

/* スロットマシン回転アニメーション（無効化）*/
@keyframes slotSpin {
    0% { transform: translateY(0px); }
    25% { transform: translateY(-10px); }
    50% { transform: translateY(5px); }
    75% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

/* スロット文字のフェードアニメーション（無効化） */
@keyframes slotCharacterChange {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* スロットのグロー効果 */
@keyframes slotGlow {
    0%, 100% {
        text-shadow: 0 0 10px #00ff41;
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    }
    50% {
        text-shadow: 0 0 20px #00ff41, 0 0 30px #00ff41;
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    }
}

/* スロットのグロー効果 */
@keyframes slotGlow {
    0%, 100% {
        text-shadow: 0 0 10px #00ff41;
        box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    }
    50% {
        text-shadow: 0 0 20px #00ff41, 0 0 30px #00ff41;
        box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    }
}

/* パルス効果 */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
    }
}

/* フェードイン */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* スライドイン（上から） */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* スライドイン（左から） */
@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* スライドイン（右から） */
@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ローテート */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* バウンス */
@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -6px, 0);
    }
    70% {
        transform: translate3d(0, -3px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

/* クラスベースのアニメーション */

/* タイトルのネオンアニメーション */
h1 {
    animation: neonGlow 2s ease-in-out infinite alternate;
}

/* ローター関連のアニメーション（全て無効化） */

/* スロット文字の静的表示のみ */
.slot-current {
    /* アニメーションなし - 静的表示のみ */
}
/* ランプ点灯時のアニメーション */
.lamp.lit {
    animation: neonGlow 0.5s ease-in-out;
}

/* ボタンホバー時のパルス */
.btn:hover {
    animation: pulse 1s ease-in-out infinite;
}

/* プラグ選択時のパルス */
.plug.selected {
    animation: pulse 1s ease-in-out infinite;
}

/* 要素のロード時アニメーション */
.container {
    animation: fadeIn 0.8s ease-out;
}

.enigma-machine > div:first-child {
    animation: slideInLeft 0.6s ease-out 0.2s both;
}

.enigma-machine > div:last-child {
    animation: slideInRight 0.6s ease-out 0.4s both;
}

.lampboard {
    animation: slideInDown 0.6s ease-out 0.6s both;
}

.keyboard {
    animation: slideInDown 0.6s ease-out 0.8s both;
}

.text-area {
    animation: fadeIn 0.6s ease-out 1s both;
}

/* ホバーエフェクト拡張 */
.key:hover {
    animation: bounce 0.6s ease-out;
}

.plug:hover {
    animation: rotate 0.3s ease-out;
}

/* スムーズトランジション（ローター除く） */
.key, .lamp, .plug, .btn {
    transition: all 0.3s ease;
}

/* ローター関連はトランジションなし */
.rotor-display,
.slot-container,
.slot-current,
.slot-next,
.slot-prev {
    /* トランジション無効化 */
}

/* 特別なトランジション設定 */
.rotor-display {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.key {
    transition: all 0.15s ease;
}

.plug {
    transition: all 0.2s ease;
}

.btn {
    transition: all 0.2s ease;
}

/* 無効化可能なアニメーション（アクセシビリティ対応） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before {
        animation: none;
    }

    h1 {
        animation: none;
    }
}