/* ======================
   スロットマシン コンテナ
====================== */
.slot-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    width: 100%;
}

.slot-machine {
    background: linear-gradient(180deg, #2a2a4a 0%, #1a1a2e 100%);
    border-radius: 30px;
    padding: 30px 40px 40px;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.1),
        0 0 100px rgba(255, 107, 53, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 500px;
    width: 100%;
}

.slot-machine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 215, 0, 0.03), transparent 30%);
    animation: machineGlow 10s linear infinite;
    pointer-events: none;
}

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

.slot-title {
    font-family: 'Orbitron', 'Noto Sans JP', sans-serif;
    font-size: 24px;
    font-weight: 900;
    text-align: center;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* ======================
   モード選択
====================== */
.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 100px;
    font-family: inherit;
}

.mode-btn .mode-icon {
    font-size: 20px;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.mode-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.mode-description {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-bottom: 20px;
    min-height: 20px;
}

/* ======================
   リール コンテナ
====================== */
.reels-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.reel-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.reel-wrapper.hidden {
    display: none;
}

.reel-label {
    position: absolute;
    top: -25px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.individual-mode .reel-label {
    opacity: 1;
}

/* ======================
   リール フレーム
====================== */
.reel-frame {
    width: 120px;
    height: 180px;
    background: linear-gradient(180deg, #0a0a15 0%, #15152a 50%, #0a0a15 100%);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 0 20px rgba(0, 212, 255, 0.2);
    border: 2px solid rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

/* ハイライトライン */
.reel-frame::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 60px;
    transform: translateY(-50%);
    background: rgba(255, 215, 0, 0.1);
    border-top: 2px solid rgba(255, 215, 0, 0.5);
    border-bottom: 2px solid rgba(255, 215, 0, 0.5);
    z-index: 10;
    pointer-events: none;
}

/* グラデーションオーバーレイ */
.reel-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.8) 0%,
        transparent 30%,
        transparent 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    z-index: 5;
    pointer-events: none;
}

/* シングルモード - 大きいリール */
.single-mode .reel-frame {
    width: 200px;
    height: 220px;
}

.single-mode .reel-item {
    height: 73px;
    font-size: 20px;
}

.single-mode .reel-frame::before {
    height: 73px;
}

/* ======================
   リール本体
====================== */
.reel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: none;
}

.reel-item {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    padding: 5px;
    text-align: center;
    line-height: 1.2;
    transition: all 0.3s ease;
    transform: translateY(-3px);
}

.reel-item.winner {
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* ======================
   ストップボタン
====================== */
.stop-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: linear-gradient(180deg, #444 0%, #222 100%);
    border: 2px solid #555;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.stop-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #555 0%, #333 100%);
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

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

.stop-btn.stopped {
    background: linear-gradient(180deg, var(--neon-green) 0%, #00aa66 100%);
    border-color: var(--neon-green);
}

/* ======================
   メインコントロール
====================== */
.controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.start-btn {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: 900;
    font-family: 'Orbitron', 'Noto Sans JP', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 10px 30px rgba(255, 107, 53, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

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

.start-btn:hover::before {
    left: 100%;
}

.start-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.5);
}

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

.auto-btn {
    background: linear-gradient(180deg, #6B5B95 0%, #4A4063 100%);
    border: none;
    color: #fff;
    padding: 18px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.auto-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

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

/* ======================
   ステータス表示
====================== */
.status {
    text-align: center;
    margin-top: 20px;
    min-height: 40px;
    position: relative;
    z-index: 1;
}

.status-text {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.status-text.reach {
    color: var(--neon-pink);
    animation: pulse 0.5s ease infinite;
}

.status-text.winner {
    font-size: 28px;
    color: var(--accent-color);
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: winPulse 0.3s ease infinite;
}

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

/* ======================
   リーチエフェクト
====================== */
.reach-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--neon-pink);
    border-radius: 15px;
    opacity: 0;
    animation: none;
    pointer-events: none;
    z-index: 20;
}

.reach-effect.active {
    animation: reachGlow 0.3s ease infinite;
}

@keyframes reachGlow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 20px var(--neon-pink), inset 0 0 20px rgba(255, 0, 255, 0.3);
    }
    50% {
        opacity: 0.5;
        box-shadow: 0 0 40px var(--neon-pink), inset 0 0 40px rgba(255, 0, 255, 0.5);
    }
}

/* ======================
   結果オーバーレイ
====================== */
.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    padding: 20px;
}

.result-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.result-title {
    font-family: 'Orbitron', 'Noto Sans JP', sans-serif;
    font-size: 42px;
    font-weight: 900;
    color: var(--accent-color);
    text-shadow: 0 0 50px rgba(255, 215, 0, 0.8);
    margin-bottom: 30px;
    animation: resultPop 0.5s ease;
    text-align: center;
}

.result-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
    align-items: center;
}

.result-item {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: resultPop 0.5s ease;
}

.result-item .label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    margin-bottom: 5px;
}

.result-item.match {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.1);
}

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

.result-close {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: #fff;
    padding: 18px 50px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.result-close:hover {
    transform: scale(1.05);
}

/* ======================
   レインボーエフェクト
====================== */
.rainbow-effect {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(255, 0, 0, 0.1),
        rgba(255, 127, 0, 0.1),
        rgba(255, 255, 0, 0.1),
        rgba(0, 255, 0, 0.1),
        rgba(0, 0, 255, 0.1),
        rgba(139, 0, 255, 0.1)
    );
    background-size: 400% 400%;
    animation: rainbowBg 2s ease infinite;
    pointer-events: none;
    z-index: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rainbow-effect.active {
    opacity: 1;
}

@keyframes rainbowBg {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ======================
   操作パネル（下部固定なし版）
====================== */
.control-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 30px;
    max-width: 500px;
    width: 100%;
}

.control-panel h3 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-buttons button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.shuffle-btn {
    background: linear-gradient(135deg, var(--neon-blue), #0088cc);
    color: white;
}

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

.reset-btn {
    background: linear-gradient(135deg, #666, #444);
    color: white;
}

.reset-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(100, 100, 100, 0.4);
}
