/* ======================================================
   AMERICAN DREAM SLOT — ヴィンテージアメリカ テーマ
   RushOut カラー: 赤 (#cc0000) / ネイビー (#1a2744) / クリーム
   ====================================================== */

/* ====== スライドインバナー (PC=左下 / SP=下から) ====== */
.gacha-slide-banner {
    position: fixed;
    bottom: 20px;
    left: -460px;
    z-index: 8000;
    background: linear-gradient(160deg, #fff8e7 0%, #ffefd5 60%, #fff0cc 100%);
    border: 3px solid #cc0000;
    border-radius: 14px;
    box-shadow: 0 6px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: left 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    max-width: 420px;
    width: 420px;
    overflow: hidden;
}

.gacha-slide-banner.visible {
    left: 20px;
}

/* バナー上部のカラーストライプ（アメリカ国旗モチーフ） */
.gacha-slide-banner::before {
    content: '';
    display: block;
    height: 6px;
    background: repeating-linear-gradient(90deg,
            #cc0000 0, #cc0000 33%,
            #fff 33%, #fff 66%,
            #1a2744 66%, #1a2744 100%);
}

.gacha-banner-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    color: #cc0000;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    padding: 4px;
}

.gacha-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 20px 16px;
}

.gacha-banner-icon {
    font-size: 52px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.gacha-banner-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2744;
    line-height: 1.4;
    letter-spacing: 0.03em;
}

.gacha-banner-sub {
    font-size: 13px;
    color: #7a5c30;
    margin-top: 4px;
    line-height: 1.5;
}

.gacha-banner-btn {
    display: inline-block;
    margin-top: 10px;
    background: linear-gradient(135deg, #cc0000, #e63900);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 3px 10px rgba(204, 0, 0, 0.3);
}

/* ====== モーダルオーバーレイ ====== */
.gacha-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gacha-modal-overlay.active {
    display: flex;
}

/* ====== スロットマシン ====== */
.gacha-machine {
    background: linear-gradient(180deg, #fff8e7 0%, #ffefd5 30%, #fff 100%);
    border: 4px solid #cc0000;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.gacha-machine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #cc0000 0%, #1a2744 50%, #cc0000 100%);
}

.gacha-machine-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a2744;
    letter-spacing: 0.08em;
    text-shadow: 1px 1px 0 rgba(204, 0, 0, 0.15);
    margin-bottom: 4px;
}

.gacha-machine-sub {
    font-size: 12px;
    color: #8b7355;
    margin-bottom: 20px;
}

/* ====== リール ====== */
.gacha-reels {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.gacha-reel {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border: 3px solid #1a2744;
    border-radius: 10px;
    background: #fff;
    position: relative;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gacha-reel-track {
    position: relative;
    top: 0;
    transition: none;
}

.gacha-reel-item {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
}

.gacha-reel-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.gacha-reel.spinning .gacha-reel-track {
    animation: spin-reel 0.15s linear infinite;
}

@keyframes spin-reel {
    0% {
        top: 0;
    }

    100% {
        top: -100px;
    }
}

.gacha-reel.stopped {
    border-color: #cc0000;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.15), 0 0 12px rgba(204, 0, 0, 0.3);
}

/* ====== ボタン ====== */
.gacha-draw-btn {
    display: inline-block;
    background: linear-gradient(135deg, #cc0000 0%, #e63900 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    padding: 14px 40px;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.05em;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.35);
}

.gacha-draw-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(204, 0, 0, 0.45);
}

.gacha-draw-btn:active:not(:disabled) {
    transform: translateY(0);
}

.gacha-draw-btn:disabled {
    background: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

.gacha-close-modal-btn {
    display: inline-block;
    margin-top: 28px;
    background: none;
    color: #999;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 16px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, color 0.2s;
}

.gacha-close-modal-btn:hover {
    background: #f0f0f0;
    color: #666;
}

/* ====== 結果表示 ====== */
.gacha-result {
    display: none;
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    animation: result-pop 0.4s ease;
}

.gacha-result.visible {
    display: block;
}

.gacha-result.win {
    background: linear-gradient(135deg, #fff8e7, #fff0cc);
    border: 2px solid #cc0000;
}

.gacha-result.lose {
    background: #f5f5f5;
    border: 2px solid #ccc;
}

@keyframes result-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

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

.gacha-result-grade {
    font-size: 22px;
    font-weight: 700;
    color: #cc0000;
    margin-bottom: 6px;
}

.gacha-result.lose .gacha-result-grade {
    color: #888;
}

.gacha-result-desc {
    font-size: 13px;
    color: #555;
}

/* ====== クーポンコピー ====== */
.gacha-coupon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.gacha-coupon-code {
    background: #1a2744;
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.1em;
    font-family: 'Courier New', monospace;
}

.gacha-copy-btn {
    background: linear-gradient(135deg, #cc0000, #e63900);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s;
}

.gacha-copy-btn:hover {
    filter: brightness(0.9);
}

.gacha-copy-btn.copied {
    background: #2a8a2a;
}

/* ====== 紙吹雪 ====== */
.gacha-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.confetti-piece {
    position: absolute;
    top: -10px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateX(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateX(var(--drift)) rotate(720deg);
        opacity: 0;
        top: 100%;
    }
}

/* ====== SP (モバイル) ====== */
@media (max-width: 768px) {
    .gacha-slide-banner {
        bottom: 60px;
        left: 0 !important;
        right: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% + 60px));
        transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .gacha-slide-banner.visible {
        left: 0 !important;
        transform: translateY(0);
    }

    .gacha-banner-content {
        padding: 24px 20px 20px;
    }

    .gacha-banner-close {
        top: 8px;
        right: 12px;
        font-size: 24px;
        padding: 8px;
    }

    .gacha-machine {
        max-width: 100%;
        padding: 20px 16px;
    }

    .gacha-reel {
        width: 80px;
        height: 80px;
    }

    .gacha-reel-item {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }

    .gacha-reel-item img {
        width: 64px;
        height: 64px;
    }

    .gacha-machine-title {
        font-size: 18px;
    }

    .gacha-draw-btn {
        font-size: 16px;
        padding: 12px 30px;
    }

    @keyframes spin-reel {
        0% {
            top: 0;
        }

        100% {
            top: -80px;
        }
    }
}