/* V免签登录页 - 本地字体版 */

:root {
    /* 品牌色 */
    --primary: #1677ff;
    --primary-hover: #4096ff;
    --primary-light: #e6f4ff;

    /* 功能色 */
    --success: #52c41a;
    --warning: #faad14;
    --error: #f5222d;

    /* 中性色 */
    --bg: #f5f7fa;
    --bg-white: #ffffff;
    --text-primary: #1f2329;
    --text-secondary: #4e5969;
    --text-tertiary: #86909c;
    --border: #e5e6eb;
    --border-light: #f2f3f5;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

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

body {
    /* 移除 Inter，改用系统字体栈 */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 背景纹理 */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
            radial-gradient(circle at 20% 50%, rgba(22, 119, 255, 0.04) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(82, 196, 26, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* 主容器 */
.container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    perspective: 1000px;
}

/* 卡片 */
.card {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.card:hover {
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

/* Logo区域 */
.brand {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #0958d9 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.25);
    color: white;
    font-size: 28px;
    position: relative;
    overflow: hidden;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.2) 50%,
            transparent 70%
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.brand h1 {
    color: var(--text-primary);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.brand p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

.form-label i {
    font-size: 12px;
    color: var(--text-tertiary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    /* 继承 body 字体，无需单独设置 */
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-input:hover {
    border-color: var(--primary);
    background: var(--bg-white);
}

.form-input:focus {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group:focus-within .form-label {
    color: var(--primary);
}

.form-group:focus-within .form-label i {
    color: var(--primary);
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    /* 继承 body 字体 */
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0958d9 100%);
    color: white;
    margin-top: 10px;
    box-shadow: 0 4px 16px rgba(22, 119, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(22, 119, 255, 0.35);
    background: linear-gradient(135deg, var(--primary-hover) 0%, #0958d9 100%);
}

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

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

/* 加载动画 */
.spinner {
    display: none;
    font-size: 16px;
}

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

.loading .btn-text {
    opacity: 0.9;
}

/* 消息提示 */
.message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    display: none;
}

.message.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

.message.error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: var(--error);
}

.message.success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: var(--success);
}

/* 页脚 */
.footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* 响应式 */
@media (max-width: 480px) {
    .card {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .brand h1 {
        font-size: 24px;
    }

    .logo-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

/* 输入框自动填充样式覆盖 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0px 1000px var(--bg) inset;
    transition: background-color 5000s ease-in-out 0s;
}

input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px var(--bg-white) inset;
}