/* ======================
   ルーレットアズ — ルーレットプレイヤー専用スタイル
   iOSアプリ風レイアウト
====================== */

/* ─── (旧play-main-content → play-hero-inner に移行済み) ─── */

/* ─── ルーレットセクション ─── */
.roulette-section {
    display: flex;
    justify-content: center;
    align-items: center;
}

.roulette-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ─── ルーレットキャンバス ─── */
.roulette-canvas {
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    background: white;
    width: 400px;
    height: 400px;
    max-width: 80vw;
    max-height: 80vw;
}

/* ─── 中心点 ─── */
.center-point {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #333, #666);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 10;
}

/* ─── ポインター（矢印） ─── */
.pointer {
    position: absolute;
    top: 15px;
    font-size: 36px;
    color: #F44336;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    line-height: 1;
    user-select: none;
}

/* ─── 回転中エフェクト ─── */
.roulette-wrapper.spinning .center-point {
    box-shadow:
        0 0 10px rgba(33, 150, 243, 0.5),
        0 0 20px rgba(33, 150, 243, 0.3),
        0 0 30px rgba(33, 150, 243, 0.1);
}

.roulette-wrapper.spinning .pointer {
    animation: pointerBounce 0.3s ease-in-out infinite alternate;
}

@keyframes pointerBounce {
    from {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    }
    to {
        transform: translateY(-3px) scale(1.1);
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
}

/* ─── 結果表示 ─── */
.result-display {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 10px 24px;
    text-align: center;
    min-width: 200px;
    border: 2px solid #e0e0e0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(4px);
}

.result-display.winner {
    background: linear-gradient(135deg, #06bcaf, #059b8f);
    color: white;
    border-color: #06bcaf;
    transform: scale(1.05);
}

.result-text {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    word-break: break-word;
    min-height: 1.4em;
}

.result-display.show-result {
    animation: resultSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes resultSlideIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px) scale(1.08);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
}

/* ─── 操作ボタン ─── */
.control-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.control-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 36px;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    min-width: 130px;
}

.spin-btn {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
}

.spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.3);
}

.stop-btn {
    background: linear-gradient(135deg, #F44336, #d32f2f);
    color: white;
}

.stop-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(244, 67, 54, 0.3);
}

.control-buttons button:disabled {
    opacity: 1;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

/* ─── 当たりマスを削除ボタン ─── */
.remove-segment-btn {
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid #d4a574;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #8b6914;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    backdrop-filter: blur(4px);
}

.remove-segment-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.remove-segment-btn:disabled {
    opacity: 1;
    cursor: not-allowed;
}

/* ─── 当選時のエフェクト ─── */
.roulette-wrapper.winner {
    animation: winnerGlow 1s ease-in-out;
}

@keyframes winnerGlow {
    0%, 100% {
        filter: brightness(1) saturate(1);
    }
    50% {
        filter: brightness(1.2) saturate(1.3);
    }
}

/* ─── アクセシビリティ ─── */
@media (prefers-reduced-motion: reduce) {
    .roulette-canvas,
    .center-point,
    .pointer,
    .roulette-wrapper.spinning .center-point,
    .roulette-wrapper.spinning .pointer {
        animation: none;
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .roulette-canvas {
        border: 2px solid #000;
    }
    .center-point {
        border: 2px solid #000;
    }
    .pointer {
        text-shadow: 1px 1px 0 #000;
    }
}
