/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
    line-height: 1.6;
}

/* 登录容器 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
}

/* 登录表单 */
.login-form {
    background: rgba(45, 45, 45, 0.95);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-form h1 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.subtitle {
    color: #a0a0a0;
    text-align: center;
    margin-bottom: 32px;
    font-size: 14px;
}

/* 输入组 */
.input-group {
    margin-bottom: 20px;
}

.input-group input {
    width: 100%;
    padding: 16px;
    background: rgba(60, 60, 60, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ffffff;
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #007bff;
    background: rgba(60, 60, 60, 0.9);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-group input::placeholder {
    color: #888;
}

.input-hint {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 4px;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003875 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 加载动画 */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单底部 */
.form-footer {
    text-align: center;
}

.form-footer p {
    color: #a0a0a0;
    font-size: 14px;
}

.register-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.register-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 消息提示 */
.error-message, .success-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    text-align: center;
}

.error-message {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
}

.success-message {
    background: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #51cf66;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .login-form {
        padding: 24px;
        margin: 20px;
    }
    
    .login-form h1 {
        font-size: 24px;
    }
    
    .input-group input {
        padding: 14px;
    }
    
    .login-btn {
        padding: 14px;
    }
}

/* 通用按钮样式 */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3 0%, #003875 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: rgba(108, 117, 125, 0.2);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(108, 117, 125, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: #ffffff;
}

.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
}

/* 模态框样式 - 绝对居中版 */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(5px);
    z-index: 1000 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    overflow: auto !important;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: #2d2d2d !important;
    padding: 20px !important;
    border-radius: 12px !important;
    width: auto !important;
    min-width: 300px !important;
    max-width: 800px !important;
    max-height: 90vh !important;
    position: relative !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    overflow-y: auto !important;
    margin: 0 !important;
    transform: none !important;
    display: block !important;
}

.close {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    right: 15px;
    top: 15px;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* 移动端优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
        padding: 15px;
        margin: 0;
    }
    
    .close {
        right: 10px;
        top: 10px;
        font-size: 20px;
        width: 25px;
        height: 25px;
    }
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: #28a745;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transform: translateX(calc(100% + 20px));
    transition: all 0.3s ease;
    display: none;
    opacity: 0;
    visibility: hidden;
    font-size: 14px;
    font-weight: 500;
    max-width: 300px;
    word-wrap: break-word;
}

.toast.show {
    display: block;
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toast.error {
    background: #dc3545;
}

.toast.warning {
    background: #ffc107;
    color: #212529;
}

.toast.info {
    background: #17a2b8;
} 