/* === ガチャカード全体のラッパー === */
.gacha-card-wrapper {
    width: 100%;
    max-width: 450px;
    margin-bottom: 0;
    position: relative;
}

/* ガチャカード振動アニメーション */
@keyframes gachaCardVibrate {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-8px); }
    20% { transform: translateX(10px); }
    30% { transform: translateX(-8px); }
    40% { transform: translateX(10px); }
    50% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    70% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
    90% { transform: translateX(-2px); }
}

.gacha-card-wrapper.vibrating {
    animation: gachaCardVibrate 0.4s ease-in-out;
    will-change: transform;
}

/* smallサイズのラッパー */
.gacha-card-small .gacha-card-wrapper,
.gacha-card-wrapper.small-wrapper {
    max-width: 170px;
    margin-bottom: 0;
}

/* === ウェイトリストボタンラッパー === */
.waitlist-button-wrapper {
    width: 100%;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.waitlist-button-wrapper .gummy-btn {
    width: 100%;
    font-size: 0.85rem;
    height: 24px;
    padding: 0 8px;
    white-space: nowrap;
}

/* === ガチャカード共通スタイル === */
.gacha-card {
    background: #fff;
    border-radius: 15px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    height: auto;
    position: relative;
}

.gacha-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* サイズバリエーション */
.gacha-card-small {
    max-width: 100%;
    width: 100%;
}

.gacha-card-small .gacha-image-wrapper {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 15px 15px 0 0;
}

.gacha-card-small .gacha-info {
    padding: 2px 6px;
}

.gacha-card-small .waitlist-button-wrapper {
    margin-bottom: 0;
}

.gacha-card-small .waitlist-button-wrapper .gummy-btn {
    display: flex;
    width: 90%;
    max-width: 90%;
    height: 24px;
    padding: 4px 8px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: normal;
    margin: 0 auto;
}

.gacha-card-small .coin-stock-section {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.gacha-card-small .gacha-coin-display {
    width: 100%;
    text-align: center;
    display: flex;
    justify-content: center;
}

.gacha-card-small .gacha-coin-amount {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gacha-card-small .coin-number {
    font-size: 1.2rem;
}

.gacha-card-small .stock-display {
    width: 100%;
}

.gacha-card-small .stock-gauge-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gacha-card-small .stock-gauge-bar {
    order: 1;
    height: 8px;
    width: 100%;
    flex: none;
    display: block;
}

.gacha-card-small .stock-gauge-info {
    order: 2;
    margin-bottom: 0;
    margin-top: 2px;
    font-size: 14px;
    color: #000;
    text-align: center;
    font-weight: 700;
    line-height: normal;
}

.gacha-card-small .stock-gauge-info span {
    font-size: 16px;
    font-weight: 700;
}

.gacha-card-small .countdown-timer-large {
    padding: 4px 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* スモールカード：開催前・終了前のサイズと色 */
.gacha-card-small .countdown-timer-large.upcoming .countdown-label {
    color: #FF0000;
    font-size: 11px;
}

.gacha-card-small .countdown-timer-large.upcoming .countdown-display-large {
    color: #FF0000;
    font-size: 14px;
}

.gacha-card-small .countdown-timer-large.ending .countdown-label {
    color: #0047AB;
    font-size: 11px;
}

.gacha-card-small .countdown-timer-large.ending .countdown-display-large {
    color: #0047AB;
    font-size: 14px;
}

/* スモールカード：新規ユーザー限定・はじまりのガチャ・課金後時間制限は青色でオーバーライド */
.gacha-card-small .countdown-timer-large.new-user .countdown-label,
.gacha-card-small .countdown-timer-large.starter .countdown-label,
.gacha-card-small .countdown-timer-large.payment_limited .countdown-label {
    color: #0047AB;
}

.gacha-card-small .countdown-timer-large.new-user .countdown-display-large,
.gacha-card-small .countdown-timer-large.starter .countdown-display-large,
.gacha-card-small .countdown-timer-large.payment_limited .countdown-display-large {
    color: #0047AB;
    font-size: 14px;
}

.gacha-card-small .waitlist-users-section {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.gacha-card-small .waitlist-entry-label {
    font-size: 11px;
}

.gacha-card-small .waitlist-user-icon {
    width: 20px;
    height: 20px;
}

.gacha-card-small .new-user-badge-bottom {
    font-size: 11px;
    min-width: 120px;
    min-height: 12px;
    padding: 2px 8px;
    bottom: -8px;
}

.gacha-card-large {
    width: 100%;
    max-width: 400px;
}

/* ガチャ画像リンク */
.gacha-image-link {
    display: block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}


.gacha-image-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 15px 15px 0 0;
}

/* 下書き表示（ガチャボタンの下） */
.draft-message {
    width: 100%;
    margin-top: 16px;
}

.draft-text {
    background: linear-gradient(135deg, #8B0000 0%, #DC143C 100%);
    color: #FFFFFF;
    font-size: 28px;
    font-weight: bold;
    padding: 18px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    letter-spacing: 4px;
    text-align: center;
    width: 100%;
    display: block;
}

.gacha-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gacha-image-link:hover .gacha-image {
    transform: scale(1.05);
    opacity: 1;
}


.gacha-info {
    padding: 4px 16px 16px;
    overflow: hidden;
    border-radius: 0 0 15px 15px;
}

/* 新規ユーザー限定ガチャの背景色 */
.gacha-card.new-user-limited .gacha-info {
    position: relative;
    padding-bottom: 18px;
    overflow: visible;
    background: transparent;
}

.gacha-card.new-user-limited .gacha-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(150deg, rgba(166, 217, 0, 0.3) 0%, rgba(255, 68, 84, 0.3) 100%);
    border-radius: 0 0 15px 15px;
    z-index: 0;
    animation: GradGachaInfo 4s infinite alternate;
}

.gacha-card.new-user-limited .gacha-info > * {
    position: relative;
    z-index: 1;
}

@keyframes GradGachaInfo {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* 新規ユーザー限定ガチャのテキスト色 */
.gacha-card.new-user-limited .gacha-coin-amount {
    color: #000000;
}

.gacha-card.new-user-limited .coin-number {
    color: #000000;
}

.gacha-card.new-user-limited .coin-unit {
    color: #000000;
}

.gacha-card.new-user-limited .stock-info {
    color: #000000;
}

.gacha-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* コインと在庫のセクション */
.coin-stock-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 4px;
    padding: 0px 0px;
}

/* ガチャページ専用のコイン表示エリア */
.gacha-coin-display {
    flex-shrink: 0;
}

.gacha-coin-amount {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.gacha-coin-icon {
    width: 20px;
    height: 20px;
}

.coin-number {
    font-size: 16px;
}

.gacha-card-small .coin-number {
    font-size: 12px;
}

.coin-unit {
    color: #666;
}

/* 在庫表示 */
.stock-display {
    flex: 1;
    min-width: 0;
}

/* ゲージバースタイルは stock-gauge.blade.php コンポーネントで定義されています */

.gacha-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    align-items: center;
    justify-content: space-between;
}

/* ガチャボタンコンテナ */
.gacha-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    align-items: center;
}

.ticket-unlock-gacha-buttons {
    width: 100%;
}

/* プレイコード専用ボタンスタイル */
.gummy-btn-playcode {
    background: linear-gradient(90deg, #FFF168 0%, #CBFFFA 50%, #FBD6FF 100%);
    color: #333;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.gummy-btn-playcode:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.gummy-btn-playcode:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* プレイコードボタンのテキストを見やすくする */
.gummy-btn-playcode span {
    position: relative;
    z-index: 1;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* カミングスーンボタンスタイル */
.coming-soon-button {
    width: 100%;
}

.gacha-card .coming-soon-btn {
    width: 100%;
    background: #9E9E9E;
    color: #FFFFFF;
    cursor: not-allowed;
    opacity: 0.8;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 16px 24px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
}

.gacha-card .coming-soon-btn:hover {
    transform: none;
    box-shadow: none;
    background: #9E9E9E;
}

.gacha-card .coming-soon-btn span {
    color: #FFFFFF;
}

/* カウントダウンタイマー（大きく表示） */
.countdown-timer-large {
    width: 100%;
    padding: 0px 20px;
    text-align: center;
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0px;
    white-space: nowrap;
}

.countdown-timer-large .countdown-label {
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
    font-style: normal;
    line-height: normal;
    white-space: nowrap;
}

.countdown-timer-large .countdown-display-large {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    font-style: normal;
    line-height: normal;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}

/* 開催前カウントダウン（赤色） */
.countdown-timer-large.upcoming .countdown-label {
    color: #FF0000;
    font-size: 12px;
}

.countdown-timer-large.upcoming .countdown-display-large {
    color: #FF0000;
    font-size: 14px;
}

/* 終了前カウントダウン（青色） */
.countdown-timer-large.ending .countdown-label,
.countdown-timer-large.new-user .countdown-label,
.countdown-timer-large.starter .countdown-label,
.countdown-timer-large.payment_limited .countdown-label {
    color: #0047AB;
    font-size: 12px;
}

.countdown-timer-large.ending .countdown-display-large,
.countdown-timer-large.new-user .countdown-display-large,
.countdown-timer-large.starter .countdown-display-large,
.countdown-timer-large.payment_limited .countdown-display-large {
    color: #0047AB;
    font-size: 14px;
}

/* カウントダウンラッパー */
.new-user-timer-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 0;
}

/* 新規ユーザー限定バッジ（カード下部から半分はみ出す） */
.new-user-badge-bottom {
    position: absolute;
    bottom: -14.5px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 170px;
    max-width: 90%;
    height: 29px;
    padding: 4px 12px;
    flex-shrink: 0;
    border-radius: 21px;
    border: 2px solid #F87878;
    background: #FFF;
    color: #F87878;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
}

/* ウェイトリスト登録ユーザーアイコンセクション */
.waitlist-users-section {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* largeカード：ボタンの下に表示する場合は中央寄せ、上部にマージン */
.waitlist-users-section.waitlist-users-below {
    justify-content: center;
    margin-top: 2px;
}

.waitlist-entry-label {
    color: #6F6969;
    text-align: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

.waitlist-users-icons {
    display: flex;
    align-items: center;
    position: relative;
}

.waitlist-user-icon {
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #6F6969;
    background: lightgray;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.waitlist-user-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.waitlist-user-icon-default {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #FFF;
    font-size: 14px;
    font-weight: bold;
}

.waitlist-user-ellipsis {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
}

.waitlist-user-ellipsis span {
    color: #6F6969;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* カウントダウンタイマー（小さい版・削除予定） */
.countdown-timer {
    margin-bottom: 15px;
    text-align: center;
}

.countdown-text {
    color: #FF0000;
    font-weight: bold;
    font-size: 1rem;
}

/* 開催前カウントダウン（青色） */
.countdown-timer.upcoming .countdown-text {
    color: #0066CC;
}

.countdown-display {
    margin-left: 5px;
}

/* 期間終了時のスタイル */
.gacha-card.expired {
    opacity: 0.7;
}

.gacha-card.expired:hover {
    transform: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gacha-image.expired {
    filter: grayscale(100%);
}

.gacha-image-link.disabled {
    pointer-events: none;
    cursor: default;
}

.gacha-image-link.disabled:hover .gacha-image {
    transform: none;
}

.expired-message {
    margin-bottom: 15px;
    text-align: center;
}

.expired-text {
    color: #888;
    font-weight: bold;
    font-size: 1rem;
}

/* 招待ロックメッセージ */
.invitation-lock-message {
    text-align: center;
    padding: 32px 16px;
    border-radius: 8px;
}

.lock-icon-large {
    margin-bottom: 12px;
}

.lock-icon-large img {
    width: 32px;
    height: 32px;
}

.lock-text-large {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
