/* Custom Styles for Loan Page Clone */

/* 全局字体设置 - 繁体中文字体 */
body, html {
    font-family: "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif !important;
}

/* 确保图片路径正确 */
img {
    max-width: 100%;
    height: auto;
}

/* 按钮样式补充 - 渐变背景、箭头图标、阴影效果 */
.btn-primary {
    background: linear-gradient(90deg, #17B6C9 0%, #15A6B7 100%) !important;
    color: white !important;
    padding: 14px 28px !important;
    border-radius: 100px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0px 4px 12px rgba(23, 182, 201, 0.3) !important;
    border: none !important;
    position: relative !important;
    overflow: visible !important;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #15A6B7 0%, #1398A8 100%) !important;
    color: white !important;
    text-decoration: none !important;
    box-shadow: 0px 6px 16px rgba(23, 182, 201, 0.4) !important;
    transform: translateY(-1px) !important;
}

.btn-primary:active {
    transform: translateY(0) !important;
    box-shadow: 0px 2px 8px rgba(23, 182, 201, 0.3) !important;
}

/* 右箭头图标 */
.btn-primary::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid white;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    margin-left: 8px;
    transition: transform 0.3s ease;
    vertical-align: middle;
}

.btn-primary:hover::after {
    transform: translateX(4px);
}

.btn-primary-lg {
    padding: 16px 36px !important;
    font-size: 18px !important;
    min-width: 200px !important;
}

.btn-primary-lg::after {
    border-left-width: 7px !important;
    border-top-width: 6px !important;
    border-bottom-width: 6px !important;
}

/* 响应式显示 */
@media (max-width: 767px) {
    .d-md-none {
        display: block !important;
    }
    .d-md-block {
        display: none !important;
    }
    .d-md-flex {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    .d-md-block {
        display: block !important;
    }
    .d-md-flex {
        display: flex !important;
    }
}

/* 确保步骤线条正确显示 - 修复定位以匹配原网页 */
.step-lines {
    position: absolute;
    width: 914px;
    height: 209px;
    left: 50%;
    margin-left: -457px; /* 914px / 2 = 457px */
    top: 0;
    z-index: 1;
    pointer-events: none;
}

.step-lines .line-self {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.step-lines .line-self img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.step-lines .line-arrow {
    position: absolute;
    right: -10px;
    top: 10%;
}

.step-lines .line-arrow img {
    display: block;
}

/* 响应式调整 */
@media (max-width: 1279px) {
    .step-lines {
        width: 90%;
        margin-left: -45%; /* 90% / 2 = 45% */
    }
    
    .step-lines .line-arrow {
        right: -1%;
        top: 2%;
    }
}

.step-items {
    position: relative;
    z-index: 2;
}

/* 修复一些可能的样式问题 */
.color-white {
    color: #ffffff !important;
}

.color-neutral-100 {
    color: #f5f5f5 !important;
}

.color-neutral-500 {
    color: #999999 !important;
}

.color-neutral-700 {
    color: #666666 !important;
}

.color-neutral-800 {
    color: #333333 !important;
}

.fw-400 {
    font-weight: 400 !important;
}

.fw-500 {
    font-weight: 500 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.fw-700-en {
    font-weight: 700 !important;
    font-family: 'Montserrat', sans-serif;
}

.text-center {
    text-align: center !important;
}

/* 底部导航栏样式 */
.bottom-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: #F5F5F5;
    border-top: 1px solid #E0E0E0;
    z-index: 1000;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-nav-list {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bottom-nav-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.bottom-nav-icon svg {
    width: 100%;
    height: 100%;
}

.bottom-nav-text {
    font-size: 12px;
    color: #999;
    font-weight: 400;
    transition: color 0.3s ease;
}

/* 激活状态 */
.bottom-nav-item.active .bottom-nav-text {
    color: #333;
    font-weight: 500;
}

.bottom-nav-item:not(.active) .bottom-nav-text {
    color: #999;
}

/* 图标样式 - 使用原网站图标 */
.bottom-nav-icon {
    position: relative;
    width: 24px;
    height: 24px;
    margin: 0 auto;
}

.bottom-nav-icon img.nav-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: all 0.3s ease;
}

/* 激活状态 - 显示黄色填充图标（无滤镜，直接显示激活图标文件） */
.bottom-nav-item.active .bottom-nav-icon img {
    filter: none !important;
    opacity: 1;
}

/* 未激活状态 - 显示灰色轮廓图标（无滤镜，直接显示未激活图标文件） */
.bottom-nav-item:not(.active) .bottom-nav-icon img {
    filter: none !important;
    opacity: 1;
}

/* 点击效果 */
.bottom-nav-link:active {
    opacity: 0.7;
}

/* 为内容区域添加底部padding，避免被导航栏遮挡 */
#main-container {
    padding-bottom: 70px;
}

/* 我的页面样式 */
body#wd {
    background-color: #f7f7f7;
    padding-bottom: 70px;
    margin: 0;
}

.wd-head {
    padding-bottom: 25px;
    min-height: 38px;
    position: relative;
    overflow: visible;
}

.comm_top_nav {
    position: relative;
    z-index: 10;
    padding: 15px 0;
}

.comm_top_nav b {
    display: inline-block;
    transform: translateY(10px);
}

.mine_top {
    margin-bottom: 20px;
    position: relative;
    z-index: 5;
}

.mine_top_bg {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    z-index: 1;
}

.mine_top_div {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
}

/* 移除content-wrapper，使用原站结构 */

.left_li_div {
    display: flex;
    align-items: center;
    padding: 5px 0;
}

.left_li_img {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.left_li_txt {
    margin-top: 3px;
}

/* 只調整「我的錢包」文字再向下 2px */
.mine_top .am-g .am-u-sm-6:first-child .left_li_txt {
    margin-top: 5px;
}

/* 「我的錢包」圖標+文字整體向右再移動 10px（共30px） */
.mine_top .am-g .am-u-sm-6:first-child .left_li_div {
    padding-left: 30px;
}

.menu-list .am-g,
.system-list .am-g {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
    margin: 0;
}

.menu-list .am-g:last-child,
.system-list .am-g:last-child {
    border-bottom: none;
}

.menu-list .am-g a,
.system-list .am-g a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2f2f2f;
    width: 100%;
    padding: 5px 0;
}

.menu-list .am-g a:hover,
.system-list .am-g a:hover {
    color: #2f2f2f;
    text-decoration: none;
}

.tx-title {
    border-bottom: 1px solid #f0f0f0;
    margin: 0;
    padding: 12px 15px;
    background: #ffffff;
    display: flex;
    align-items: center;
}

.tx-title .am-u-sm-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tx-title .point {
    margin: 0;
}

.tx-title a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
    width: 100%;
}

.tx-title a:hover {
    text-decoration: none;
    color: #000;
}

.menu-list {
    margin: 5px 0 0 0;
    padding: 0;
    background: #ffffff;
}

.menu-list .am-g {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.menu-list .am-g:last-child {
    border-bottom: none;
}

.menu-list .am-g a {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    width: 100%;
    line-height: 40px;
}

/* 右側箭頭樣式（覆蓋字體圖標，確保顯示） */
.menu-list .am-icon-angle-right:before {
    content: '>';
    font-size: 18px;
    color: #c4c4c4;
    font-family: inherit;
}

@media (min-width: 768px) {
    .bottom-navigation {
        display: none;
    }
    
    #main-container {
        padding-bottom: 0;
    }
    
    body#wd {
        padding-bottom: 0;
    }
}

/* 美观的弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.modal-dialog {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    padding: 20px 20px 16px;
    text-align: center;
    border-bottom: none;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.modal-body {
    padding: 20px;
    text-align: center;
}

.modal-message {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.modal-form-group {
    text-align: center;
}

.modal-form-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    color: #444;
}

.modal-form-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.modal-form-group input:focus {
    border-color: #17B6C9;
    box-shadow: 0 0 0 3px rgba(23, 182, 201, 0.15);
}

.modal-error {
    margin-top: 8px;
    font-size: 13px;
    color: #e74c3c;
}

.modal-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 12px;
    border-top: none;
}

.modal-btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.modal-btn-primary {
    background: linear-gradient(90deg, #17B6C9 0%, #15A6B7 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 182, 201, 0.3);
}

.modal-btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(23, 182, 201, 0.3);
}

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

.modal-btn-secondary:active {
    background: #e8e8e8;
}

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

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

/* Modal footer with two buttons */
.modal-footer.two-buttons {
    justify-content: space-between;
}

.modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
    display: none;
}

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

.modal-overlay.show-cancel .modal-footer {
    justify-content: space-between;
}

/* 設置頁面樣式 */
body#settings {
    background: #f7f7f7;
    min-height: 100vh;
    margin: 0;
}

.settings-header {
    position: relative;
    height: 50px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f0f0f0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.settings-header .back-btn {
    position: absolute;
    left: 12px;
    font-size: 20px;
    color: #666;
    text-decoration: none;
}

.settings-list {
    margin-top: 10px;
    background: #fff;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 15px;
    color: #333;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item .item-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-item .item-value {
    color: #999;
    font-size: 14px;
}

.settings-arrow {
    font-size: 16px;
    color: #999;
    margin-left: 8px;
}

.settings-logout {
    margin: 20px 0;
    text-align: center;
}

.settings-logout button {
    background: none;
    border: none;
    color: #c28000;
    font-size: 16px;
    padding: 12px 0;
    width: 100%;
}
