.form-group.inline {
    flex-direction: row;
    align-items: center;
    margin-top: 2px;
}

.form-group.inline .checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--mi-text-secondary, #909399);
    cursor: pointer;
    user-select: none;
}

.form-group.inline input[type="checkbox"] {
    width: auto;
    height: auto;
    margin: 0;
    accent-color: #ff6900;
}

.form-group.inline span {
    margin: 0;
}

/* 小米 2.0 登录/注册页面风格 */

:root {
    --mi-orange: #ff6900;
    --mi-orange-light: #ff8a33;
    --mi-bg: #f7f7f7;
    --mi-card: #ffffff;
    --mi-border: #e8e8e8;
    --mi-text-primary: #303133;
    --mi-text-secondary: #909399;
    --mi-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "MiSans", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    background: var(--mi-bg);
    color: var(--mi-text-primary);
    line-height: 1.5;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top, rgba(255, 204, 153, 0.25), transparent 55%),
                radial-gradient(circle at bottom, rgba(255, 240, 220, 0.8), transparent 60%);
}

.card {
    width: 100%;
    max-width: 420px;
    background: var(--mi-card);
    border-radius: 20px;
    padding: 48px 40px;
    box-shadow: var(--mi-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), transparent 60%);
    pointer-events: none;
}

.card h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: var(--mi-text-primary);
    text-align: center;
    position: relative;
    padding-bottom: 18px;
}

.card h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 3px;
    border-radius: 2px;
    background: var(--mi-orange);
}

.form-group {
    margin-top: 28px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--mi-text-secondary);
    margin-bottom: 10px;
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 0 18px 0 52px;
    border: 1px solid var(--mi-border);
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--mi-text-primary);
    background: #fcfcfc;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--mi-orange);
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.15);
    outline: none;
    background: #ffffff;
}

.form-group input::placeholder {
    color: #c0c4cc;
}

.form-group::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 61%;
    transform: translateY(-5px);
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.65;
}

.form-group:nth-of-type(1)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.form-group:nth-of-type(2)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.btn {
    margin-top: 32px;
    width: 100%;
    height: 50px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background: linear-gradient(135deg, var(--mi-orange), var(--mi-orange-light));
    color: #ffffff;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 15px 35px rgba(255, 105, 0, 0.25);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn:hover::after {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(255, 105, 0, 0.28);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(255, 105, 0, 0.2);
}

.switch-link {
    margin-top: 26px;
    text-align: center;
    font-size: 14px;
    color: var(--mi-text-secondary);
}

.switch-link a {
    color: var(--mi-orange);
    font-weight: 500;
    text-decoration: none;
}

.switch-link a:hover {
    text-decoration: underline;
}

.message {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    min-height: 20px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid transparent;
}

.message.error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
}

.message.success {
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.08);
    border-color: rgba(46, 204, 113, 0.2);
}

@media (max-width: 520px) {
    .auth-container {
        padding: 16px;
    }

    .card {
        padding: 40px 26px;
        border-radius: 16px;
    }

    .form-group {
        margin-top: 24px;
    }

    .form-group input {
        height: 48px;
        padding-left: 48px;
    }

    .btn {
        height: 48px;
        font-size: 15px;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135_deg, #1a1a1a, #0f0f0f);
        color: #e5e5e5;
    }

    .auth-container {
        background: linear-gradient(135deg, rgba(34, 34, 34, 0.95), rgba(26, 26, 26, 0.95));
    }

    .card {
        background: rgba(28, 28, 28, 0.95);
        border: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
    }

    .card h1 {
        color: #f3f3f3;
    }
}