/* メインコンテナ */
.gacha-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 0 8px 8px 8px;
}

/* 日付セクション */
.date-section {
    margin-bottom: 12px;
}

.date-header {
    position: relative;
    padding: 12px 0;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 日付テキスト */
.date-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
}

/* 日付コンテナ */
.date-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-day-of-week {
    font-size: 12px;
    font-weight: 700;
    color: #6F6969;
}

/* 日付の円形背景（数字のみ） - デフォルトは非表示 */
.date-circle {
    display: none;
}

/* 今日の日付のみ円形背景を表示 */
.date-header.is-today .date-circle {
    display: flex;
    width: 40px;
    height: 40px;
    background-color: #6F6969;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* 今日の日付（円の中） */
.date-header.is-today .date-day {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: #fff;
}

/* その他の日付（円なし） */
.date-day {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: #6F6969;
}

.date-divider {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* カミングスーン専用スタイル */
.date-header.is-coming-soon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-header.is-coming-soon .coming-soon-text {
    flex-shrink: 0;
}

.date-header.is-coming-soon .date-divider {
    flex: 1;
}

.coming-soon-label {
    font-size: 20px;
    font-weight: bold;
    color: #6F6969;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* 完売終了専用スタイル */
.date-header.is-sold-out {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-header.is-sold-out .sold-out-text {
    flex-shrink: 0;
}

.date-header.is-sold-out .date-divider {
    flex: 1;
}

.sold-out-label {
    font-size: 20px;
    font-weight: bold;
    color: #999;
    letter-spacing: 2px;
    white-space: nowrap;
}

/* 完売終了の非表示アイテム */
.sold-out-hidden {
    display: none !important;
}

/* もっと見るボタン */
.load-more-btn {
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.load-more-container {
    margin-bottom: 20px;
}

/* オーバーレイ */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto; /* 背景クリックで閉じられるように変更 */
}

.notification-overlay.show {
    display: flex;
}

.overlay-content {
    position: relative;
    max-width: 600px;
    width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.overlay-image {
    width: 100%;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.overlay-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 36px;
    height: 36px;
    background-color: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-weight: 300;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    line-height: 1;
}

.overlay-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.notification-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

/* === カルーセルバナーのスタイル === */
.banner-carousel {
    max-width: 768px;
    margin: 0px auto 0px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.swiper {
    width: 100%;
    height: auto;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.swiper-slide {
    position: relative;
    background: #f5f5f5;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* バナーサイズ統一 */
.swiper {
    width: 375px;
    height: 100px;
    margin: 0 auto;
}

.banner-image {
    width: 375px;
    height: 100px;
}

/* ナビゲーションボタンを非表示 */
.swiper-button-next,
.swiper-button-prev {
    display: none;
}

/* === ガチャカードのスタイル === */
.gacha-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    align-items: stretch;
}

/* 2列レイアウト用のスタイル（Masonry） */
.gacha-list.two-column {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 12px;
    column-gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
}

.gacha-list.two-column > div {
    flex: 0 0 calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
    transition: top 0.3s ease, left 0.3s ease;
}

/* ピックアップガチャは全幅で表示 */
.gacha-list.two-column > .pickup-lottery {
    flex: 0 0 100%;
    max-width: 100%;
    left: 0 !important;
    transform: none !important;
}

.gacha-list.two-column.masonry-ready {
    display: block;
    opacity: 1;
}

.gacha-list.two-column.masonry-ready > div {
    position: absolute;
}

/* smallサイズのガチャカードのラッパー調整 */
.gacha-list.two-column .gacha-card-wrapper {
    width: 100%;
}

/* ピックアップではないガチャのラッパー */
.gacha-list.two-column > div:not(.pickup-lottery) .gacha-card-wrapper {
    width: 100%;
    max-width: 100%;
}

/* ピックアップガチャのラッパー */
.gacha-list.two-column > .pickup-lottery .gacha-card-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ピックアップガチャのカード本体も100%幅（アスペクト比は維持） */
.gacha-list.two-column > .pickup-lottery .gacha-card-wrapper > * {
    width: 100%;
    max-width: 100%;
    padding: 0 !important;
    margin: 0 !important;
}

/* ピックアップガチャの画像コンテナの余白を削除 */
.gacha-list.two-column > .pickup-lottery .gacha-card-image,
.gacha-list.two-column > .pickup-lottery .card-image,
.gacha-list.two-column > .pickup-lottery img:not(.gacha-coin-icon) {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    display: block !important;
}


/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 共通コンポーネントのガチャカードにアニメーションを適用 */
.gacha-list > * {
    animation: fadeInUp 0.6s ease forwards;
}

.gacha-list > *:nth-child(1) { animation-delay: 0.1s; }
.gacha-list > *:nth-child(2) { animation-delay: 0.2s; }
.gacha-list > *:nth-child(3) { animation-delay: 0.3s; }
.gacha-list > *:nth-child(4) { animation-delay: 0.4s; }
.gacha-list > *:nth-child(5) { animation-delay: 0.5s; }

/* モーダルのスタイル */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

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

.modal-content {
    background: #fff;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* サムネイル */
.modal-thumbnail {
    position: relative;
    width: 100%;
    height: 175px;
    overflow: hidden;
    padding: 32px 16px 0 16px;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* キャッチコピー */
.modal-catchcopy {
    padding: 16px;
    text-align: center;
}

.modal-catchcopy-title {
    font-weight: bold;
    color: #333;
    font-size: 16px;
    margin-bottom: 8px;
}

.modal-catchcopy-text {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

/* 残りコイン数 */
.modal-coins-section {
    padding: 16px;
    text-align: center;
}

.modal-coins-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.modal-coins-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 18px;
    font-weight: bold;
}

.modal-coin-icon {
    width: 24px;
    height: 24px;
}

.coin-current {
    color: #F59E0B;
}

.coin-arrow {
    color: #999;
    font-size: 16px;
}

.coin-after {
    color: #EF4444;
}

/* ボタン */
.modal-buttons {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* モーダル内のレインボーボタン専用調整 */
.modal-buttons .gummy-btn-rainbow::after {
    border-radius: 16px 16px 0 0;
}

/* フッターナビゲーション強制表示 */
.footer-navigation {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 99999 !important;
    display: block !important;
    width: 100% !important;
}

/* コイン不足モーダル専用スタイル */
.coin-shortage-message {
    padding: 32px 24px;
    text-align: center;
}

.coin-shortage-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

.coin-shortage-text {
    color: #555;
    font-size: 16px;
    line-height: 1.5;
}

.coin-shortage-text #neededCoins {
    color: #F59E0B;
    font-weight: bold;
    font-size: 18px;
}

/* Line@バナー */
.line_at_banner {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.line_at_banner:hover {
    transform: scale(1.05);
}

/* バナーレイヤーコンテナ */
.banner-layers {
    position: relative;
    width: 88px;
    height: 88px;
    display: block;
}

/* バナーレイヤー共通スタイル */
.banner-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 88px;
    height: auto;
    display: block;
}

/* 一番下のレイヤー（動く） */
.banner-layer-back {
    z-index: 1;
    animation: bannerBounce 2.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* 真ん中のレイヤー（上下に動く） */
.banner-layer-middle {
    z-index: 2;
    animation: bannerBounce 2.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* 一番上のレイヤー（上下に動く） */
.banner-layer-front {
    z-index: 3;
    animation: bannerBounce 2.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

/* 上下に動くアニメーション - ビョンビョン跳ねる */
@keyframes bannerBounce {
    0%, 20% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-12px);
    }
    30%, 50% {
        transform: translateY(-14px);
    }
    55% {
        transform: translateY(-12px);
    }
    60%, 100% {
        transform: translateY(0);
    }
}

/* カウントダウンバナーが表示されている時のコンテンツ余白 */
body.has-battle-countdown .banner-carousel,
body.has-battle-countdown .gacha-container:first-of-type {
    margin-top: 140px;
}

/* みんなの声セクション */
.voices-section {
    margin: 24px auto 0px;
    padding: 8px 8px 8px 4px;
    background: #FFEA83;
    display: flex;
    height: 450px;
    max-height: 450px;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.voices-header-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px;
}

.voices-header {
    display: flex;
    padding: 4px 16px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 20px;
    background: #FFF;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    width: fit-content;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-icons img {
    height: 40px;
    width: auto;
    display: block;
    animation: bounce 1s ease-in-out infinite;
}

/* 各クッキーに異なるアニメーション遅延を適用 */
.header-icons img:nth-child(1) {
    animation-delay: 0s;
}

.header-icons img:nth-child(2) {
    animation-delay: 0.2s;
}

/* 跳ねるアニメーション */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.voices-container {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    width: 100%;
    justify-content: flex-start;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* スクロールバーを非表示 */
.voices-container::-webkit-scrollbar {
    display: none;
}

.x-embed-wrapper {
    flex: 0 0 auto;
    width: 175px;
    max-width: 175px;
    transform: scale(0.55);
    transform-origin: top left;
}

/* Twitter埋め込み */
.x-embed-wrapper iframe {
    width: 314px !important;
    max-width: 314px !important;
}

/* Twitter blockquoteのマージン調整 */
.x-embed-wrapper .twitter-tweet {
    margin: 0 !important;
}

/* 見つからないツイートを非表示 */
.x-embed-wrapper.tweet-not-found {
    display: none;
}

/* スクロール矢印 */
.voices-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    transition: all 0.3s ease;
    pointer-events: auto;
    user-select: none;
}

.voices-scroll-arrow.active {
    display: flex;
}

.voices-scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.voices-scroll-arrow.left {
    left: 8px;
}

.voices-scroll-arrow.right {
    right: 8px;
}

.voices-scroll-arrow svg {
    width: 20px;
    height: 20px;
    fill: #6F6969;
}

/* 追加読み込みローディング */
.voices-loading-more {
    flex: 0 0 auto;
    width: 60px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voices-loading-more .loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(111, 105, 105, 0.2);
    border-top-color: #6F6969;
    border-radius: 50%;
    animation: voices-spin 0.8s linear infinite;
}

@keyframes voices-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ループ用複製要素 */
.x-embed-wrapper.loop-clone {
    /* 複製要素は見た目は同じ */
}

/* ============================================================
   PC表示用スタイル（みんなのこえセクション）
   ============================================================ */
@media (min-width: 769px) {
    /* PCではガチャコンテナと同じ幅に制限 */
    .voices-section {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
    }

    /* 2投稿表示用に幅を調整 */
    .x-embed-wrapper {
        width: 190px;
        max-width: 190px;
    }

    /* スクロール矢印を常に表示可能に */
    .voices-scroll-arrow {
        opacity: 0.7;
    }

    .voices-scroll-arrow:hover {
        opacity: 1;
    }

    /* 矢印の位置調整 */
    .voices-scroll-arrow.left {
        left: 4px;
    }

    .voices-scroll-arrow.right {
        right: 4px;
    }
}
