/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    font-family: 'Inter', 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* 主容器 */
.container {
    width: 100%;
    min-height: 100vh;
    background-color: #bd070f;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* 背景图片 */
.bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* 白色卡片 */
.card {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 20px;
    width: calc(100% - 56px);
    max-width: 694px;
    margin-top: 28%;
    padding: 40px 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 标题 */
.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 32px;
    font-weight: normal;
    color: #000000;
    text-align: center;
    margin-bottom: 30px;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 24px;
    color: #000000;
    margin-bottom: 10px;
}

/* 输入框 */
.form-input {
    width: 100%;
    height: 80px;
    background: #eee9e9;
    border: 2px solid #eee9e9;
    border-radius: 50px;
    padding: 0 30px;
    font-family: 'Jost', sans-serif;
    font-size: 20px;
    color: #000000;
    outline: none;
    transition: border-color 0.3s;
}

.form-input::placeholder {
    color: #9b9898;
}

.form-input:focus {
    border-color: #f81b1b;
}

/* 验证码行 */
.captcha-row {
    display: flex;
    gap: 15px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    height: 80px;
    border-radius: 10px;
    cursor: pointer;
}

/* 提交按钮 */
.btn-submit {
    width: 100%;
    height: 80px;
    background: linear-gradient(180deg, #f81b1b 0%, #9f0a0a 100%);
    border: 2px solid #f5f5f5;
    border-radius: 50px;
    color: #ffffff;
    font-family: 'Jost', sans-serif;
    font-size: 26px;
    font-weight: normal;
    cursor: pointer;
    box-shadow: 0 4px 3.5px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.3);
}

.btn-submit:active {
    transform: translateY(0);
}

/* 链接行 */
.links-row {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    font-family: 'Jost', sans-serif;
    font-size: 24px;
}

.link-item {
    color: #9a1010;
    text-decoration: none;
    transition: color 0.3s;
}

.link-item:hover {
    color: #f81b1b;
}

.link-item.black {
    color: #000000;
}

/* 协议勾选 */
.agreement-row {
    display: flex;
    align-items: center;
    margin-top: 20px;
    font-family: 'Jost', sans-serif;
    font-size: 24px;
}

.checkbox-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.checkbox-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    background: #317bfa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-custom::after {
    content: '✓';
    color: #ffffff;
    font-size: 24px;
    opacity: 1;
    transition: opacity 0.2s;
}

.checkbox-input:not(:checked) + .checkbox-custom::after {
    opacity: 0;
}

.agreement-text {
    color: #000000;
}

.agreement-link {
    color: #317bfa;
    text-decoration: none;
}

/* 分隔线 */
.divider {
    width: 90px;
    height: 1px;
    background: #af1c22;
}

/* 错误提示 */
.error-message {
    color: #f81b1b;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-input.error {
    border-color: #f81b1b;
}

/* 加载状态 */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-submit.loading {
    position: relative;
    color: transparent;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 响应式设计 - 移动端优先 */
@media screen and (max-width: 750px) {
    .card {
        margin-top: 32%;
        padding: 30px 20px;
    }
    
    .card-title {
        font-size: 28px;
    }
    
    .form-label {
        font-size: 20px;
    }
    
    .form-input {
        height: 60px;
        font-size: 16px;
        padding: 0 20px;
    }
    
    .captcha-image {
        height: 60px;
    }
    
    .btn-submit {
        height: 60px;
        font-size: 22px;
    }
    
    .links-row {
        font-size: 18px;
    }
    
    .agreement-row {
        font-size: 18px;
    }
    
    .checkbox-wrapper {
        width: 32px;
        height: 32px;
    }
    
    .checkbox-custom {
        width: 32px;
        height: 32px;
    }
    
    .checkbox-custom::after {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .card {
        margin-top: 52%;
        padding: 25px 15px;
        width: calc(100% - 30px);
    }
    
    .card-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .form-label {
        font-size: 18px;
    }
    
    .form-input {
        height: 50px;
        font-size: 14px;
        border-radius: 25px;
    }
    
    .captcha-image {
        height: 50px;
    }
    
    .btn-submit {
        height: 50px;
        font-size: 18px;
        border-radius: 25px;
    }
    
    .links-row {
        font-size: 14px;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 0;
    }
    
    .agreement-row {
        font-size: 14px;
    }
    
    .checkbox-wrapper {
        width: 28px;
        height: 28px;
    }
    
    .checkbox-custom {
        width: 28px;
        height: 28px;
    }
    
    .checkbox-custom::after {
        font-size: 16px;
    }
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 16px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #ffffff;
    border-radius: 16px;
    width: calc(100% - 40px);
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

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

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

.modal-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-body h3 {
    font-size: 16px;
    color: #333;
    margin: 15px 0 10px 0;
}

.modal-body h3:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin: 8px 0;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.btn-modal-confirm {
    width: 100%;
    height: 50px;
    background: linear-gradient(180deg, #f81b1b 0%, #9f0a0a 100%);
    border: none;
    border-radius: 25px;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-modal-confirm:hover {
    opacity: 0.9;
}
