/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 根元素基础字体大小设置，便于使用rem单位 */
html {
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5rem;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header h1 {
    font-size: 1.25rem;
    color: #333;
}

.avatar {
    position: relative;
    cursor: pointer;
}

.avatar-wrapper {
    position: relative;
}

.avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* 主要内容区域 */
.main-content {
    margin-top: 3.5rem;
    padding: 1rem;
}

/* 介绍部分 */
.intro {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    /*flex-direction: column;*/
    /*gap: 1rem;*/
}

.intro-image img {
    width: 100px;
    height: auto;
    border-radius: 0.5rem;
    object-fit: cover;
}

.intro-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.8;
}

/* 功德部分 */
.merit-section {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
}

.merit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.donate-btn {
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.donate-btn:hover {
    background-color: #ff5252;
}

/* 功德榜样式 */
.merit-box {
    background: #f9f9f9;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.merit-box h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.merit-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
}

.merit-item:last-child {
    border-bottom: none;
}

.merit-item img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    margin-right: 0.75rem;
}

.merit-info {
    flex: 1;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.date {
    font-size: 0.8rem;
    color: #999;
}

.amount {
    color: #ff6b6b;
    font-weight: 500;
}

/* 捐赠弹窗 */
.donate-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.donate-modal.show {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.donate-modal.show .modal-content {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.input-group {
    margin: 20px 0;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #4CAF50;
}

.input-group input.error {
    border-color: #ff4d4f;
}

.input-error-message {
    color: #ff4d4f;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

.input-error-message.visible {
    display: block;
}

.wechat-pay-btn {
    width: 100%;
    padding: 12px;
    background-color: #07c160;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.wechat-pay-btn:hover {
    background-color: #06ae56;
}

.wechat-pay-btn img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

    
 
    
    .intro-text {
        margin-left: 20px; /* 图片和文本之间的间距 */
    }
/* 响应式布局 */
@media (min-width: 768px) {
 
    
    .modal-content {
        width: 24rem;
    }
}

/* 选项卡样式 */
.merit-tabs {
    background: #fff;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-top: 1rem;
}

.tab-header {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    font-size: 1rem;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active {
    color: #ff6b6b;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff6b6b;
}

/* 选项卡内容区域 */
.tab-content {
    position: relative;
    min-height: 200px;
}

.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* 加载状态 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 结束提示信息 */
.end-message {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
}

/* 滚动条样式优化 */
.tab-content::-webkit-scrollbar {
    width: 4px;
}

.tab-content::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.tab-content::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 置顶按钮样式 */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #ff6b6b;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    border: none;
}

.back-to-top:hover {
    background-color: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top svg {
    width: 1.2rem;
    height: 1.2rem;
    fill: currentColor;
}

/* 置顶按钮显示动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.back-to-top.visible {
    display: flex;
    animation: fadeIn 0.3s ease;
} 

/* 功德列表样式 */
.merit-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    transition: background-color 0.3s;
}

.merit-item:hover {
    background-color: #f9f9f9;
}

.merit-item .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
    border: 1px solid #eee;
}

.merit-item .merit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.merit-item .user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.merit-item .nickname {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-right: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.merit-item .amount {
    font-weight: bold;
    color: #4CAF50; /* 金额颜色 */
    white-space: nowrap; /* 防止金额换行 */
}

.merit-item .date {
    font-size: 12px;
    color: #999;
}

.merit-item .status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
    display: inline-block;
}

.merit-item .status.success {
    background-color: #f0f9eb;
    color: #67c23a;
}

.merit-item .status.pending {
    background-color: #f4f4f5;
    color: #909399;
}

.merit-item .status.failed {
    background-color: #fef0f0;
    color: #f56c6c;
}

/* 加载状态 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #909399;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 14px;
    text-align: center;
    line-height: 1.6;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    margin-top: 8px;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    color: #333;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item.user-info {
    padding: 16px;
}

.dropdown-item .mini-avatar {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.dropdown-item .nickname {
    font-weight: 500;
    flex: 1;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 0;
}

.dropdown-item i {
    margin-right: 8px;
    color: #666;
} 