/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;

    /* --- 背景图核心设置 Start --- */
    /* 1. 引入图片：请将 'bg-tech.png' 替换为你实际保存的图片路径 */
    background-image: url('../image/login_img.png');

    /* 2. 不重复：防止图片太小时出现平铺 */
    background-repeat: no-repeat;

    /* 3. 居中：保证图片主体始终在屏幕中间 */
    background-position: center center;

    /* 4. 覆盖：关键属性！让图片自动缩放以填满整个屏幕，不会变形 */
    background-size: cover;

    /* 5. 固定（可选）：让背景固定不动，滚动页面时背景不随之滚动 */
    background-attachment: fixed;
    /* --- 背景图核心设置 End --- */

    min-height: 100vh;

    /* 建议修改：因为背景是深色科技风，建议将默认字体颜色改为浅色，否则看不清 */
    color: #ffffff;

    overflow-x: hidden;
    margin: 0;
    /* 建议加上，去除浏览器默认边距 */
}

/* 确保你的 FontAwesome 已经正确引入，否则图标不会显示 */
/* 引入方式示例: <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"> */

/* 左侧容器布局 */
.info-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* 左对齐 */
    padding: 60px;
    height: 100vh;
    color: #fff;
    /* 关键：给整个左侧加一个极淡的渐变遮罩，增强文字可读性，但不要完全遮挡背景 */
    background: linear-gradient(90deg, rgba(0, 10, 30, 0.8) 0%, rgba(0, 10, 30, 0.2) 100%);
    position: relative;
    z-index: 2;
    /* 确保在背景图之上 */
}

/* --- 品牌区域 --- */
.brand {
    margin-bottom: 60px;
}

.brand-logo-container {
    margin-bottom: 20px;
}

.logo-img {
    width: 100px;
    /* 调整 Logo 大小 */
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.5));
    /* 给 Logo 加一点发光效果 */
}

.brand-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    background: linear-gradient(120deg, #ffffff 0%, #a6c1ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-title .highlight {
    color: #00f260;
    /* 这里的颜色会被上面的 gradient 覆盖，如果不生效可以单独处理 */
    -webkit-text-fill-color: #00f260;
    text-shadow: 0 0 15px rgba(0, 242, 96, 0.6);
    /* AI 两个字绿色荧光 */
}

.brand-slogan {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 10px;
    margin-bottom: 20px;
    font-weight: 300;
}

/* 版本号胶囊样式 */
.version-capsule {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    backdrop-filter: blur(5px);
}

.v-tag {
    color: #88ccff;
    font-weight: bold;
    margin-right: 6px;
}

.v-num {
    color: #fff;
    letter-spacing: 1px;
}

/* --- 特性列表区域 --- */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    /* 列表间距 */
    max-width: 500px;
}

.feature-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    /* 极淡的背景 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    /* 玻璃拟态 */
    backdrop-filter: blur(4px);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
    /* 悬停微动特效 */
    border-color: rgba(255, 255, 255, 0.2);
}

/* 图标容器通用样式 */
.icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin-right: 20px;
    flex-shrink: 0;
}

/* 不同颜色的发光图标 */
.glow-blue {
    background: rgba(0, 112, 243, 0.15);
    color: #4da6ff;
    box-shadow: 0 0 15px rgba(0, 112, 243, 0.3);
}

.glow-green {
    background: rgba(0, 242, 96, 0.15);
    color: #00f260;
    box-shadow: 0 0 15px rgba(0, 242, 96, 0.3);
}

.glow-cyan {
    background: rgba(0, 255, 255, 0.15);
    color: #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* 文本样式 */
.text-box h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.text-box p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* 底部装饰 */
.footer-decoration {
    margin-top: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
}

/* ========== 主容器 ========== */
.auth-container {
    display: flex;
    min-height: 100vh;
}

/* ========== 左侧信息区 ========== */
.info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.brand {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.brand-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.brand-icon i {
    font-size: 50px;
    color: white;
}

.brand h1 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.brand p {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.version-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.features {
    max-width: 350px;
    position: relative;
    z-index: 2;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.feature-icon i {
    font-size: 24px;
    color: white;
}

.feature-content h3 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.feature-content p {
    font-size: 13px;
    opacity: 0.8;
    line-height: 1.4;
}

/* ========== 右侧表单区 ========== */
.form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.form-container {
    background: white;
    border-radius: 24px;
    padding: 50px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
    color: #333;
    font-weight: 700;
}

.form-header p {
    color: #666;
    font-size: 16px;
}

/* ========== 表单样式 ========== */
.register-form {
    width: 100%;
}

.input-group {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .input-group {
    flex: 1;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #999;
    font-size: 16px;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-wrapper input:focus+i {
    color: #667eea;
}

.toggle-password {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    z-index: 3;
    padding: 4px;
}

.toggle-password:hover {
    color: #667eea;
}

/* ========== 复选框样式 ========== */
.checkbox-group {
    margin: 30px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    margin-right: 12px;
    margin-top: 2px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 4px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* ========== 提交按钮 ========== */
.submit-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ========== 表单底部 ========== */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.divider {
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e1e5e9;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #999;
    font-size: 14px;
    position: relative;
}

.form-footer p {
    font-size: 15px;
    color: #666;
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========== 通知样式 ========== */
.notification {
    position: fixed;
    top: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    z-index: 1000;
    max-width: 350px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ========== 错误信息样式 ========== */
.error-message {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.error-message::before {
    content: '⚠';
    font-size: 14px;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .auth-container {
        flex-direction: row;
    }

    .info-section {
        padding: 40px 30px;
    }

    .features {
        max-width: 300px;
    }

    .form-container {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .auth-container {
        flex-direction: column;
    }

    .info-section {
        padding: 30px 20px;
        min-height: auto;
    }

    .brand h1 {
        font-size: 28px;
    }

    .brand-icon {
        width: 80px;
        height: 80px;
    }

    .brand-icon i {
        font-size: 40px;
    }

    .features {
        display: none;
    }

    .form-section {
        padding: 20px;
    }

    .form-container {
        padding: 30px 25px;
        margin: 0;
    }

    .form-header h2 {
        font-size: 26px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .notification {
        top: 20px;
        right: 20px;
        left: 20px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .input-wrapper input {
        padding: 14px 14px 14px 45px;
        font-size: 14px;
    }

    .input-wrapper i {
        left: 14px;
        font-size: 15px;
    }

    .submit-btn {
        padding: 16px;
        font-size: 15px;
    }

    .form-container {
        padding: 25px 20px;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: fadeInUp 0.6s ease-out;
}

.feature-item {
    animation: fadeInUp 0.6s ease-out;
}

.feature-item:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-item:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* ========== 作物选择器样式 ========== */

.crop-selector {
    margin-bottom: 30px;
}

.crop-selector-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
    text-align: center;
}

.crop-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.crop-option {
    display: flex;
    align-items: center;
    padding: 15px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

.crop-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transition: width 0.3s ease;
    z-index: 0;
}

.crop-option:hover::before {
    width: 100%;
}

.crop-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.crop-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.05));
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.crop-option.active::before {
    width: 100%;
}

.crop-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.crop-option:hover .crop-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.crop-info {
    flex: 1;
    position: relative;
    z-index: 1;
}

.crop-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 2px;
}

.crop-desc {
    font-size: 11px;
    color: #64748b;
    font-style: italic;
}

.crop-option[data-crop="rice"].active {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}

.crop-option[data-crop="wheat"].active {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.05));
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}

.crop-option[data-crop="corn"].active {
    border-color: #eab308;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.1), rgba(202, 138, 4, 0.05));
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.2);
}

.crop-option[data-crop="soybean"].active {
    border-color: #84cc16;
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.1), rgba(101, 163, 13, 0.05));
    box-shadow: 0 4px 20px rgba(132, 204, 22, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .crop-options {
        grid-template-columns: 1fr;
    }

    .crop-option {
        padding: 12px 10px;
    }

    .crop-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 10px;
    }

    .crop-name {
        font-size: 13px;
    }

    .crop-desc {
        font-size: 10px;
    }
}

/* ========== 网格布局的表单选项 ========== */

.form-options {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    margin: 25px 0;
    font-size: 14px;
}

.checkbox-label {
    justify-self: start;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.forgot-password {
    justify-self: end;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
}

.forgot-password:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 小屏幕响应式 */
@media (max-width: 480px) {
    .form-options {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }

    .checkbox-label {
        justify-self: center;
    }

    .forgot-password {
        justify-self: center;
    }
}