/* 基础重置 */
* {
    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 {
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-color: #f5f5f5; /* 备用背景色 */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% + 40px); /* 比视口宽40px */
    height: 100%;
    background-image: url('../img/cb4ebabfc4b5bc4596f89fd4a5fea52d.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    opacity: 0.9; /* 可调整透明度 */
}

/* 主容器 */
.app-top-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* 表单容器 */
.form-container {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95); /* 半透明白色背景 */
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    backdrop-filter: blur(2px); /* 毛玻璃效果 */
}

/* 应用标题 */
.app-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

/* 标签页导航 */
.form-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.tab-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    background: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn.active {
    color: #007aff;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007aff;
}

/* 表单样式 */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: rgba(255, 255, 255, 0.8);
}

.input-group input:focus,
.input-group select:focus {
    border-color: #007aff;
    outline: none;
    background-color: white;
}

/* 下拉选择框特殊样式 */
.input-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.input-group select option {
    padding: 8px;
    background-color: white;
}

.input-group select option[disabled] {
    color: #999;
}

/* 按钮样式 */
.form-actions {
    margin-top: 24px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn.primary {
    background-color: #007aff;
    color: white;
}

.btn.primary:hover {
    background-color: #0062cc;
}

/* 提示框样式 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.toast {
    padding: 12px 24px;
    border-radius: 8px;
    margin-bottom: 10px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(-20px);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #34C759;
}

.toast.error {
    background-color: #FF3B30;
}

.toast.info {
    background-color: #007aff;
}

/* 响应式设计 */
@media (min-width: 768px) {
    body::before {
        width: calc(100% + 60px); /* 大屏幕上增加更多宽度 */
    }
    
    .app-top-container {
        padding: 60px 40px;
    }
    
    .form-container {
        padding: 40px 30px;
        max-width: 450px;
    }
    
    .app-title {
        font-size: 28px;
        margin-bottom: 30px;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .app-top-container {
        padding: 20px;
    }
    
    .form-container {
        padding: 25px 20px;
        max-width: 350px;
    }
    
    .app-title {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .input-group select {
        background-size: 14px;
        padding-right: 35px;
    }
}

/* 用户协议复选框样式 */
.agreement-group {
    margin: 20px 0;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.agreement-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.agreement-link {
    color: #007aff;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 4px;
}

.agreement-link:hover {
    color: #0062cc;
}

/* 用户协议模态框样式 */
.agreement-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.agreement-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    opacity: 0;
}

.modal-content.show {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    padding: 0 10px;
}

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

.modal-body {
    padding: 20px;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 10px;
}