/* ==================== 登录页样式 ==================== */

.login-container {
    min-height: calc(100vh - var(--navbar-height-desktop));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 400px;
    width: 100%;
    animation: fadeInUp 0.5s ease;
    box-sizing: border-box;
    overflow: hidden;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.login-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

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

.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-input:disabled {
    background-color: var(--background-color);
    cursor: not-allowed;
}

.otp-group {
    display: none;
}

.otp-group.show {
    display: block;
}

.otp-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
    max-width: 100%;
}

.otp-digit {
    flex: 1;
    min-width: 0;
    max-width: 60px;
    padding: 16px 8px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.otp-hint {
    font-size: 13px;
    color: #666;
    text-align: center;
}

.otp-timer {
    color: var(--primary-color);
    font-weight: 600;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.form-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-hover);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--white);
}

.btn-secondary:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    border-color: #ddd;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    font-size: 14px;
    color: #666;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.footer-link:hover {
    text-decoration: underline;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

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

/* ==================== 响应式设计 ==================== */

@media (max-width: 768px) {
    .login-container {
        min-height: calc(100vh - var(--navbar-height-mobile));
        padding: 16px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .login-icon {
        font-size: 48px;
    }

    .login-title {
        font-size: 20px;
    }

    .otp-digit {
        padding: 12px 4px;
        font-size: 20px;
    }
}