body {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

main {
    margin-top: 50px; /* 調整為導航欄的高度 */
}

.welfare-cards-group {
    padding: 1rem 0.5rem;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0b92db #f0f0f0;
    width: fit-content;
    margin: 0 auto;
}

.welfare-cards-group::-webkit-scrollbar {
    height: 8px;
}

.welfare-cards-group::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.welfare-cards-group::-webkit-scrollbar-thumb {
    background: #0b92db;
    border-radius: 4px;
}

.welfare-card {
    width: 280px;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.welfare-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
}

.welfare-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    gap: 1rem;
}

.welfare-datetime-input:read-only,
#shareCouponEventDatetimeInput:read-only {
    background: white;
}

.send-method-section .bi-question-circle-fill {
    color: #CC3434;
    padding-left: 4px;
}

.send-method-section .bi-question-circle-fill:hover {
    cursor: pointer;
}

.couponGiveMethodContainer,
.invoiceMethodContainer {
    display: none;
    border-left: 4px solid #3498db;
    border-radius: 8px;
    padding: 1.25rem 1rem !important;
    background: #f8f9fa;
    margin-top: 0.5rem;
    transition: all 0.2s ease-out;
    opacity: 0;
    transform: translateY(-10px);
}

.couponGiveMethodContainer.show,
.invoiceMethodContainer.show {
    opacity: 1;
    transform: translateY(0);
}

.couponGiveMethodContainer:hover,
.invoiceMethodContainer:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.invoiceMethodContainer .input-group {
    margin: 0;
}

.invoiceMethodContainer .input-group-text {
    background-color: #3498db;
    border: none;
    color: white;
}

.invoiceMethodContainer .form-text {
    margin-top: 0.75rem;
    margin-left: 0.5rem;
    color: #6c757d;
}

.invoiceMethodContainer .bi {
    font-size: 1.1rem;
}

.welfare-input-label > i {
    padding-right: 4px;
}

.welfare-input-label:hover {
    cursor: help;
}


.font-weight-bold {
    font-weight: bold !important;
}

.font-weight-bolder {
    font-weight: bolder !important;
}

/* 禁用數字輸入框旁邊的上下箭頭按鈕 */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 英雄區塊 */
.donate-hero {
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    padding: 5rem 0;
    color: white;
    position: relative;
    overflow: hidden;
    margin-top: -1px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* 活動公告 Modal */
.event-info {
    padding: 1rem;
}

.event-time, .event-content {
    text-align: center;
    margin-bottom: 1.5rem;
}

.event-time i, .event-content i {
    font-size: 2rem;
    color: #0b92db;
    margin-bottom: 1rem;
}

.event-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.event-info p {
    color: #666;
    margin-bottom: 0;
}

.event-info .highlight {
    color: #e74c3c;
    font-weight: bold;
}

/* 贊助方案區塊 */
.donate-plans-section {
    padding: 4rem 0;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* 提示框 */
.alert-modern {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.alert-modern i {
    font-size: 1.5rem;
}

/* 方案卡片 */
.plans-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0b92db #f0f0f0;
}

.plans-container::-webkit-scrollbar {
    height: 8px;
}

.plans-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.plans-container::-webkit-scrollbar-thumb {
    background: #0b92db;
    border-radius: 4px;
}

.plan-card {
    flex: 0 0 auto;
    width: 240px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    margin: 0;
}

.plan-card:hover {
    transform: translateY(-5px);
}

.plan-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 1.5rem;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.plan-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.plan-body {
    padding: 1.5rem;
}

.plan-price {
    text-align: center;
    margin-bottom: 1.5rem;
}

.plan-price .currency {
    font-size: 1.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.plan-price .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.plan-details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
}

.detail-item .label {
    color: #666;
    font-size: 1.1rem;
}

.detail-item .value {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.detail-item.bonus {
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
}

.detail-item.total {
    margin-top: 1rem;
    border-top: 2px dashed #e9ecef;
    padding-top: 1rem;
}

.detail-item.total .value {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 700;
}

.plan-quantity {
    margin-top: 1.5rem;
}

.quantity-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-quantity {
    width: 40px;
    height: 40px;
    border: none;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-quantity:hover:not(:disabled) {
    background: #e9ecef;
}

.quantity-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.2rem;
}

.row.justify-content-around {
    display: flex;
    flex-wrap: nowrap;
    padding: 1rem 0;
    margin: 0;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #0b92db #f0f0f0;
    gap: 1rem;
}

.row.justify-content-around::-webkit-scrollbar {
    height: 8px;
}

.row.justify-content-around::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.row.justify-content-around::-webkit-scrollbar-thumb {
    background: #0b92db;
    border-radius: 4px;
}

.col-md-4.col-xxl-3 {
    flex: 0 0 auto;
    width: 240px !important; /* 強制固定寬度 */
    padding: 0;
    margin: 0;
}

/* 總額計算 */
.total-calculation {
    margin-top: 3rem;
}

.total-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 400px;
    margin-left: auto;
}

.total-header {
    background: linear-gradient(45deg, #0b92db, #0873ab);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.bonus-badge {
    background: #e74c3c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    animation: pulse 2s infinite;
}

.total-body {
    padding: 1.5rem;
}

.total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 1.2rem;
}

.total-item.highlight {
    color: #0b92db;
    font-weight: bold;
    font-size: 1.4rem;
}

/* 分隔線 */
.section-divider {
    margin: 3rem 0;
    border-top: 2px dashed #e9ecef;
}

/* 動畫效果 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* 移除所有響應式的寬度設定 */
@media (max-width: 1400px) {
    .col-md-4.col-xxl-3 {
        width: 240px !important;
    }
}

@media (max-width: 1200px) {
    .col-md-4.col-xxl-3 {
        width: 240px !important;
    }
}

@media (max-width: 992px) {
    .col-md-4.col-xxl-3 {
        width: 240px !important;
    }
}

@media (max-width: 768px) {
    .col-md-4.col-xxl-3 {
        width: 240px !important;
        margin: 0;
    }
    
    .plan-card {
        margin: 0;
    }
}

/* 兌換玩家福利區塊 */
.welfare-section {
    padding: 3rem 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-radius: 20px;
    margin: 2rem 0;
}

.welfare-section h1 {
    position: relative;
    display: block;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

.welfare-section .bi-box2-heart {
    color: #e74c3c;
    margin-right: 0.5rem;
    animation: heartBeat 1.5s ease-in-out infinite;
}

.welfare-section p {
    margin-top: 1rem;
}

.welfare-wrapper-card {
    max-width: fit-content;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    border: none;
    margin: 0 auto;
}

.welfare-wrapper-card-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    font-size: 1.4rem;
    padding: 1.5rem;
    text-align: center;
    border-bottom: none;
}

.welfare-wrapper-card-header .text-success {
    color: #2ecc71 !important;  /* 更鮮豔的綠色 */
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);  /* 添加文字陰影 */
}

/* 點券回饋方式區塊 */
.send-method-section {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin: 2rem 0;
}

.send-method-section h1 {
    position: relative;
    display: block;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
    width: 100%;
}

.send-method-section .bi-send-check {
    color: #27ae60;
    margin-right: 0.5rem;
    animation: slideIn 1s ease-out;
}

.welfare-input-group {
    position: relative;
    margin-top: 1rem;
}

.welfare-input-label {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px 0 0 6px;
}

.welfare-input-label i {
    margin-right: 0.5rem;
}

.send-method-section p {
    margin-top: 1rem;
}

/* 動畫效果 */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 響應式設計 */
@media (max-width: 768px) {
    .send-method-section {
        padding: 2rem 1rem;
    }
}

/* 對話框美化 */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.modal-header .btn-close {
    color: white;
    opacity: 0.8;
    transition: opacity 0.2s;
    filter: brightness(0) invert(1);
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 1.2rem;
    background: #f8f9fa;
}

/* 購買資料確認對話框 */
#confirmPayInfo-content .modal-body {
    font-size: 1.1rem;
}

#confirmPayInfo-content strong {
    color: #2c3e50;
    font-size: 1.2rem;
}

#confirmPayInfo-content .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

#confirmPayInfo-content .d-block {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 0.3rem;
}

/* 贊助條款對話框 */
#termsModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#termsModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#termsModal .modal-body::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#termsModal .modal-body::-webkit-scrollbar-thumb {
    background: #0b92db;
    border-radius: 4px;
}

/* 按鈕樣式 */
.modal .btn-secondary {
    background: #6c757d;
    border: none;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.modal .btn-primary {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    border: none;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.modal .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 為第一個卡片添加左邊距，確保在手機上可見 */
.welfare-card:first-child {
    margin-left: 0.5rem;
}

/* 為最後一個卡片添加右邊距，確保滾動到最右邊時有適當的空間 */
.welfare-card:last-child {
    margin-right: 0.5rem;
}

/* 在小螢幕上調整邊距 */
@media (max-width: 768px) {
    .welfare-cards-group {
        padding: 1rem 0.5rem;
        justify-content: flex-start;
        width: 100%;
    }
    
    .welfare-wrapper-card {
        width: 95%;
        max-width: none;
    }

    .welfare-card:first-child {
        margin-left: 0.25rem;
    }
    
    .welfare-card:last-child {
        margin-right: 0.25rem;
    }
}

/* 調整表單元素的間距 */
.form-label {
    margin-bottom: 0.5rem;
}

.input-group + .input-group,
.input-group + .form-check,
.form-check + .input-group {
    margin-top: 1rem;
}

.form-check {
    margin-top: 0.5rem;
}

/* 調整選擇器和容器的間距 */
.form-select {
    margin-bottom: 0;
}

/* 調整容器內部元素的間距 */
.couponGiveMethodContainer > *:not(:last-child),
.invoiceMethodContainer > *:not(:last-child) {
    margin-bottom: 1rem;
}
