/* Login Page Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-card: #1a1a1a;
    --bg-input: #242424;
    --text-primary: #e8e8e8;
    --text-secondary: #999;
    --accent: #4f8cff;
    --accent-hover: #3a6fd8;
    --danger: #f44336;
    --border: #333;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8cff, #7c4dff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 16px;
}

.login-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: #555;
}

/* Error */
.error-message {
    font-size: 13px;
    color: var(--danger);
    min-height: 20px;
    text-align: center;
}

/* Button */
.login-button {
    position: relative;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
}

.login-button:hover {
    background: var(--accent-hover);
}

.login-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
}

.login-button.loading .button-text {
    visibility: hidden;
}

.login-button.loading .button-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── ICP 备案号 ────────────────────────────────────────── */
.icp-footer {
    text-align: center;
    padding: 12px;
}
.icp-footer a {
    color: #888;
    font-size: 12px;
    text-decoration: none;
}
.icp-footer a:hover {
    color: #aaa;
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }
}
