* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: #f5f5f5;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
}

.page {
    padding: 20px;
}

/* Home Page Styles */
.max-loan-amount {
    background: linear-gradient(to bottom, #ff4757, #ff6b81);
    color: white;
    padding: 30px 20px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 20px;
}

.amount {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.subtitle {
    font-size: 14px;
    margin-bottom: 20px;
}

.primary-btn {
    background: #1e90ff;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    width: 100%;
    cursor: pointer;
}

.terms {
    margin: 20px 0;
    font-size: 12px;
}

.terms a {
    color: #1e90ff;
    text-decoration: none;
}

.platform-info {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    color: #333;
}

.platform-info h3 {
    color: #ff4757;
    margin-bottom: 10px;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
    padding: 0 20px;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.step {
    background: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.step.active {
    color: #1e90ff;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.id-upload {
    margin: 20px 0;
    background: #f5f5f5;
    padding: 25px 0;
}

.id-upload h3 {
    color: #333;
    font-size: 16px;
    margin-bottom: 25px;
    padding: 0 25px;
    font-weight: 500;
}

.upload-area {
    display: flex;
    gap: 25px;
    padding: 0 25px;
}

.upload-box {
    flex: 1;
    position: relative;
}

.file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

.upload-label {
    display: block;
    cursor: pointer;
}

.id-card-preview {
    position: relative;
    width: 100%;
    padding-bottom: 63%;
    border: 2px solid #ff4757;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
}

.camera-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: #ff4757;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.camera-icon svg {
    width: 28px;
    height: 28px;
    color: #ffffff;
}

.id-card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    padding: 18px;
}

/* 正面身份证样式 */
.front-side .id-card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar-section {
    flex-shrink: 0;
}

.avatar-icon {
    width: 45px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-icon svg {
    width: 40px;
    height: 40px;
}

.front-side .info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 5px;
}

/* 反面身份证样式 */
.back-side .id-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.emblem-section {
    text-align: center;
    margin-bottom: 18px;
}

.emblem-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.emblem-img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    opacity: 0.9;
    filter: contrast(1.1) saturate(1.1);
}

.country-text {
    color: #666;
    font-size: 10px;
    font-family: "Microsoft YaHei", "SimSun", serif;
    font-weight: 500;
    letter-spacing: 0.8px;
}

.back-side .info-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: center;
}

.back-side .info-bar {
    background: linear-gradient(to right, #e8e8e8, #d5d5d5);
    border: 1px solid rgba(200,200,200,0.3);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.back-side .info-bar.long {
    width: 88%;
}

.back-side .info-bar.medium {
    width: 75%;
}

.back-side .info-bar.short {
    width: 65%;
}

/* 信息条样式 */
.info-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
}

.info-bar.short {
    width: 45%;
}

.info-bar.medium {
    width: 65%;
}

.info-bar.long {
    width: 85%;
}

.front-side .info-bar.short {
    width: 50%;
}

.front-side .info-bar.medium {
    width: 70%;
}

.front-side .info-bar.long {
    width: 85%;
}

/* 上传状态 */
.upload-box.uploaded .id-card-preview {
    border-color: #28a745;
}

.upload-box.uploaded .camera-icon {
    background: #28a745;
}

.upload-box.error .id-card-preview {
    border-color: #dc3545;
}

.upload-box.error .camera-icon {
    background: #dc3545;
}

/* 预览图片样式 */
.upload-box.has-preview .id-card-content {
    display: none;
}

.upload-box.has-preview .camera-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: all 0.3s ease;
}

.upload-box.has-preview:hover .camera-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.preview-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 悬停效果 */
.upload-label:hover .id-card-preview {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.upload-label:hover .camera-icon {
    transform: translate(-50%, -50%) scale(1.05);
}

.id-card-preview {
    transition: all 0.3s ease;
}

.camera-icon {
    transition: all 0.3s ease;
}

/* Result Page */
.result-content {
    text-align: center;
}

.approved-amount {
    margin-bottom: 30px;
}

.loan-details {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 320px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content h2 {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 500;
}

.risk-reasons {
    margin: 20px 0;
}

.risk-reasons p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px 0;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    border: none;
}

.secondary-btn {
    background: #f5f5f5;
    color: #666;
}

.modal-buttons .primary-btn {
    margin: 0;
}

/* Loading Modal */
.loading-content {
    text-align: center;
    padding: 30px 20px;
}

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

.loading-content p {
    color: #666;
    font-size: 14px;
}

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

/* Supplementary Info Page */
.info-section {
    margin-bottom: 20px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.section-header span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.fund-info,
.house-info,
.company-info,
.house-loan-info {
    padding: 10px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #1e90ff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(30,144,255,0.2);
}

.form-group select {
    background-color: white;
    cursor: pointer;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #1e90ff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Error Message */
.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.form-group.has-error input,
.form-group.has-error select {
    border-color: #dc3545;
}

.form-group.has-error .error-message {
    display: block;
}

.emergency-contacts {
    padding-top: 10px;
}

/* Review Page Styles */
.review-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 20px;
}

.review-text {
    margin-top: 30px;
}

.review-text h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.review-text p {
    color: #666;
    font-size: 14px;
}

/* Loading Animation */
.loading-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #f3f3f3;
    border-top: 4px solid transparent;
    position: relative;
    animation: spin 1s linear infinite;
}

.loading-circle::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 4px solid transparent;
    border-bottom: 4px solid #ff4757;
    animation: spin 2s linear infinite;
}

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

/* Progress Bar Active States */
.progress-bar .step.active {
    color: #1e90ff;
    font-weight: 500;
}

.progress-bar .step.active::after {
    background-color: #1e90ff;
}

/* Loan Result Page */
.header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding-right: 20px;
}

.header h1 {
    font-size: 18px;
    font-weight: 500;
    flex-grow: 1;
    text-align: center;
    margin-right: 24px; /* Compensate for back button width */
}

.loan-result {
    background: #fff;
}

.loan-amount {
    background: #ff4757;
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.loan-amount h2 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
}

.loan-amount p {
    font-size: 14px;
    opacity: 0.9;
}

.loan-input {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.loan-input label {
    color: #333;
    font-size: 14px;
}

.loan-input input {
    border: none;
    font-size: 16px;
    width: 200px;
    color: #333;
    background: transparent;
}

.loan-warning {
    padding: 10px 20px;
    font-size: 12px;
    color: #ff4757;
    line-height: 1.4;
    background: #fff;
}

.loan-details {
    background: white;
    margin-top: 10px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.detail-item span:first-child {
    color: #666;
}

.detail-item span:last-child {
    color: #333;
}

.value-with-arrow {
    display: flex;
    align-items: center;
    gap: 5px;
}

.arrow {
    color: #999;
    font-size: 16px;
}

.placeholder {
    color: #999 !important;
}

.withdraw-btn {
    background: #1e90ff;
    color: white;
    border: none;
    width: calc(100% - 40px);
    margin: 20px;
    padding: 15px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
}

/* Bank Card Binding Page */
.bank-card-content {
    padding: 20px;
    background: #fff;
}

.bank-card-tip {
    color: #666;
    font-size: 12px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.bank-card-content .form-group {
    margin-bottom: 20px;
    background: #f8f8f8;
    border-radius: 8px;
    padding: 12px 15px;
}

.bank-card-content .form-group label {
    display: inline-block;
    width: 60px;
    color: #333;
    font-size: 14px;
}

.bank-card-content .form-group input {
    border: none;
    background: transparent;
    font-size: 14px;
    width: calc(100% - 60px);
    outline: none;
}

.bank-card-content .form-group input::placeholder {
    color: #999;
}

.card-upload-section {
    margin-top: 30px;
    margin-bottom: 30px;
}

.upload-tip {
    color: #666;
    font-size: 12px;
    margin-bottom: 15px;
    text-align: center;
}

.card-upload-box {
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-upload-box:hover {
    border-color: #1e90ff;
    background-color: rgba(30, 144, 255, 0.05);
}

.card-upload-box img {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

.card-upload-box p {
    color: #666;
    font-size: 14px;
}

.bank-card-content .primary-btn {
    margin-top: 30px;
    background: #1e90ff;
    color: white;
    border: none;
    width: 100%;
    padding: 15px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
}

.value-with-arrow.clickable {
    cursor: pointer;
    transition: opacity 0.2s;
}

.value-with-arrow.clickable:hover {
    opacity: 0.8;
}

.detail-item:last-child {
    cursor: pointer;
}

.detail-item:last-child:hover {
    background-color: #f9f9f9;
}

.preview-container {
    margin-top: 20px;
    text-align: center;
}

#bankCardPreview {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.preview-actions button {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.ocr-loading {
    text-align: center;
    padding: 20px 0;
}

.ocr-loading .loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1e90ff;
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

.ocr-loading p {
    color: #666;
    font-size: 14px;
}

.file-input {
    display: none;
} 