/* 捐贈模態框樣式 - 全螢幕設計 */

/* 模態框覆蓋層 */
.donation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 9999;
    overflow-y: auto;
}

/* 模態框內容 */
.donation-modal-content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
}

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

.modal-container.donation-container {
    width: 100%;
    max-width: 100%;
    background: #fff;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* 頁面標題區域 */
.donation-page-header {
    position: sticky;
    top: 0;
    background: var(--white);
    border-bottom: 1px solid var(--bg-secondary);
    z-index: 10001;
    padding: 0.8rem 1rem;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    pointer-events: auto;
}

.donation-page-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.donation-page-header .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.donation-page-header .back-btn:hover {
    background: var(--primary);
    color: var(--white);
}

.donation-page-header .back-btn i {
    font-size: 0.9rem;
}

.donation-page-header .title-section {
    flex: 1;
    text-align: center;
}

.donation-page-header .title-section h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    background: linear-gradient(135deg, #262626 0%, #E55555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.donation-page-header .title-section .subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0.4rem 0 0 0;
    opacity: 0.9;
    letter-spacing: 0.3px;
    font-style: italic;
}





/* 標題列間距元素 */
.donation-page-header .header-spacer {
    width: 36px;
    flex-shrink: 0;
}

/* 捐贈統計區域 */
.donation-stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.donation-stats-section .stats-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
}

.donation-stats-section .stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.8rem 1.4rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    border: 1px solid rgba(233, 158, 158, 0.15);
    backdrop-filter: blur(15px);
    letter-spacing: 0.3px;
}

.donation-stats-section .stat-value {
    color: #E55555;
    font-weight: 900;
    font-size: 1.6rem;
    text-shadow: 0 2px 4px rgba(229, 85, 85, 0.15);
    letter-spacing: -0.3px;
}

.donation-stats-section .stat-divider {
    color: #dee2e6;
    font-weight: 200;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

/* 模態框內容區域 */
.donation-wrapper {
    padding: 2rem 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

/* 載入中狀態 */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-spinner {
    text-align: center;
}

.loading-spinner i {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E55555;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner span {
    color: #8e8e8e;
    margin: 0;
}

/* 卡片式設計 */
.donation-card {
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.donation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.donation-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.donation-card .card-icon {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.donation-card .card-icon i {
    font-size: 1.5rem;
    color: #E55555;
}

.donation-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #262626;
    margin: 0;
    flex: 1;
}

.donation-card .card-subtitle {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #8e8e8e;
    border: 1px solid #e9ecef;
    font-weight: 500;
}

.donation-card .card-content {
    padding: 2rem;
}

/* 寵物選擇區域 */
.pet-selection-section {
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(233, 158, 158, 0.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

/* 寵物群組 */
.post-pets-group,
.user-pets-group {
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    border: 1px solid rgba(233, 158, 158, 0.15);
    backdrop-filter: blur(10px);
}

.post-pets-group:last-child,
.user-pets-group:last-child {
    margin-bottom: 0;
}

.pets-group-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1.2rem;
    padding: 0.8rem 0;
    border-bottom: 2px solid rgba(229, 85, 85, 0.1);
}

.group-label {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-primary);
    background: linear-gradient(135deg, #2c3e50 0%, #E55555 50%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.8rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.8px;
    position: relative;
}

.group-label::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #E55555 0%, #ff6b6b 100%);
    border-radius: 1px;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.group-label:hover::after {
    transform: scaleX(1);
}



/* 寵物滾動容器 */
.pets-scroll-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0.4rem 0;
}

.pets-scroll-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.em;
    width: 100%;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.pets-scroll-wrapper::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 寵物項目 - 緊湊版 */
.donation-modal-overlay .pet-item-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    padding: 0.4rem;
    border-radius: 14px;
    max-width: 100px; /* 限制寵物項目最大寬度 */
    min-width: 0; /* 允許收縮 */
    overflow: hidden; /* 確保內容不會溢出 */
}

.donation-modal-overlay .pet-item-compact:hover {
    transform: translateY(-4px) scale(1.05);
    background: rgba(229, 85, 85, 0.05);
}

.donation-modal-overlay .pet-item-compact.selected {
    background: rgba(229, 85, 85, 0.1);
    transform: scale(1.05);
}

.donation-modal-overlay .pet-item-compact.selected .pet-card-compact {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(229, 85, 85, 0.3);
    transform: scale(1.1);
}

.donation-modal-overlay .pet-item-compact.selected .pet-check-indicator {
    opacity: 1;
    transform: scale(1);
}

.donation-modal-overlay .pet-card-compact {
    position: relative;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
    background: var(--white);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.donation-modal-overlay .pet-card-compact:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(229, 85, 85, 0.25);
}

.donation-modal-overlay .pet-avatar-compact {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.donation-modal-overlay .pet-check-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border: 2px solid var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.donation-modal-overlay .pet-check-indicator i {
    color: var(--white);
    font-size: 0.7rem;
    font-weight: bold;
}

/* 寵物名字 - 緊湊版 */
.donation-modal-overlay .pet-name-compact {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    transition: all 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px; /* 限制名字最大寬度 */
    min-width: 0; /* 允許收縮 */
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
}


/* 貼文資訊卡片 */
.donation-modal-overlay .post-info-card .post-author {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.donation-modal-overlay .post-info-card .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.donation-modal-overlay .post-info-card .author-details h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #262626;
    margin: 0 0 0.75rem 0;
}

.donation-modal-overlay .post-info-card .post-preview {
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #E55555;
    margin: 0;
    max-width: 500px;
}

/* 寵物選擇卡片 */
.donation-modal-overlay .pets-group {
    margin-bottom: 2rem;
}

.donation-modal-overlay .pets-group:last-child {
    margin-bottom: 0;
}

.donation-modal-overlay .pets-group .group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.donation-modal-overlay .pets-group .group-label {
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
}



.donation-modal-overlay .pets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.donation-modal-overlay .pet-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.donation-modal-overlay .pet-option:hover {
    border-color: #E55555;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 85, 85, 0.15);
}

.donation-modal-overlay .pet-option.selected {
    border-color: #E55555;
    background: #fff5f5;
    box-shadow: 0 6px 20px rgba(229, 85, 85, 0.2);
}

.donation-modal-overlay .pet-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.donation-modal-overlay .pet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.donation-modal-overlay .pet-info {
    flex: 1;
    min-width: 0;
}

.donation-modal-overlay .pet-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #262626;
    margin: 0 0 0.5rem 0;
}

.donation-modal-overlay .pet-breed {
    font-size: 1rem;
    color: #8e8e8e;
    margin: 0 0 0.75rem 0;
}

.donation-modal-overlay .pet-badge {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    background: #E55555;
    color: var(--white);
    border-radius: 20px;
    display: inline-block;
}

.donation-modal-overlay .pet-badge.user-badge {
    background: #6c757d;
}

.donation-modal-overlay .select-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.donation-modal-overlay .pet-option.selected .select-indicator {
    background: #E55555;
    color: var(--white);
}

.donation-modal-overlay .select-indicator i {
    font-size: 1rem;
    font-weight: bold;
}

/* 響應式設計 - 捐贈模態框 */
@media (max-width: 480px) {
    .donation-modal-overlay .pet-item-compact {
        max-width: 80px; /* 手機版進一步縮小 */
        gap: 0.4rem;
        padding: 0.3rem;
    }
    
    .donation-modal-overlay .pet-card-compact {
        width: 55px;
        height: 55px;
    }
    
    .donation-modal-overlay .pet-name-compact {
        font-size: 0.65rem;
        max-width: 60px; /* 手機版縮小名字寬度 */
    }
}

@media (max-width: 360px) {
    .donation-modal-overlay .pet-item-compact {
        max-width: 70px; /* 小螢幕最小寬度 */
        gap: 0.3rem;
        padding: 0.25rem;
    }
    
    .donation-modal-overlay .pet-card-compact {
        width: 50px;
        height: 50px;
    }
    
    .donation-modal-overlay .pet-name-compact {
        font-size: 0.6rem;
        max-width: 50px; /* 小螢幕最小名字寬度 */
    }
}

/* 空狀態 */
.empty-pets-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px dashed rgba(229, 85, 85, 0.3);
    margin: 1.5rem 0;
}

.empty-state-icon {
    font-size: 4rem;
    color: #E55555;
    margin-bottom: 2rem;
    text-shadow: 0 3px 6px rgba(229, 85, 85, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.empty-pets-state h5 {
    font-size: 1.8rem;
    font-weight: 900;
    color: #262626;
    margin: 0 0 1.5rem 0;
    background: linear-gradient(135deg, #2c3e50 0%, #E55555 50%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.empty-pets-state p {
    color: #495057;
    margin: 0 0 2.5rem 0;
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 500;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: 0.2px;
}

/* 金額選擇卡片 */
.quick-amounts {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0.8rem 0;
}

.amount-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid #e9ecef;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 85px;
    min-width: 110px;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

.amount-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(229, 85, 85, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.amount-btn:hover {
    border-color: #E55555;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(229, 85, 85, 0.25);
}

.amount-btn:hover::before {
    opacity: 1;
}

.amount-btn.selected {
    border-color: #E55555;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    box-shadow: 0 12px 35px rgba(229, 85, 85, 0.3);
    transform: scale(1.05);
}

.amount-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: #262626;
    margin-bottom: 0.6rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.amount-unit {
    font-size: 1.1rem;
    color: #8e8e8e;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

/* 自訂金額 */
.custom-amount {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(233, 158, 158, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.custom-amount::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #E55555 0%, #ff6b6b 100%);
}

.custom-amount label {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #495057;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #2c3e50 0%, #E55555 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.amount-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.amount-input {
    width: 100%;
    padding: 1.25rem 4rem 1.25rem 1.5rem;
    border: 3px solid #e9ecef;
    border-radius: 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #262626;
    background: var(--white);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.3px;
}

.amount-input::placeholder {
    color: #adb5bd;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.amount-input:focus {
    outline: none;
    border-color: #E55555;
    box-shadow: 0 0 0 6px rgba(229, 85, 85, 0.15), 0 8px 25px rgba(229, 85, 85, 0.2);
    transform: translateY(-2px);
}

.input-suffix {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.amount-preview {
    text-align: center;
    margin-top: 0.8rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 10px;
    border: 1px solid rgba(229, 85, 85, 0.15);
}

.preview-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: #495057;
    margin: 0;
    letter-spacing: 0.3px;
}

#totalPrice {
    color: #E55555;
    font-weight: 900;
    font-size: 2rem;
    text-shadow: 0 3px 6px rgba(229, 85, 85, 0.25);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #E55555 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 金額提示樣式 */
.amount-hint {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6c757d;
    margin-top: 0.4rem;
    padding: 0.4rem 0.8rem;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.08) 0%, rgba(108, 117, 125, 0.12) 100%);
    border-radius: 8px;
    border: 1px solid rgba(108, 117, 125, 0.15);
    text-align: center;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.amount-hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.amount-hint:hover {
    color: #495057;
    background: linear-gradient(135deg, rgba(108, 117, 125, 0.12) 0%, rgba(108, 117, 125, 0.18) 100%);
    border-color: rgba(108, 117, 125, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.15);
}

.amount-hint:hover::before {
    left: 100%;
}

.amount-hint::after {
    content: '💡';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    opacity: 0.7;
    animation: hint-icon-pulse 2s ease-in-out infinite;
}

@keyframes hint-icon-pulse {
    0%, 100% { 
        opacity: 0.7;
        transform: translateY(-50%) scale(1);
    }
    50% { 
        opacity: 1;
        transform: translateY(-50%) scale(1.1);
    }
}

/* 捐贈設定卡片 */
.donation-message {
    margin-bottom: 2rem;
}

.donation-message label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1rem;
}

.donation-message textarea {
    width: 100%;
    padding: 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    color: #262626;
    background: var(--white);
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 100px;
    box-sizing: border-box;
}

.donation-message textarea:focus {
    outline: none;
    border-color: #E55555;
    box-shadow: 0 0 0 4px rgba(229, 85, 85, 0.1);
}

.char-count {
    text-align: right;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #8e8e8e;
}

.char-count.over-limit {
    color: #dc3545;
}

/* 匿名選項 */
.anonymous-option {
    margin-bottom: 2rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 24px;
    height: 24px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #E55555;
    border-color: #E55555;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 8px;
    height: 12px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    font-size: 1rem;
    font-weight: 600;
    color: #262626;
}

.option-desc {
    font-size: 0.9rem;
    color: #8e8e8e;
    margin: 0.75rem 0 0 2.75rem;
    line-height: 1.5;
}

/* 支付方式 */
.payment-method {
    margin-bottom: 2rem;
}

.payment-method label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 1.5rem;
}



/* 確認區域 */
.confirm-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 24px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 3px solid rgba(233, 158, 158, 0.2);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.confirm-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.confirm-summary::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent rgba(229, 85, 85, 0.1) transparent transparent;
}

.confirm-summary h4 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #262626;
    margin: 0 0 2.5rem 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 25%, #28a745 50%, #20c997 75%, #17a2b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(40, 167, 69, 0.1));
}

.confirm-summary h4::after {
    content: '';
    position: absolute;
    bottom: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    border-radius: 3px;
    opacity: 0.9;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    animation: title-underline 3s ease-in-out infinite;
}

@keyframes title-underline {
    0%, 100% { transform: translateX(-50%) scaleX(1); }
    50% { transform: translateX(-50%) scaleX(1.1); }
}

.confirm-summary h4 i {
    color: #28a745;
    font-size: 2.8rem;
    background: linear-gradient(135deg, #28a745 0%, #20c997 50%, #17a2b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 6px rgba(40, 167, 69, 0.4));
    animation: icon-glow 2s ease-in-out infinite alternate;
}

@keyframes icon-glow {
    0% { filter: drop-shadow(0 3px 6px rgba(40, 167, 69, 0.4)) brightness(1); }
    100% { filter: drop-shadow(0 4px 8px rgba(40, 167, 69, 0.6)) brightness(1.1); }
}

.summary-details {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid rgba(233, 158, 158, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.summary-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.02) 0%, rgba(32, 201, 151, 0.02) 100%);
    pointer-events: none;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.2rem;
    border-bottom: 2px solid rgba(240, 240, 240, 0.6);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 0.4rem 0;
    position: relative;
}

.summary-row:hover {
    background: linear-gradient(135deg, rgba(229, 85, 85, 0.05) 0%, rgba(255, 107, 107, 0.03) 100%);
    border-radius: 12px;
    padding-left: 2rem;
    padding-right: 2rem;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(229, 85, 85, 0.1);
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-row:first-child {
    margin-top: 0;
}

.summary-row .label {
    font-size: 1.6rem;
    color: #2c3e50;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    letter-spacing: 0.5px;
    position: relative;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.8) 100%);
    border-radius: 22px;
    border: 2px solid rgba(229, 85, 85, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.summary-row .label::before {
    content: '';
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #E55555 0%, #ff6b6b 50%, #ff8e8e 100%);
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: 0 3px 6px rgba(229, 85, 85, 0.4);
    animation: pulse-dot 2.5s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
}

.summary-row:hover .label {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(229, 85, 85, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 85, 85, 0.1);
}

.summary-row .value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a252f;
    letter-spacing: 0.4px;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-radius: 18px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.summary-row .value::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(229, 85, 85, 0.05) 0%, rgba(255, 107, 107, 0.05) 100%);
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.summary-row:hover .value::before {
    opacity: 1;
}

.summary-row .value.highlight {
    font-size: 2rem;
    color: #E55555;
    font-weight: 900;
    text-shadow: 0 5px 10px rgba(229, 85, 85, 0.4);
    letter-spacing: -0.2px;
    background: linear-gradient(135deg, #E55555 0%, #ff6b6b 50%, #ff8e8e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.8rem 1.8rem;
    background: linear-gradient(135deg, rgba(229, 85, 85, 0.12) 0%, rgba(255, 107, 107, 0.08) 100%);
    border: 3px solid rgba(229, 85, 85, 0.25);
    box-shadow: 0 6px 20px rgba(229, 85, 85, 0.2);
    position: relative;
    overflow: hidden;
}

.summary-row .value.highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.summary-row:hover .value.highlight::after {
    left: 100%;
}

.summary-row:hover .value.highlight {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(229, 85, 85, 0.25);
}

/* 確認操作按鈕 */
.confirm-actions {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding: 0.8rem;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: 18px;
    border: 1px solid rgba(233, 158, 158, 0.1);
    backdrop-filter: blur(10px);
}

.back-step-btn {
    flex: 1;
    padding: 1.5rem 2.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 3px solid #dee2e6;
    border-radius: 18px;
    font-weight: 800;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.8px;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.back-step-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.back-step-btn:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.back-step-btn:hover::before {
    left: 100%;
}

.payment-btn {
    flex: 2;
    padding: 1.75rem 3rem;
    background: linear-gradient(135deg, #E55555 0%, #ff6b6b 50%, #ff8e8e 100%);
    color: var(--white);
    border: none;
    border-radius: 20px;
    font-weight: 900;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(229, 85, 85, 0.5);
    letter-spacing: 1.2px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 4px 8px rgba(229, 85, 85, 0.3));
}

.payment-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.payment-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #d04848 0%, #E55555 100%);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 35px rgba(229, 85, 85, 0.4);
}

.payment-btn:hover::before {
    left: 100%;
}

.payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 15px rgba(229, 85, 85, 0.2);
}

.btn-loading {
    display: none;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .donation-modal-content {
        width: 95%;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .donation-page-header {
        padding: 1.25rem 1.5rem;
    }
    
    .donation-page-header .title-section h1 {
        font-size: 1.2rem;
    }
    
    .donation-page-header .title-section .subtitle {
        font-size: 0.8rem;
    }
    
    .donation-stats-section {
        padding: 1.25rem 1.5rem;
    }
    
    .donation-stats-section .stats-content {
        gap: 2rem;
    }
    
    .donation-wrapper {
        padding: 1.5rem;
        max-height: 75vh;
    }
    
    .donation-card .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .donation-card .card-content {
        padding: 1.5rem;
    }
    
    .quick-amounts {
        gap: 0.75rem;
        justify-content: center;
    }
    
    .amount-btn {
        padding: 1.5rem 1rem;
        min-height: 80px;
    }
    
    .amount-value {
        font-size: 1.5rem;
    }
    

    
    .confirm-summary {
        padding: 2rem;
        border-radius: 24px;
    }
    
    .confirm-summary h4 {
        font-size: 2rem;
        margin-bottom: 2rem;
        letter-spacing: 0.8px;
    }
    
    .summary-details {
        padding: 1.5rem;
    }
    
    .summary-row {
        padding: 1rem;
        margin: 0.25rem 0;
    }
    
    .summary-row:hover {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        transform: translateX(3px);
    }
    
    .confirm-actions {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0.75rem;
    }
    
    .payment-btn,
    .back-step-btn {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .donation-modal-content {
        width: 98%;
        max-height: 98vh;
        border-radius: 16px;
    }
    
    .donation-page-header {
        padding: 1rem;
    }
    
    .donation-page-header .title-section .subtitle {
        font-size: 0.75rem;
    }
    
    .donation-stats-section {
        padding: 1rem;
    }
    
    .donation-stats-section .stats-content {
        gap: 1.5rem;
    }
    
    .donation-wrapper {
        padding: 1rem;
        max-height: 80vh;
    }
    
    .donation-card .card-header {
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .donation-card .card-content {
        padding: 1rem;
    }
    
    .post-info-card .post-author {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .post-info-card .author-avatar {
        width: 60px;
        height: 60px;
    }
    
    .post-info-card .author-details h4 {
        font-size: 1.25rem;
    }
    
    .pet-option {
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .pet-avatar {
        width: 50px;
        height: 50px;
    }
    
    .pet-name {
        font-size: 1.1rem;
    }
    
    .quick-amounts {
        gap: 0.5rem;
        justify-content: center;
    }
    
    .amount-btn {
        flex-direction: row;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.75rem;
        min-height: auto;
        min-width: 80px;
    }
    
    .amount-value {
        font-size: 1.25rem;
        margin-bottom: 0;
    }
    
    .custom-amount {
        padding: 1rem;
    }
    
    .amount-hint {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        margin-top: 0.3rem;
    }
    
    .amount-hint::after {
        left: 0.5rem;
        font-size: 0.8rem;
    }
    
    .confirm-summary {
        padding: 1rem;
    }
    
    .summary-details {
        padding: 1rem;
    }
    
    .payment-btn,
    .back-step-btn {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

/* 深色模式支援 */
@media (prefers-color-scheme: dark) {
    .donation-modal-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .donation-modal-content {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .donation-stats-section {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .donation-card {
        background: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .donation-card .card-header {
        background: linear-gradient(135deg, #2a2a2a 0%, #3a3a3a 100%);
        border-color: #4a4a4a;
    }
    
    .post-info-card .post-preview,
    .custom-amount,
    .confirm-summary,
    .summary-details {
        background: #3a3a3a;
        border-color: #4a4a4a;
    }
    
    .amount-input,
    .donation-message textarea,
    .option-card {
        background: #3a3a3a;
        border-color: #4a4a4a;
        color: #ffffff;
    }
    
    .amount-hint {
        color: #adb5bd;
        background: linear-gradient(135deg, rgba(173, 181, 189, 0.12) 0%, rgba(173, 181, 189, 0.18) 100%);
        border-color: rgba(173, 181, 189, 0.25);
    }
    
    .amount-hint:hover {
        color: #ffffff;
        background: linear-gradient(135deg, rgba(173, 181, 189, 0.18) 0%, rgba(173, 181, 189, 0.25) 100%);
        border-color: rgba(173, 181, 189, 0.35);
    }
}

/* 載入動畫優化 */
.donation-modal-overlay.closing {
    animation: modalFadeOut 0.3s ease-out forwards;
}

.donation-modal-overlay.closing .donation-modal-content {
    animation: modalSlideOut 0.3s ease-out forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
}
