/* CSS变量已移至 common/variables.css */
/* 基础重置已移至 common/common.css */

body {
    background: #ffffff;
    color: var(--text-main);
    padding-bottom: 90px;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(240, 240, 240, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(250, 250, 250, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* 加载动画已移至 common/common.css */

/* 安全条 - 底部显示，无背景，文字渐变色 */
.security-bar {
    background: none;
    border: none;
    color: transparent;
    font-size: 0.7rem;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 20px 100px;
    position: relative;
    z-index: 1;
}

.security-bar span {
    background: linear-gradient(135deg, #1a472a 0%, #2d5a3f 50%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 500;
}

.security-bar i {
    font-size: 0.7rem;
    background: linear-gradient(135deg, #1a472a 0%, #16a34a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 顶部Header样式已移至 common/header.css 统一管理 */
/* 首页特定样式 */
.header .logo.large {
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -1px;
}

/* 额度卡片 */
.hero-card {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    margin: 15px;
    border-radius: 20px;
    padding: 30px 25px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(236, 0, 0, 0.25);
}
.hero-card::before {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.hero-card::after {
    content: '';
    position: absolute;
    left: -40px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.hero-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 10px;
}
.limit-amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}
.hero-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.hero-tags .tag-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.hero-tags .tag-item::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.5s ease;
}
.hero-tags .tag-item:hover::before {
    left: 100%;
}
.hero-tags .tag-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.hero-tags .tag-item i {
    font-size: 1.2rem;
    color: #FFD700;
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
    animation: pulse 2s ease-in-out infinite;
}
.hero-tags .tag-item.tag-fast i {
    animation: shake 0.5s ease-in-out infinite;
    animation-delay: 0.2s;
}
.hero-tags .tag-item.tag-rate i {
    color: #90EE90;
    filter: drop-shadow(0 0 4px rgba(144, 238, 144, 0.5));
}
.hero-tags .tag-item .tag-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}
.hero-tags .tag-item .tag-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.hero-tags .tag-item .tag-text small {
    font-size: 0.7rem;
    opacity: 0.85;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

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

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* 信任徽章 */
.trust-badges {
    display: flex;
    justify-content: space-around;
    padding: 20px 15px;
    background: var(--white);
    margin: 0 15px;
    border-radius: 16px;
    margin-top: -15px;
    position: relative;
    z-index: 10;
    box-shadow: var(--card-shadow);
}
.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.badge-item i {
    font-size: 1.3rem;
    color: var(--primary-red);
}
.badge-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* 借款计算器 */
.calc-card {
    background: var(--white);
    margin: 20px 15px;
    border-radius: 20px;
    padding: 25px 20px;
    box-shadow: var(--card-shadow);
}
.slider-group {
    margin-bottom: 25px;
}
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.slider-header span:first-child {
    font-size: 0.9rem;
    font-weight: 600;
}
.slider-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-red);
}
.slider-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    position: relative;
}
.slider-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--primary-red) 0%, #d32f2f 100%);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 8px rgba(236, 0, 0, 0.25);
    position: relative;
    z-index: 1;
}
.slider-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}
.slider-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, var(--primary-red) 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(236, 0, 0, 0.35);
}
.slider-btn:active {
    transform: scale(0.96);
    box-shadow: 0 1px 4px rgba(236, 0, 0, 0.2);
}
.slider-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    background: #e0e0e0;
    color: #9e9e9e;
    box-shadow: none;
}
.slider-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}
.slider-btn:disabled::before {
    display: none;
}
.slider-input {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #eee;
    border-radius: 3px;
    outline: none;
    margin: 0;
    position: relative;
    z-index: 0;
}
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #d32f2f 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(236, 0, 0, 0.4);
    border: 3px solid var(--white);
    transition: all 0.2s ease;
}
.slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(236, 0, 0, 0.5);
}
.slider-input::-webkit-slider-thumb:active {
    transform: scale(1.05);
}
.slider-input::-moz-range-thumb {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #d32f2f 100%);
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid var(--white);
    box-shadow: 0 2px 8px rgba(236, 0, 0, 0.4);
    transition: all 0.2s ease;
}
.slider-input::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(236, 0, 0, 0.5);
}
.slider-input::-moz-range-thumb:active {
    transform: scale(1.05);
}
.slider-range {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* 结果展示 */
.result-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fdf2f2;
    padding: 18px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
}

/* 合并结果样式 - 覆盖默认的result-box样式 */
.calc-card .result-box.combined-result {
    background: linear-gradient(135deg, #fff5f5 0%, #ffeaea 100%) !important;
    border: 2px solid #ffe0e0 !important;
    margin-bottom: 25px !important;
    padding: 25px 20px !important;
    border-radius: 14px !important;
    display: block !important;
    /* 覆盖默认的flex布局 */
    justify-content: initial !important;
    align-items: initial !important;
}

.result-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.result-item {
    flex: 1 !important;
    text-align: center !important;
    min-width: 120px !important;
    max-width: 50% !important;
}

.result-divider {
    width: 1px !important;
    height: 60px !important;
    background: linear-gradient(to bottom, transparent, #ffe0e0, transparent) !important;
    margin: 0 20px !important;
    flex-shrink: 0 !important;
}

.result-item .result-label {
    font-size: 0.9rem !important;
    color: #666666 !important;
    margin-bottom: 8px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
}

.result-item .result-amount {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #ec0000 !important;
    margin-bottom: 5px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.result-item .result-tip {
    font-size: 0.75rem !important;
    color: #999 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
}

/* 期限按钮样式 */
.period-group {
    margin-bottom: 25px;
}

.period-header {
    margin-bottom: 15px;
}

.period-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.period-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.period-btn {
    padding: 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
    color: #666666;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.period-btn:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
    background: #fff5f5;
}

.period-btn.active {
    border-color: var(--primary-red);
    background: var(--primary-red);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(236, 0, 0, 0.3);
}

.period-btn:active {
    transform: translateY(1px);
}

/* 确保在移动端也能正确显示 */
@media (max-width: 480px) {
    .calc-card .result-box.combined-result {
        padding: 20px 10px !important;
    }
    
    .result-divider {
        margin: 0 10px !important;
        height: 50px !important;
    }
    
    .result-item {
        min-width: 100px !important;
    }
    
    .result-item .result-amount {
        font-size: 1.2rem !important;
    }
    
    .result-item .result-label {
        font-size: 0.8rem !important;
    }
    
    .result-item .result-tip {
        font-size: 0.7rem !important;
    }
}

/* 处理超长数字 */
@media (max-width: 360px) {
    .result-item .result-amount {
        font-size: 1.1rem !important;
    }
    
    .result-divider {
        margin: 0 8px !important;
    }
}
.result-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}
.result-tip {
    font-size: 0.7rem;
    color: #999;
}
.result-amount {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-red);
}

/* 协议勾选 */
.agreement-box {
    margin-bottom: 20px;
}
.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding-left: 28px;
}
.checkbox-wrap input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}
.checkbox-wrap input:checked ~ .checkmark {
    background: var(--primary-red);
    border-color: var(--primary-red);
}
.checkbox-wrap input:checked ~ .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.agree-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.agree-text a {
    color: var(--primary-red);
    text-decoration: none;
}

/* 申请按钮 */
.apply-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 8px 20px rgba(236, 0, 0, 0.3);
}
.apply-btn:active {
    transform: scale(0.98);
}
.apply-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

/* 协议弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show {
    display: flex;
}
.modal-box {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #eee;
}
.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
}
.modal-close {
    width: 30px;
    height: 30px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}
.modal-content {
    padding: 20px;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* 用户反馈 */
.social-proof {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 15px;
}
.proof-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}
.proof-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.proof-text b {
    color: var(--text-main);
}

/* 客服卡片 */
.support-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    margin: 0 15px 15px;
    padding: 18px 20px;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}
.support-info h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.support-info h4 i {
    color: var(--primary-red);
}
.support-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.service-btn {
    padding: 10px 18px;
    background: #fdf2f2;
    color: var(--primary-red);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 底部信息 */
.footer-info {
    text-align: center;
    padding: 15px;
    font-size: 0.7rem;
    color: #999;
    line-height: 1.8;
}

.footer-links {
    margin-top: 10px;
    font-size: 0.75rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-red);
    text-decoration: underline;
}

.footer-links span {
    color: #ccc;
    margin: 0 4px;
}

/* 底部导航样式已移至 common/navigation.css 统一管理 */

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 0.9rem;
    z-index: 3000;
    display: none;
}
.toast.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

/* 借款确认页面 */
.confirm-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-light);
    z-index: 1500;
    display: none;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}
.confirm-page.show {
    display: flex;
    transform: translateX(0);
}

.confirm-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    color: white;
    padding: 15px 20px;
    padding-top: calc(15px + env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.confirm-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}
.back-btn {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 15px;
    padding-bottom: 100px;
}

.confirm-card {
    background: white;
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}
.card-header {
    padding: 15px 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
}
.card-header i {
    color: var(--primary-red);
}
.card-content {
    padding: 18px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}
.info-row:last-child {
    border-bottom: none;
}
.info-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.info-row .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}
.info-row .value.highlight {
    color: var(--primary-red);
    font-size: 1.1rem;
}

.remark-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}
.remark-input:focus {
    border-color: var(--primary-red);
}

/* 签名区域 */
.signature-box {
    width: 100%;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 12px;
    position: relative;
    background: #fafafa;
    overflow: hidden;
}
.signature-box canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.signature-tip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ccc;
    font-size: 0.9rem;
    pointer-events: none;
}
.signature-tip.hide {
    display: none;
}
.clear-sign-btn {
    margin-top: 12px;
    padding: 10px 20px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.confirm-agreement {
    margin: 20px 0;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--deep-red) 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(236, 0, 0, 0.3);
    transition: transform 0.2s;
}
.submit-btn:active {
    transform: scale(0.98);
}
.submit-btn:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.submit-tip {
    text-align: center;
    font-size: 0.75rem;
    color: #999;
    margin-top: 15px;
}
