/* 4. 定义动画关键帧 */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* --- 基础重置 --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* 1. 定义多色背景 */
    background: linear-gradient(-45deg, #ffffff, #f9f5f7, #f0e6eb, #e6d8df);
    /* 2. 放大背景尺寸以便移动 */
    background-size: 400% 400%;
    /* 3. 调用动画：名称 时长 曲线 无限循环 */
    animation: gradientBG 15s ease infinite;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* 全屏高度 */
}

/* --- 容器卡片 --- */
.login-card {
    background: white;
    width: 100%;
    max-width: 400px; /* 限制最大宽度，适配电脑端 */
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin: 20px;
}

/* --- 标题区域 --- */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.header p {
    color: #888;
    font-size: 14px;
}

/* --- 表单元素 --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    background-color: #f9f9f9;
}

input:focus {
    border-color: #4a90e2;
    background-color: #fff;
}

/* --- 验证码区域特殊样式 --- */
.code-wrapper input {
    padding-right: 110px; /* 为按钮留出空间 */
}

.btn-code {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #4a90e2;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px;
}

.btn-code:hover {
    color: #357abd;
}

/* --- 提交按钮 --- */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-submit:active {
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* --- 底部协议/提示 --- */
.footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.footer input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
    accent-color: #4a90e2;
}

.footer label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    font-size: 12px;
    color: #999;
}

.footer a {
    color: #4a90e2;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* --- 消息提示样式 --- */
.message {
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

.message-error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.message-success {
    background-color: #efe;
    color: #3c3;
    border: 1px solid #cfc;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按钮禁用状态 */
.btn-code:disabled {
    color: #999;
    cursor: not-allowed;
}

.btn-code:disabled:hover {
    color: #999;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== 账户/服务条款页面样式 ========== */
.account-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    gap: 40px;
    align-items: flex-start;
}

/* 主内容区域 */
.account-content {
    flex: 1;
    background: white;
    padding: 50px 60px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 0; /* 防止 flex 子元素溢出 */
}

.account-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.account-header h1 {
    color: #333;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.update-date {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

.intro {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
}

.content-section {
    margin-bottom: 50px;
    scroll-margin-top: 100px; /* 为固定导航栏留出空间 */
}

.content-section h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a90e2;
}

.content-section h3 {
    color: #444;
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 15px 0;
}

.content-section p {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.content-section ul {
    margin: 20px 0;
    padding-left: 30px;
}

.content-section li {
    color: #555;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 12px;
}

.content-section strong {
    color: #333;
    font-weight: 600;
}

.content-section a {
    color: #4a90e2;
    text-decoration: none;
    transition: color 0.3s;
}

.content-section a:hover {
    color: #357abd;
    text-decoration: underline;
}

/* 右侧导航栏 */
.account-sidebar {
    width: 280px;
    position: sticky;
    top: 40px;
    flex-shrink: 0;
}

.sidebar-nav {
    background: white;
    padding: 25px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.sidebar-nav h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 8px;
}

.sidebar-nav a {
    display: block;
    color: #666;
    font-size: 14px;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s;
    line-height: 1.5;
}

.sidebar-nav a:hover {
    background-color: #f5f7fa;
    color: #4a90e2;
    padding-left: 20px;
}

.sidebar-nav a.active {
    background-color: #e8f2ff;
    color: #4a90e2;
    font-weight: 600;
    border-left: 3px solid #4a90e2;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .account-container {
        flex-direction: column;
        gap: 30px;
    }

    .account-sidebar {
        width: 100%;
        position: static;
    }

    .sidebar-nav {
        position: sticky;
        top: 20px;
    }

    .account-content {
        padding: 40px 40px;
    }
}

@media (max-width: 768px) {
    .account-container {
        padding: 20px 15px;
    }

    .account-content {
        padding: 30px 25px;
    }

    .account-header h1 {
        font-size: 26px;
    }

    .content-section h2 {
        font-size: 20px;
    }

    .content-section h3 {
        font-size: 18px;
    }

    .content-section p,
    .content-section li {
        font-size: 15px;
    }

    .sidebar-nav {
        padding: 20px 15px;
    }

    .sidebar-nav a {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* --- 备案信息样式 --- */
.beian-info {
    margin-top: 30px;
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 10px 20px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.beian-info .copyright {
    color: #999;
}

.beian-info .separator {
    color: #ccc;
}

.beian-info a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
}

.beian-info a:hover {
    color: #4a90e2;
    text-decoration: underline;
}