/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8f9fa;
    color: #333;
    padding-bottom: 70px;
    overflow-x: hidden;
}

/* 全局链接样式 */
a {
    color: inherit;
    text-decoration: none;
}

/* 顶部轮播区 */
.hero-section {
    width: 100%;
    margin-bottom: 15px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.carousel-slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, #1a3a52 0%, #2c5f8d 100%);
}

.slide-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding: 20px;
}

.slide-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: none;
}

.slide-content p {
    font-size: 0.95rem;
    opacity: 0.9;
    text-shadow: none;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    width: 20px;
    border-radius: 3px;
    background: #ff6b35;
}

/* 区块容器 */
.section-container {
    margin: 15px 10px;
}

.section-title {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1a3a52;
}

.title-icon {
    margin-right: 5px;
    font-size: 1.2rem;
}

/* CSS图标替代emoji */
.icon-chart::before {
    content: "";
    display: inline-block;
    border-radius: 3px;
}

.icon-briefcase::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background: #2c5f8d;
    border-radius: 3px;
    margin-right: 8px;
}

/* 经典案例滚动 */
.review-container {
    background: white;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
    height: 163px;
    position: relative;
}

.review-scroll {
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: caseScroll 12s linear infinite;
    padding-bottom: 10px;
}

/* 暂停滚动时添加此class */
.review-scroll.paused {
    animation-play-state: paused;
}

/* 持续向上滚动动画 */
@keyframes caseScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.review-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
    border-left: 3px solid #ff6b35;
    text-decoration: none;
    color: inherit;
}

.review-item:hover,
.review-item:active {
    background: #f0f0f0;
}

/* 案例卡片新样式 */
.case-card {
    display: flex;
    align-items: center;
    width: 100%;
}

.case-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.case-content {
    flex: 1;
    min-width: 0;
}

.case-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a3a52;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.case-subtitle {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-name {
    font-weight: 600;
    color: #1a3a52;
    min-width: 70px;
}

.loan-amount {
    flex: 1;
    color: #ff6b35;
    font-weight: 600;
    text-align: center;
}

.review-time {
    color: #999;
    font-size: 0.85rem;
    min-width: 70px;
    text-align: right;
}

/* 成功借款从左往右滚动 */
.success-loan-container {
    overflow: hidden;
}

.success-loan-scroll {
    display: flex;
    gap: 12px;
    width: max-content;
    /* 初始状态暂停动画，等数据加载完成后再启动 */
    animation: scrollRight 35s linear infinite;
    animation-play-state: paused;
}

.success-loan-scroll.playing {
    animation-play-state: running;
}

@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.success-loan-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #fff;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid #e8e8e8;
    font-size: 0.9rem;
}

.success-loan-item .user-name {
    color: #1a3a52;
    font-weight: 600;
    min-width: auto;
}

.success-loan-item .loan-amount {
    color: #ff6b35;
    font-weight: 600;
    text-align: left;
}

.success-loan-item .review-time {
    color: #999;
    font-size: 0.8rem;
    min-width: auto;
    text-align: left;
}

/* 立即申请区域 */
.apply-section {
    margin: 20px 10px;
}

.apply-btn {
    width: 100%;
    height: 50px;
    background: #ff6b35;
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.apply-btn:active {
    transform: scale(0.98);
    background: #e55a2b;
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.apply-btn:hover .btn-icon {
    transform: translateX(5px);
}

.features-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.feature-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.85rem;
}

.feature-icon {
    width: 22px;
    height: 22px;
}

/* 债务优化卡片 */
.debt-card {
    position: relative;
    width: 100%;
    height: 140px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.debt-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.debt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 58, 82, 0.85) 0%, rgba(44, 95, 141, 0.85) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.debt-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.debt-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* 财库指南文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 3px solid #2c5f8d;
}

.article-card:active {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.article-icon {
    font-size: 1.8rem;
    margin-right: 15px;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 6px;
}

.article-content {
    flex: 1;
}

.article-content h4 {
    font-size: 0.95rem;
    color: #1a3a52;
    margin-bottom: 6px;
    font-weight: 600;
}

.article-content p {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}

.article-time {
    font-size: 0.75rem;
    color: #bbb;
}

/* 底部提示 */
.bottom-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 20px 20px;
    gap: 15px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.tip-text {
    color: #999;
    font-size: 0.85rem;
}

/* 技术支持 */
.tech-support {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 20px 0 30px;
}

.tech-logo {
    width: 80px;
    height: 20px;
    object-fit: contain;
}

.tech-text {
    font-size: 0.75rem;
    color: #999;
}

/* 底部导航栏 */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -1px 3px rgba(0,0,0,0.08);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #999;
    transition: all 0.3s ease;
    padding: 8px 20px;
}

.nav-item.active {
    color: #ff6b35;
}

.nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.nav-item .nav-icon:nth-of-type(2) {
    display: none;
}

.nav-item.active .nav-icon:nth-of-type(1) {
    display: none;
}

.nav-item.active .nav-icon:nth-of-type(2) {
    display: block;
}

.nav-item:active .nav-icon {
    transform: scale(1.1);
}

.nav-text {
    font-size: 0.75rem;
    font-weight: 500;
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: block;
}

.modal-box {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 24px;
    min-width: 280px;
    max-width: 90%;
    z-index: 2001;
    animation: slideUp 0.3s ease;
}

.modal-box.show {
    display: block;
}

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

@keyframes slideUp {
    from {
        transform: translate(-50%, -40%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

.modal-content {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    height: 44px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn.cancel {
    background: #f0f0f0;
    color: #666;
}

.modal-btn.confirm {
    background: #ff6b35;
    color: white;
}

.modal-btn:active {
    transform: scale(0.98);
}

/* 响应式设计 */
@media (min-width: 768px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        box-shadow: 0 0 10px rgba(0,0,0,0.1);
    }

    .footer-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #999;
    font-size: 0.9rem;
}
