/* 赤峰金鑫矿业AI+智慧数据系统 - 主样式文件 */

:root {
    --primary-color: #2c5530;
    --secondary-color: #8b4513;
    --accent-color: #ffd700;
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-light: rgba(255, 255, 255, 0.95);
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #87CEEB 0%, #4682B4 50%, #1E90FF 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-20px, -20px) rotate(5deg); }
}

/* 登录容器 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-container::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

.login-container::before {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 50px 45px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.5);
    width: 100%;
    max-width: 480px;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: visible;
    z-index: 10;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 100;
}

.close-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: rotate(90deg);
}

.close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

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

/* 标题样式 */
.login-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f2f5;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.company-name {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.system-name {
    font-size: 22px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #4682B4, #1E90FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 300;
}

/* 表单样式 */
.login-form {
    margin-top: 30px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.inline-form-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.inline-label {
    display: inline-block !important;
    margin-bottom: 0 !important;
    min-width: 90px;
    font-weight: 600;
    color: #34495e;
    white-space: nowrap;
    font-size: 15px;
}

.inline-form-group .input-group {
    flex: 1;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8ecef;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #2c3e50;
}

.input-group input:hover {
    border-color: #4682B4;
    background: #ffffff;
}

.input-group input:focus {
    outline: none;
    border-color: #4682B4;
    box-shadow: 0 0 0 4px rgba(70, 130, 180, 0.1);
    background: #ffffff;
}

.input-group .icon {
    position: absolute;
    left: 15px;
    color: #6c757d;
    font-size: 16px;
    z-index: 1;
    transition: color 0.3s ease;
}

.input-group:hover .icon,
.input-group input:focus ~ .icon {
    color: #4682B4;
}

.input-group input[type="text"],
.input-group input[type="password"] {
    padding-left: 45px;
}

/* 记住密码和忘记密码 */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.forgot-password {
    color: #4682B4;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.forgot-password:hover {
    color: #1E90FF;
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4682B4 0%, #1E90FF 100%);
    color: var(--text-light);
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(70, 130, 180, 0.3);
    letter-spacing: 0.5px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(70, 130, 180, 0.4);
    background: linear-gradient(135deg, #5a9bd4 0%, #2ba0ff 100%);
}

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

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

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loading {
    display: none;
}

.loading.show {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--text-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误消息 */
.error-message {
    background: #ff4757;
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.error-message.show {
    display: block;
}

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

/* 注册申请入口 */
.register-section {
    margin-top: 35px;
    padding: 28px 25px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #e0e4e7;
    text-align: center;
}

.register-prompt {
    color: #495057;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 600;
}

.register-btn {
    width: 100%;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #4682B4 0%, #1E90FF 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(70, 130, 180, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(70, 130, 180, 0.4);
    background: linear-gradient(135deg, #5a9bd4 0%, #2ba0ff 100%);
}

.register-hint {
    font-size: 12px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

.register-hint i {
    color: #ff9800;
    margin-right: 5px;
}

.register-copy h3 {
    font-size: 16px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.register-copy p {
    font-size: 14px;
    color: #4a4a4a;
    line-height: 1.6;
    margin-bottom: 6px;
}

.register-hint {
    font-size: 13px;
    color: #657786;
}

.register-hint i {
    color: #f39c12;
    margin-right: 6px;
}

.register-btn {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    border-radius: 30px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(39, 174, 96, 0.25);
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.3);
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.register-form .form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.register-form .form-field {
    flex: 1;
    min-width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.register-form label {
    font-size: 13px;
    color: #4a4a4a;
    font-weight: 600;
}

.register-form label span {
    color: #e74c3c;
    margin-left: 4px;
}

.register-form input,
.register-form select,
.register-form textarea {
    padding: 10px 12px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    font-size: 14px;
    background: #fdfdfd;
}

.register-form textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

.modal-btn {
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease;
}

.modal-btn.primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 8px 18px rgba(39, 174, 96, 0.25);
}

.modal-btn.ghost {
    background: #f0f2f5;
    color: #4a4a4a;
}

.modal-btn.close-page-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
}

.modal-btn.close-page-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
    transform: translateY(-2px);
}

/* 模态框关闭按钮（右上角X） */
.modal-close-x-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-x-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    transform: rotate(90deg);
}

.modal-close-x-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.register-feedback {
    font-size: 13px;
    margin-top: 5px;
}

.register-feedback.error {
    color: #e74c3c;
}

.register-feedback.success {
    color: #27ae60;
}

/* 版权信息 */
.copyright {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 25px;
        margin: 10px;
    }
    
    .company-name {
        font-size: 20px;
    }
    
    .system-name {
        font-size: 16px;
    }
    
    .register-section {
        padding: 20px;
    }

    .register-form .form-row {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-box {
        padding: 25px 20px;
    }
    
    .logo {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
}