/* ガチャ詳細画面専用スタイル */

/* レイアウトリセット */
.main-content .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.main-content {
    padding: 0 !important;
    margin: 0 !important;
}

/* メインラッパー */
.gacha-detail-wrap {
    padding-bottom: 120px;
    width: 375px;
    margin: 0 auto;
}

/* ヘッダー */
.gacha-header {
    text-align: center;
    margin: 80px 0 30px 0;
}

.gacha-thumbnail {
    margin-bottom: 20px;
    width: 375px;
    overflow: hidden;
    box-sizing: border-box;
}

.gacha-thumbnail img {
    width: 375px;
    height: auto;
    display: block;
    object-fit: cover;
}

/* アイテムコンテナ */
.gacha-items-container {
    margin-bottom: 40px;
    width: 375px;
}

/* レア度セクション */
.rarity-section {
    margin-bottom: 30px;
    padding: 10px 0;
    background: white;
}

.rarity-header {
    text-align: center;
    margin-bottom: 15px;
}

.rarity-label {
    height: 50px;
    width: auto;
}

.rarity-items {
    display: grid;
    gap: 20px;
    justify-items: center;
}

/* 1等グリッド */
.first-etc-grid {
    display: grid;
    grid-template-columns: 280px;
    gap: 24px;
    width: 280px;
    margin: 0 auto;
}

/* 2等グリッド */
.second-etc-grid {
    display: grid;
    grid-template-columns: 152px 152px;
    gap: 24px;
    width: 328px;
    margin: 0 auto;
}

.second-etc-grid:has(.gacha-item:only-child) {
    grid-template-columns: 152px;
}

/* 3等グリッド */
.third-etc-grid {
    display: grid;
    grid-template-columns: 95px 95px 95px;
    gap: 20px;
    width: 325px;
    margin: 0 auto;
}

.third-etc-grid:has(.gacha-item:only-child) {
    grid-template-columns: 95px;
}

.third-etc-grid:has(.gacha-item:nth-child(2):last-child) {
    grid-template-columns: 95px 95px;
}

/* その他グリッド */
.n-grid {
    text-align: center;
}

.n-item-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
}

.n-item-text p {
    margin: 10px 0;
}

/* アイテムカード */
.gacha-item {
    background: transparent;
    border-radius: 10px;
    padding: 0;
    box-shadow: none;
    transition: transform 0.3s;
    cursor: pointer;
    overflow: hidden;
}

.gacha-item:hover {
    transform: translateY(-2px);
    box-shadow: none;
}

/* カードサイズ */
.first-etc-section .gacha-item {
    width: 280px;
    height: 370px;
}

.second-etc-section .gacha-item {
    width: 152px;
    height: 200px;
}

.third-etc-section .gacha-item {
    width: 95px;
    height: 125px;
}

.item-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* アイテム個数表示 */
.item-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

/* 注意事項 */
.gacha-notes {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-top: 50px;
}

.gacha-notes h3 {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #dc3545;
}

.notes-content h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

.notes-content p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 10px;
}

.notes-footer {
    margin-top: 30px;
    font-weight: bold;
    color: #333;
}

/* 固定フッター */
.gacha-fixed-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 10px 15px;
}

.footer-content {
    width: 345px;
    margin: 0 auto;
}

/* コインと在庫セクション */
.coin-stock-section {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 4px;
}

.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: 24px;
    height: 24px;
}

.coin-number {
    font-size: 1.8rem;
}

.coin-unit {
    font-size: 0.8rem;
    color: #999;
}

/* 在庫表示 */
.stock-display {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stock-info {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.stock-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stock-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ガチャアクション */
.gacha-actions {
    display: flex;
    justify-content: center;
    width: 100%;
}

.gacha-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.gacha-buttons .gummy-btn {
    width: 160px;
    height: 35px;
    font-size: 14px;
}

/* ログイン必要メッセージ */
.login-required {
    text-align: center;
}

.login-required p {
    margin-bottom: 10px;
    color: #666;
}

.login-required .gummy-btn {
    width:240px;
}

/* エラーメッセージ */
.error-message {
    background: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 10px;
}